/* ivr-gemini-bridge-v2-cf 管理画面 SPA スタイル
   モック（Docs/管理画面モック_v0.1.html）の <style> ブロックを忠実に移植したもの。
   末尾の「実装追加分」セクションのみ、実データ結線に必要な最小限のクラスを追加している。 */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family:"LINE Seed JP","Hiragino Sans","Noto Sans JP",sans-serif;
  background:linear-gradient(135deg,#dbeafe 0%,#eff6ff 45%,#f0f9ff 100%);
  min-height:100vh; color:#1e293b; display:flex; font-size:14px;
}
/* ===== sidebar ===== */
aside {
  width:230px; min-width:230px; background:linear-gradient(180deg,#1d4ed8,#1e40af);
  color:#fff; position:sticky; top:0; height:100vh; padding:20px 0; overflow-y:auto;
}
.brand { padding:0 18px 16px; border-bottom:1px solid rgba(255,255,255,.2); margin-bottom:14px; }
.brand h1 { font-size:15px; font-weight:700; line-height:1.4; }
.brand small { opacity:.75; font-size:11px; display:block; margin-top:4px; }
.mockband { background:#f59e0b; color:#78350f; font-size:11px; font-weight:700; text-align:center; padding:3px 0; margin:0 18px 12px; border-radius:6px; }
.nav-item { display:block; padding:10px 18px; color:#dbeafe; text-decoration:none; cursor:pointer; border-left:3px solid transparent; font-size:13px; }
.nav-item:hover { background:rgba(255,255,255,.08); }
.nav-item.active { background:rgba(255,255,255,.14); color:#fff; border-left-color:#93c5fd; font-weight:700; }
/* ===== main ===== */
main { flex:1; padding:26px 32px 60px; max-width:1200px; }
.screen { display:none; }
.screen.active { display:block; }
h2 { font-size:20px; margin-bottom:4px; color:#1e3a8a; }
.sub { color:#64748b; font-size:12px; margin-bottom:18px; }
.card { background:#fff; border-radius:12px; box-shadow:0 2px 10px rgba(30,64,175,.08); padding:20px 22px; margin-bottom:18px; }
.card h3 { font-size:14px; color:#1d4ed8; margin-bottom:12px; padding-bottom:8px; border-bottom:2px solid #eff6ff; }
/* table */
table { width:100%; border-collapse:collapse; font-size:13px; }
th { text-align:left; color:#64748b; font-weight:700; font-size:11px; padding:8px 10px; border-bottom:2px solid #e2e8f0; white-space:nowrap; }
td { padding:10px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
tr:hover td { background:#f8fafc; }
/* badges & buttons */
.badge { display:inline-block; font-size:11px; font-weight:700; padding:2px 9px; border-radius:999px; white-space:nowrap; }
.b-on   { background:#dcfce7; color:#166534; }
.b-off  { background:#f1f5f9; color:#94a3b8; }
.b-conv { background:#fef3c7; color:#92400e; }
.b-blue { background:#dbeafe; color:#1d4ed8; }
.b-red  { background:#fee2e2; color:#b91c1c; }
.btn { display:inline-block; border:none; border-radius:8px; padding:8px 16px; font-size:13px; font-weight:700; cursor:pointer; font-family:inherit; }
.btn-primary { background:#2563eb; color:#fff; }
.btn-primary:hover { background:#1d4ed8; }
.btn-ghost { background:#eff6ff; color:#1d4ed8; }
.btn-sm { padding:4px 12px; font-size:12px; border-radius:6px; }
/* forms */
label.f { display:block; font-size:12px; font-weight:700; color:#475569; margin:12px 0 4px; }
input[type=text], input[type=password], select, textarea {
  width:100%; border:1px solid #cbd5e1; border-radius:8px; padding:8px 10px;
  font-size:13px; font-family:inherit; background:#fff; color:#1e293b;
}
textarea { resize:vertical; }
.mono { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:12px; }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:0 24px; }
.row3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:0 24px; }
.hint { font-size:11px; color:#94a3b8; margin-top:4px; }
.counter { text-align:right; font-size:11px; color:#2563eb; font-weight:700; margin-top:4px; }
/* toggle */
.toggle-line { display:flex; align-items:center; gap:10px; margin:6px 0 2px; }
.tgl { position:relative; width:40px; height:22px; background:#cbd5e1; border-radius:999px; cursor:pointer; transition:.15s; flex:none; }
.tgl.on { background:#2563eb; }
.tgl::after { content:""; position:absolute; top:2px; left:2px; width:18px; height:18px; background:#fff; border-radius:50%; transition:.15s; }
.tgl.on::after { left:20px; }
.tgl-label { font-size:13px; font-weight:700; }
fieldset.dep { border:1px dashed #cbd5e1; border-radius:10px; padding:4px 16px 14px; margin-top:10px; }
fieldset.dep.disabled { opacity:.45; pointer-events:none; }
fieldset.dep legend { font-size:11px; color:#94a3b8; padding:0 6px; }
/* chips */
.chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.chip { background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe; border-radius:999px; padding:3px 10px; font-size:12px; font-weight:700; }
.chip s { text-decoration:none; margin-left:6px; color:#93c5fd; cursor:pointer; }
/* custom_vocabulary は 2 列固定（ズラッと横流しにしない） */
.chips.cols2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; max-width:560px; }
.chips.cols2 .chip { display:flex; justify-content:space-between; align-items:center; border-radius:8px; padding:5px 12px; }
.copybar { display:flex; justify-content:space-between; align-items:center; margin:14px 0 6px; }
.copybar span { font-size:12px; font-weight:700; color:#475569; }
.itabs { display:flex; gap:6px; margin-top:6px; }
.itab { padding:6px 16px; border-radius:8px; background:#eff6ff; color:#1d4ed8; font-weight:700; font-size:12px; cursor:pointer; }
.itab.active { background:#2563eb; color:#fff; }
.warn { background:#fffbeb; border:1px solid #fcd34d; border-radius:8px; padding:10px 12px; font-size:12px; color:#92400e; margin-top:8px; line-height:1.6; }
/* logs */
.filterbar { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; margin-bottom:14px; }
.filterbar > div { min-width:150px; }
.call-group td.callhead { background:#f0f7ff; font-weight:700; color:#1e40af; font-size:12px; }
.detail-row td { background:#f8fafc; padding:16px; }
.kv { display:grid; grid-template-columns:130px 1fr; gap:4px 12px; font-size:12px; margin-bottom:10px; }
.kv dt { color:#64748b; font-weight:700; }
.kv dd { color:#1e293b; }
.word { display:inline-block; background:#fff; border:1px solid #dbeafe; border-radius:6px; padding:2px 7px; margin:2px; font-size:11px; }
.word small { color:#94a3b8; display:block; font-size:9px; }
.jsonbox { background:#0f172a; color:#e2e8f0; border-radius:8px; padding:12px 14px; font-size:12px; overflow-x:auto; white-space:pre; }
.note { font-size:11px; color:#64748b; background:#f8fafc; border-radius:8px; padding:8px 12px; margin-top:10px; line-height:1.7; }
.toolbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }

/* ===== 実装追加分（実データ結線に伴う最小限の追加。既存クラスは一切変更していない） ===== */
/* エラー表示（.warn の赤系版。ログイン失敗・API エラー等） */
.alert-err { background:#fef2f2; border:1px solid #fecaca; border-radius:8px; padding:10px 12px; font-size:12px; color:#b91c1c; margin-top:12px; line-height:1.6; }
.alert-err:empty { display:none; }
/* 削除系ボタン（アカウント削除など） */
.btn-danger { background:#fee2e2; color:#b91c1c; }
.btn-danger:hover { background:#fecaca; }
.btn[disabled] { opacity:.5; cursor:not-allowed; }
/* 録音中インジケータ（テストコンソール） */
.btn.recording { background:#dc2626; }
.btn.recording:hover { background:#b91c1c; }
/* 入力バリデーションエラー（si_id 形式など） */
.hint.err { color:#b91c1c; }
/* 空/読込中の行 */
.empty-row { text-align:center; color:#94a3b8; padding:20px; }
/* スキーマ「編集済み」バッジまわりの間隔調整用 */
.copybar .badge { margin-left:8px; }
