@charset "utf-8";
/* ============================================================
   admin UI（B-1/S1）: ダークモード。CP(明色)と差別化しつつ、レイアウト言語は CP 準拠
   （サイドバー + トップバー(見出し+アクション) + カード）。旧 common.css/admin.css を本ファイル(最後に読込)で上書き。
   ============================================================ */

:root{
  --bg:#0E1420; --card:#171E2B; --card-2:#1C2434; --ink:#E7ECF3; --muted:#9BA6B4; --faint:#818C99;
  --line:#28313F; --line-2:#333E4E; --accent:#F7941E; --accent-2:#FF8A00; --accent-soft:rgba(247,148,30,.16);
  --good:#2FBF71; --good-soft:rgba(47,191,113,.16); --bad:#F0576B; --bad-soft:rgba(240,87,107,.15);
  --sidebar:#131A26; --hover:#1E2736; --field:#0F1622;
  --shadow:0 1px 2px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
  --font:"Hiragino Kaku Gothic ProN","Hiragino Sans","Yu Gothic",YuGothic,"Noto Sans JP",Meiryo,system-ui,sans-serif;
}

/* ---- base（旧ダーク body を新ダークへ。id/クラス指定で確実に上書き） ---- */
*{box-sizing:border-box}
body#pagetop,
body.box_dark{
  background:var(--bg) !important; color:var(--ink) !important;
  font-family:var(--font); -webkit-font-smoothing:antialiased; line-height:1.5; font-size:14px;
  /* 旧固定ヘッダ/サイドバー用の body 余白(padding:70px 24px 24px 284px)を打ち消す＝新シェルを全画面幅に（CP と同じ） */
  margin:0 !important; padding:0 !important;
}
body#pagetop a{ color:inherit; }
/* 視覚的に隠すが支援技術には読ませるユーティリティ（並び替え方向の代替テキスト等） */
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ---- 旧シェル（固定ヘッダ・ハンバーガー・グローバルナビ）を隠す＝新シェルに置換 ---- */
body#pagetop > nav.header,
body#pagetop > .head_hamburger,
body#pagetop > nav.globalnav{ display:none !important; }
/* 旧 .main_wrapper は新 .main 直下に置くため、暗色背景/角丸/余白/幅の癖を解除（透明化） */
.adm-main .main_wrapper{ max-width:none; width:auto; margin:0; padding:0; background:transparent !important; border-radius:0 !important; box-shadow:none !important; }

/* ============================================================
   新シェル（CP と同じレイアウト言語・配色はダーク）
   ============================================================ */
.adm-app{ display:grid; grid-template-columns:248px 1fr; min-height:100vh; }
.adm-sidebar{ background:var(--sidebar); border-right:1px solid var(--line); padding:22px 16px; display:flex; flex-direction:column; gap:22px; }
.adm-main{ padding:22px 30px 40px; min-width:0; }

.adm-brand{ display:flex; align-items:center; gap:8px; padding:4px 8px 2px; text-decoration:none; }
.adm-brand img{ height:34px; width:auto; display:block; }

.adm-nav{ display:flex; flex-direction:column; gap:3px; }
.adm-nav a{ display:flex; align-items:center; gap:12px; padding:11px 13px; border-radius:11px; color:#B7C0CD; font-weight:600; font-size:14px; text-decoration:none; }
.adm-nav a svg{ width:19px; height:19px; flex:none; stroke:#7C8797; stroke-width:1.7; fill:none; }
.adm-nav a:hover{ background:var(--hover); color:#E7ECF3; }
.adm-nav a.on{ background:var(--accent-soft); color:var(--accent); }
.adm-nav a.on svg{ stroke:var(--accent); }
.adm-sidebar .adm-servername{ margin-top:auto; padding:6px 10px; }

/* top bar（左＝ページ見出し＋任意アクション、右＝ユーザーメニュー。CP の .top と同じ構成） */
.adm-top{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:22px; }
.adm-top-title{ display:flex; align-items:center; gap:14px; min-width:0; }
.adm-pagetitle{ font-size:22px; font-weight:800; color:var(--ink); margin:0; letter-spacing:.01em; }
.adm-top .adm-tools{ display:flex; align-items:center; gap:16px; }

/* usermenu */
.adm-usermenu{ position:relative; }
/* モバイル用（ロゴ行のアバター）。PC では上部ツールバーの .adm-usermenu を使うため隠す */
.adm-m-usermenu{ display:none; }
.adm-usermenu > summary{ display:flex; align-items:center; gap:10px; cursor:pointer; list-style:none; }
.adm-usermenu > summary::-webkit-details-marker{ display:none; }
.adm-usermenu > summary::marker{ content:""; }
.adm-user{ display:flex; align-items:center; gap:10px; }
.adm-ava{ width:38px; height:38px; border-radius:50%; background:linear-gradient(135deg,#ffce8f,#ff8f3c); display:grid; place-items:center; color:#fff; }
.adm-ava svg{ width:20px; height:20px; fill:#fff; stroke:none; }
.adm-user .adm-nm{ font-weight:700; font-size:13px; line-height:1.2; color:var(--ink); }
.adm-user .adm-rl{ font-size:11px; color:var(--muted); }
.adm-usermenu .adm-caret{ width:16px; height:16px; stroke:var(--muted); fill:none; stroke-width:2; transition:transform .15s; }
.adm-usermenu[open] .adm-caret{ transform:rotate(180deg); }
.adm-usermenu-pop{ position:absolute; top:calc(100% + 8px); right:0; min-width:200px; background:var(--card); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); padding:6px; z-index:30; }
.adm-usermenu-pop a{ display:flex; align-items:center; gap:9px; padding:10px 12px; border-radius:9px; font-size:13px; font-weight:700; color:#C7D0DC; text-decoration:none; }
.adm-usermenu-pop a:hover{ background:var(--hover); color:var(--ink); }
.adm-usermenu-pop a svg{ width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:1.7; }

.adm-foot{ text-align:center; color:var(--faint); font-size:11.5px; margin-top:30px; }

/* ログイン画面（サイドバーなし・中央寄せ） */
.adm-login{ min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:20px; padding:24px; }
/* ロゴは横長ロックアップ（約5.8:1）。height 固定だと狭い画面で img の max-width:100% が幅だけ縮めて
   縦横比が崩れるため、幅基準にして高さを追従させる（46px 相当＝46×5.766≒265px）。 */
.adm-login .adm-brand img{ width:265px; max-width:100%; height:auto; }
.adm-login .adm-login-body{ width:100%; max-width:430px; padding:0; }
.adm-login .adm-login-body .box_dark{ margin:0; }

/* ============================================================
   コンテンツ主要クラスのダーク化（旧 common.css/admin.css の上書き）
   ============================================================ */
.adm-main .box_dark,
.adm-main .box_border,
.adm-main .box_white{
  background:var(--card) !important; color:var(--ink) !important;
  border:1px solid var(--line) !important; border-radius:var(--radius);
  box-shadow:var(--shadow); padding:22px; margin-bottom:18px;
}
.adm-main .box_shadow{ box-shadow:var(--shadow); }
/* 一覧ページは主エリア幅いっぱいに。確認/削除結果(wrapper_m)・モーダル(wrapper_s)は既存の中央寄せ幅を維持 */
.adm-main .wrapper_full{ max-width:none; width:auto; margin:0; }

/* 見出し（in-content の title は残っても違和感ないダーク見出しに） */
.adm-main .title_A{ font-size:18px; font-weight:800; color:var(--ink); margin:0 0 14px; letter-spacing:.01em; }
.adm-main .title_D{ font-size:16px; font-weight:800; color:var(--ink); }
.adm-main .flex_block{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }

/* テーブル */
.adm-main .table_wrapper{ overflow-x:auto; }
.adm-main table{ background:transparent; }
.adm-main .admin_table,
.adm-main .basic_table,
.adm-main .login_table{ width:100%; border-collapse:collapse; font-size:13px; }
.adm-main th,
.adm-main td{ padding:11px 12px !important; border:1px solid var(--line) !important; text-align:left; vertical-align:middle; color:var(--ink); background:transparent; }
.adm-main th{ background:var(--card-2) !important; color:#C7D0DC !important; font-weight:700; white-space:nowrap; }
.adm-main th a{ color:var(--muted); text-decoration:none; }
.adm-main .admin_table tbody tr:hover,
.adm-main .basic_table tbody tr:hover{ background:rgba(255,255,255,.03); }
/* 並び替え見出し（△▽を廃し、見出しクリックで asc⇄desc。現在列は accent＋方向インジケータ） */
.adm-main th.sortable a{ display:inline-flex; align-items:center; gap:6px; color:#C7D0DC; cursor:pointer; user-select:none; }
.adm-main th.sortable a:hover{ color:var(--accent); }
.adm-main th.is-sorted a{ color:var(--accent); }
.adm-main th .sort_ind{ font-size:10px; line-height:1; color:var(--accent); }
/* No列（各一覧の先頭列）は数字3桁が既定で収まる幅を確保して詰まりを防ぐ */
.adm-main .admin_clientlist th:first-child,
.adm-main .admin_clientlist td:first-child,
.adm-main .admin_agentlist th:first-child,
.adm-main .admin_agentlist td:first-child,
.adm-main .admin_userlist th:first-child,
.adm-main .admin_userlist td:first-child,
.adm-main .admin_informationlist th:first-child,
.adm-main .admin_informationlist td:first-child{ min-width:64px; white-space:nowrap; }
/* お知らせ一覧：掲載日は改行させずフル表示（列を広げる）。タイトルはその分自動で狭まる */
.adm-main .admin_informationlist .date_td,
.adm-main .admin_informationlist th:nth-child(3){ white-space:nowrap; }

/* ボタン */
.adm-main .btn_submit,
.adm-main .link_btn_l,
.adm-main .link_btn_s,
.adm-main .btn-topcreate{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  background:var(--accent) !important; color:#111827 !important; border:1px solid var(--accent);
  border-radius:10px; font-weight:700; font-size:13px; line-height:1.2;
  padding:9px 16px; width:auto; text-decoration:none; cursor:pointer; transition:filter .15s; white-space:nowrap;
}
.adm-main .btn_submit:hover,
.adm-main .link_btn_l:hover,
.adm-main .link_btn_s:hover,
.adm-main .btn-topcreate:hover{ filter:brightness(1.06); background:var(--accent) !important; opacity:1; }
.adm-main .btn_delete{
  display:inline-flex; align-items:center; justify-content:center;
  background:transparent !important; color:#ff7d8f !important; border:1px solid rgba(240,87,107,.5) !important;
  border-radius:10px; font-weight:700; font-size:13px; padding:9px 14px; width:auto; height:auto; cursor:pointer; transition:all .15s; white-space:nowrap;
}
.adm-main .btn_delete:hover{ background:var(--bad) !important; color:#fff !important; border-color:var(--bad) !important; }
.adm-main .btn_return{
  display:inline-flex; align-items:center; gap:6px;
  background:var(--card-2) !important; color:var(--muted) !important; border:1px solid var(--line) !important;
  border-radius:10px; font-weight:700; font-size:13px; padding:9px 16px; text-decoration:none; cursor:pointer; transition:all .15s;
}
.adm-main .btn_return:hover{ background:var(--hover) !important; color:var(--ink) !important; }
.adm-main .btn_submit_block{ margin:14px 0; }

/* 上部アクションボタン（新規作成をトップバーに置く用） */
.adm-top .btn-topcreate{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  background:var(--accent); color:#111827; border:1px solid var(--accent);
  border-radius:10px; font-weight:700; font-size:13px; padding:9px 16px; text-decoration:none; cursor:pointer; transition:filter .15s; white-space:nowrap;
}
.adm-top .btn-topcreate:hover{ filter:brightness(1.06); }

/* フォーム入力 */
.adm-main .form_basic input[type=text],
.adm-main .form_basic input[type=email],
.adm-main .form_basic input[type=password],
.adm-main .form_basic input[type=number],
.adm-main .form_basic input[type=date],
.adm-main .form_basic select,
.adm-main .form_basic textarea,
.adm-main .input_text{
  width:100%; background:var(--field); color:var(--ink);
  border:1px solid var(--line-2); border-radius:10px; padding:10px 12px; font-size:14px; font-family:inherit;
}
.adm-main .form_basic input::placeholder,
.adm-main .input_text::placeholder{ color:var(--faint); }
.adm-main .form_basic input:focus,
.adm-main .form_basic select:focus,
.adm-main .form_basic textarea:focus,
.adm-main .input_text:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
/* 必須バッジ：実幅を持つピルにして easytips(ⓘ) との重なりを解消。common.css の "*"(::before) は打ち消す */
.adm-main .mark_must{ display:inline-block; vertical-align:middle; margin-left:8px; width:auto; height:auto; padding:1px 9px; border-radius:999px; background:var(--bad-soft); color:#ff9aa8; font-size:11px; font-weight:700; line-height:1.7; }
.adm-main .mark_must::before{ content:""; }
.adm-main .mark_must::after{ content:"必須"; }
.adm-main .easytips{ margin-left:6px; vertical-align:middle; }
/* easytips ツールチップの見切れ対策：フォームテーブル(basic_table)の wrapper クリップを解除し、
   吹き出しは「アイコン左端起点・下方向・幅クランプ」で開く。配色もダークテーマへ */
.adm-main .table_wrapper:has(.basic_table){ overflow:visible; }
.adm-main .easytips_body{
  left:0; right:auto; top:calc(100% + 8px); bottom:auto;
  width:max-content; max-width:min(340px, 60vw);
  background:var(--card); color:var(--ink); border:1px solid var(--line);
  box-shadow:0 12px 32px rgba(0,0,0,.5); border-radius:10px; font-size:12px; line-height:1.6;
}
.adm-main .easytips_body a{ color:var(--accent); text-decoration:underline; }
.adm-main .easytips::before{ display:none; }
/* アイコンと吹き出しの隙間をホバー継続の透明ブリッジで埋める＝吹き出し内リンク(取得方法はこちら等)をクリック可能に */
.adm-main .easytips_body::before{ content:""; position:absolute; left:0; right:0; top:-11px; height:11px; }

/* 補助テキスト・リンク */
.adm-main .count{ color:var(--muted); font-size:13px; margin:6px 0 14px; }
.adm-main .csvdownload{ margin-top:14px; }
.adm-main .csvdownload a,
.adm-main .underline{ color:var(--accent); font-weight:700; text-decoration:none; }
.adm-main .csvdownload a:hover,
.adm-main .underline:hover{ text-decoration:underline; }
.adm-main .size_s{ font-size:12px; color:var(--muted); }

/* 通知・エラー（CP の .notice と同じ小型バナー意匠。font-size は旧 admin.css の 1.2rem を打ち消す。5秒自動消去は outputFooter の JS） */
.adm-main .update_complete,
.adm-main .update_fail,
.adm-main .miss{ padding:12px 16px !important; border-radius:12px; font-weight:700; font-size:13px !important; margin-bottom:16px; text-align:left !important; line-height:1.5; }
.adm-main .update_complete{ background:var(--good-soft); color:#7ee6ad; border:1px solid rgba(47,191,113,.35); }
.adm-main .update_fail,
.adm-main .miss{ background:var(--bad-soft); color:#ff9aa8; border:1px solid rgba(240,87,107,.4); }
/* Place ID・食べログURLを保存したときの取得結果（admin_functions.php の review_check_box）。
   店名・住所を読んで取り違えを確かめてもらう枠なので、update_complete と違い自動では消さない（クラス名を分けて5秒消去の対象から外す） */
.adm-main .review-check{ padding:14px 18px; border-radius:12px; margin-bottom:16px; background:var(--card); border:1px solid var(--line-2); font-size:13px; line-height:1.6; }
.adm-main .review-check.is-fail{ background:var(--bad-soft); border-color:rgba(240,87,107,.4); }
.adm-main .review-check-title{ font-weight:700; font-size:14px; margin:0 0 8px; }
.adm-main .review-check.is-fail .review-check-title{ color:#ff9aa8; }
.adm-main .review-check-list{ display:grid; grid-template-columns:auto 1fr; gap:4px 16px; margin:0 0 8px; }
.adm-main .review-check-list dt{ color:var(--muted); white-space:nowrap; }
.adm-main .review-check-list dd{ margin:0; font-weight:700; overflow-wrap:anywhere; }
.adm-main .review-check-text{ margin:4px 0 0; }
.adm-main .review-check-warn{ margin:8px 0 0; padding:8px 12px; border-radius:8px; background:var(--bad-soft); color:#ff9aa8; font-weight:700; }
.adm-main .text_center{ text-align:center; }
.adm-main .text_orange{ color:var(--accent); }
.adm-main .bold{ font-weight:700; }

/* ステータス色分けピル（案件のステータス・代理店有効）。good=緑/info=青/warn=橙/bad=赤/muted=灰 */
.adm-main .stat-pill{ display:inline-block; padding:4px 13px; border-radius:999px; font-size:12px; font-weight:700; white-space:nowrap; line-height:1.5; }
.adm-main .stat-good{ background:var(--good-soft); color:#7ee6ad; }
.adm-main .stat-info{ background:rgba(88,150,255,.15); color:#8fb8ff; }
.adm-main .stat-warn{ background:rgba(247,148,30,.16); color:#f7b45a; }
.adm-main .stat-bad{ background:var(--bad-soft); color:#ff9aa8; }
.adm-main .stat-muted{ background:rgba(255,255,255,.08); color:#aeb8c4; }

/* ステータスピル（お知らせ 公開/下書き）。ピル自体が公開⇄下書きの切替ボタン */
.adm-main .status_pill{ display:inline-block; padding:5px 16px; border-radius:999px; font-size:12px; font-weight:700; white-space:nowrap; border:0; font-family:inherit; line-height:1.4; }
.adm-main .status_td{ white-space:nowrap; }
.adm-main .status_pill.on{ background:var(--good-soft); color:#7ee6ad; }
.adm-main .status_pill.off{ background:rgba(255,255,255,.10); color:#c7d0dc; }
.adm-main button.status_pill.status_toggle{ cursor:pointer; transition:filter .15s, box-shadow .15s; }
.adm-main button.status_pill.status_toggle:hover{ filter:brightness(1.1); box-shadow:0 0 0 3px rgba(255,255,255,.07); }
.adm-main button.status_pill.status_toggle:focus-visible{ outline:none; box-shadow:0 0 0 3px var(--accent-soft); }

/* モーダル（実オーバーレイは admin.css の .inner。暗色スクリム＋ダークカードへ） */
.modal_wrapper .inner{ background:rgba(0,0,0,.6) !important; display:flex; align-items:center; justify-content:center; min-height:100%; padding:20px; }
.modal_wrapper .box_white{ background:var(--card) !important; color:var(--ink) !important; border:1px solid var(--line) !important; border-radius:var(--radius); box-shadow:0 24px 60px rgba(0,0,0,.5); padding:26px; max-width:440px; width:100%; }

/* 行アクション「⋮」メニュー（ポップは JS で position:fixed 化＝テーブルの overflow に切られない） */
.adm-main .row-menu{ display:inline-block; position:relative; }
.adm-main .row-menu-btn{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; padding:0; border-radius:9px; border:1px solid var(--line-2); background:var(--card-2); color:var(--ink); font-size:19px; line-height:1; cursor:pointer; transition:all .15s; }
.adm-main .row-menu-btn:hover,
.adm-main .row-menu-btn[aria-expanded="true"]{ border-color:var(--accent); color:var(--accent); }
.row-menu-pop{ display:none; min-width:158px; background:var(--card); border:1px solid var(--line); border-radius:11px; box-shadow:0 16px 40px rgba(0,0,0,.5); padding:6px; }
.row-menu-pop.open{ display:block; }
.row-menu-pop a,
.row-menu-pop button{ display:flex; align-items:center; gap:9px; width:100%; text-align:left; padding:9px 12px; border-radius:8px; background:transparent; border:0; color:#C7D0DC; font-size:13px; font-weight:700; font-family:inherit; line-height:1.3; cursor:pointer; text-decoration:none; }
.row-menu-pop a:hover,
.row-menu-pop button:hover{ background:var(--hover); color:var(--ink); }
.row-menu-pop a svg,
.row-menu-pop button svg{ width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:1.8; flex:none; }
.row-menu-pop .rm-del{ color:#ff7d8f; }
.row-menu-pop .rm-del:hover{ background:var(--bad); color:#fff; }

/* リンク列アイコン（お知らせ一覧） */
.adm-main .link-icon{ display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:8px; color:var(--accent); }
.adm-main .link-icon:hover{ background:var(--accent-soft); }
.adm-main .link-icon svg{ width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:1.8; }
.adm-main .link-none{ color:var(--faint); }

/* 番号付きページャ */
.adm-main .adm-pager{ margin-top:18px; }
.adm-main .adm-pager ul{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:6px; justify-content:center; align-items:center; }
.adm-main .adm-pager .pg{ display:inline-flex; align-items:center; justify-content:center; min-width:36px; height:36px; padding:0 10px; border-radius:9px; border:1px solid var(--line-2); background:var(--card-2); color:#C7D0DC; font-size:13px; font-weight:700; text-decoration:none; transition:all .15s; }
.adm-main .adm-pager a.pg:hover{ border-color:var(--accent); color:var(--accent); }
.adm-main .adm-pager .pg.current{ background:var(--accent); border-color:var(--accent); color:#111827; cursor:default; }
.adm-main .adm-pager .pg-gap{ color:var(--faint); padding:0 4px; }

/* 登録情報ページ：値の下に変更ボタンを縦積み＋ボタン小型化。行の余白を詰める */
.adm-main .td_loginPW,
.adm-main .td_mailAddress{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding-top:9px !important; padding-bottom:9px !important; }
.adm-main .td_loginPW .btn_submit,
.adm-main .td_mailAddress .btn_submit{ font-size:12px; padding:5px 12px; }

/* パスワード変更画面：注意書きを小さく、入力欄どうしの余白を広げる */
.admin_password_change .login_table td .text_left{ font-size:12px; color:var(--muted); margin-top:8px; line-height:1.5; }
.admin_password_change .login_table th,
.admin_password_change .login_table td{ padding-top:14px !important; padding-bottom:20px !important; }
/* フォーム/詳細テーブル(basic_table)のラベル列(1列目)を240pxに統一（登録情報・各編集フォーム。全幅化での間延び防止） */
.adm-main .basic_table th{ width:240px; }

/* validationEngine の必須ツールチップ(.formError「* 必須項目です」)を CP のアラート意匠へ。
   validationEngine.jquery.css が admin_v2.css より後に読み込まれるため !important で上書き */
.formError .formErrorContent{
  background:var(--bad) !important; border:0 !important; border-radius:10px !important;
  box-shadow:0 8px 24px rgba(240,87,107,.40) !important;
  color:#fff !important; font-size:12px !important; font-weight:700 !important;
  padding:8px 13px !important; line-height:1.5 !important;
}
.formError .formErrorArrow div{ background:var(--bad) !important; border:0 !important; box-shadow:none !important; }
/* inline 配置時：矢印を隠し、項目直後に自然に並べる（絶対配置の誤配置を回避） */
.formError.inline{ position:relative !important; top:0 !important; left:0 !important; margin:7px 0 2px !important; display:inline-block; }
.formError.inline .formErrorArrow{ display:none !important; }

/* サーバー種別バッジ（stg/local） */
.adm-servername-badge{ display:inline-block; background:var(--accent-soft); color:var(--accent); font-weight:700; font-size:11px; padding:3px 10px; border-radius:999px; }

/* ============================================================
   レスポンシブ（≤900px はロゴ＋アバターの上部バー＋フッター固定ナビ。CP と同じ構成）
   ============================================================ */
@media(max-width:900px){
  .adm-app{ grid-template-columns:1fr; }
  /* 上部バーはロゴとユーザーメニュー。ナビは CP と同じくフッター固定へ出す（横スクロールで探させない） */
  .adm-sidebar{ flex-direction:row; align-items:center; justify-content:space-between; gap:8px; padding:12px 14px; border-right:none; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20; }
  .adm-sidebar .adm-brand{ flex:none; }
  .adm-sidebar .adm-servername{ display:none; }
  /* ユーザーメニューはロゴ行へ（CP と同じ）。上部ツールバー側は隠し、名前テキストは出さない */
  .adm-m-usermenu{ display:block; flex:none; }
  .adm-top .adm-tools .adm-usermenu{ display:none; }

  /* フッター固定ナビ（CP の .botnav と同じ意匠）。
     項目数は権限で3〜5個に変わるため、固定列数ではなく auto-columns で等分する。
     z-index はモーダル(.modal_wrapper=20)と同値にし、DOM順で必ずモーダルが上に来るようにする。 */
  .adm-nav{
    position:fixed; left:0; right:0; bottom:0;
    display:grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:0;
    background:var(--sidebar); border-top:1px solid var(--line);
    padding:8px 4px calc(8px + env(safe-area-inset-bottom));
    z-index:20;
  }
  .adm-nav a{ flex-direction:column; align-items:center; justify-content:center; gap:4px;
    padding:4px 2px; border-radius:0; font-size:10.5px; white-space:nowrap; min-width:0; }
  .adm-nav a svg{ width:22px; height:22px; }
  /* 狭幅端末では最長ラベル(「管理ユーザー」「お知らせ管理」=6文字)がセル幅を超えて隣と重なるため字を詰める。
     320px でセル実効 58.4px に対し 6文字×10.5px=63px → 9.5px(57px)で収める。 */
  @media(max-width:360px){
    .adm-nav a{ font-size:9.5px; letter-spacing:-.02em; gap:3px; }
    .adm-nav a svg{ width:20px; height:20px; }
  }
  /* 選択中は塗りつぶさず文字色だけ（CP と同じ） */
  .adm-nav a.on{ background:transparent; }
  .adm-nav a:hover{ background:transparent; }

  /* 本文がフッターナビに隠れないよう下部に余白 */
  .adm-main{ padding:18px 16px 96px; }
}

/* ============================================================
   一覧のキーワード検索・見出しの絞り込み（4 一覧共通。admin_functions.php の list* 関数が出力）
   一覧は .form_basic の中にあるため、common.css の古いフォーム規則（チェックボックスを隠す・label を幅100%にする等）が
   ポップの中にも当たる。打ち消しは .adm-main .form_basic .th-filter-pop の詳細度で書き、読み込み順に依存させない。
   ============================================================ */
/* 検索欄＋ボタン */
.adm-main .list-toolbar{ display:flex; gap:8px; align-items:center; margin:0 0 12px; max-width:560px; }
.adm-main .form_basic .list-toolbar .list-q{ flex:1 1 auto; min-width:0; width:auto; margin:0; }
.adm-main .list-toolbar .list-q::-webkit-search-cancel-button{ filter:invert(.7); }
.adm-main .list-toolbar .list-q-btn{ flex:none; }

/* 絞り込み中のチップ */
.adm-main .list-active{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin:0 0 10px; font-size:12.5px; color:var(--muted); }
.adm-main .list-active-lbl{ font-weight:700; }
.adm-main .list-chip{ display:inline-flex; align-items:center; gap:4px; max-width:100%; padding:3px 4px 3px 10px; border-radius:999px; background:var(--accent-soft); color:var(--ink); line-height:1.5; overflow-wrap:anywhere; }
.adm-main .list-chip-x{ display:inline-flex; align-items:center; justify-content:center; flex:none; width:24px; height:24px; border-radius:50%; color:var(--accent); font-weight:700; text-decoration:none; }
.adm-main .list-chip-x:hover{ background:rgba(247,148,30,.25); }
.adm-main .list-clear{ color:var(--accent); font-weight:700; text-decoration:none; }
.adm-main .list-clear:hover{ text-decoration:underline; }

/* 0 件の行・未設定の値 */
.adm-main .list-empty td{ text-align:center; color:var(--muted); padding:22px 12px !important; }
.adm-main .list-empty .list-clear{ margin-left:8px; }
.adm-main .cell-unset{ color:var(--faint); }

/* 見出しの絞り込みボタン（並び替えリンクの右隣に置く） */
/* 一覧の表は列幅を固定する（admin_functions.php の listTableOpenHtml が <colgroup> と最小幅を出す）。
   列幅が中身ではなく指定だけで決まるので、並び替え・ページ送り・絞り込みで行が入れ替わっても列幅が動かない（2026-10-20 ユーザー決定）。
   見出しは文言・並び替え・絞り込みを 1 行に並べる（th は nowrap のまま。列幅は 1 行に収まるように決めてある）。
   #109 で入れた「文言とボタンの間で折り返す」規則は、この固定幅に置き換えた */
.adm-main table.list-fixed{ table-layout:fixed; }
/* 固定幅の列に収まらない長い値（アカウント ID・URL・メールアドレスなど）はセルの中で折り返す */
.adm-main table.list-fixed td{ overflow-wrap:anywhere; }
.adm-main th .th-filter{ display:inline-block; vertical-align:middle; margin-left:2px; }
.adm-main th .th-filter > summary{ display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:7px; color:var(--faint); cursor:pointer; list-style:none; }
.adm-main th .th-filter > summary::-webkit-details-marker{ display:none; }
.adm-main th .th-filter > summary::marker{ content:""; }
.adm-main th .th-filter > summary:hover,
.adm-main th .th-filter[open] > summary{ background:var(--hover); color:var(--ink); }
.adm-main th .th-filter > summary:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
.adm-main th .th-filter.is-filtered > summary{ color:var(--accent); }
.adm-main th .th-filter > summary svg{ width:15px; height:15px; fill:currentColor; stroke:none; }
.adm-main th .th-filter.is-filtered > summary svg{ fill:currentColor; }

/* ポップ。JS が無いときは見出しの中にそのまま展開する（見づらいが操作はできる） */
.adm-main .form_basic .th-filter-pop{
  width:min(280px, calc(100vw - 16px)); margin-top:6px; padding:10px;
  background:var(--card); border:1px solid var(--line); border-radius:11px; box-shadow:0 16px 40px rgba(0,0,0,.5);
  white-space:normal; text-align:left; font-weight:400; font-size:13px; color:var(--ink);
}
/* JS あり：位置を計算するまでは見せず、表の横スクロールで切られないよう fixed で浮かせる（⋮メニューと同じ理由） */
.has-listfilter .adm-main .form_basic .th-filter-pop{ position:fixed; z-index:60; margin:0; visibility:hidden; overflow-y:auto; }
.has-listfilter .adm-main .form_basic .th-filter-pop.is-placed{ visibility:visible; }
.adm-main .form_basic .th-filter-pop label{ display:flex; align-items:center; gap:8px; width:auto; margin:0; padding:6px 4px; border-radius:6px; line-height:1.4; cursor:pointer; }
.adm-main .form_basic .th-filter-pop label:hover{ background:var(--hover); }
.adm-main .form_basic .th-filter-pop label input{ margin:0; }
.adm-main .form_basic .th-filter-pop input[type=checkbox]{ visibility:visible; position:static; flex:none; width:16px; height:16px; accent-color:var(--accent); }
.adm-main .form_basic .th-filter-pop input[type=checkbox]:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; box-shadow:none; }
.adm-main .form_basic .th-filter-pop .th-filter-date{ display:flex; flex-direction:column; align-items:stretch; gap:4px; color:var(--muted); font-size:12px; font-weight:700; }
.adm-main .form_basic .th-filter-pop .th-filter-date:hover{ background:transparent; }
.adm-main .form_basic .th-filter-pop input[type=date]{ width:100%; margin:0; padding:7px 10px; font-size:13px; }
.adm-main .form_basic .th-filter-pop .th-filter-apply{ width:100%; margin-top:8px; }
.adm-main th .th-filter-pop a.th-filter-clear{ display:block; margin-top:8px; text-align:center; color:var(--accent); font-weight:700; font-size:12.5px; text-decoration:none; user-select:auto; cursor:pointer; }
.adm-main th .th-filter-pop a.th-filter-clear:hover{ text-decoration:underline; }

@media(max-width:900px){
  .adm-main .list-toolbar{ max-width:none; }
}
