/* 出張の作成(2ステップ)・編集フォームの共通スタイル */
.tf-steps { display: flex; gap: 8px; margin: 0 0 14px; }
.tf-step { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border-light);
  border-radius: var(--radius-sm, 6px); font-size: 12.5px; color: var(--text-muted); background: var(--bg); }
.tf-step b { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--border-light); color: var(--text-muted); font-size: 11px; flex-shrink: 0; }
.tf-step.active { border-color: #2563eb; color: var(--text); font-weight: 700; background: #eff6ff; }
.tf-step.active b { background: #2563eb; color: #fff; }
.tf-step.done b { background: #16a34a; color: #fff; }
.tf-seg { display: inline-flex; border: 1px solid var(--border-light); border-radius: var(--radius-sm, 6px); overflow: hidden; }
.tf-seg label { margin: 0; }
.tf-seg input { position: absolute; opacity: 0; pointer-events: none; }
.tf-seg span { display: block; padding: 8px 20px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-muted); background: var(--bg); }
.tf-seg input:checked + span { background: #2563eb; color: #fff; }
.tf-seg input:focus-visible + span { outline: 2px solid #93c5fd; outline-offset: -2px; }
.tf-staff { display: flex; flex-wrap: wrap; gap: 8px; }
.tf-staff-item { margin: 0; }
.tf-staff-item input { position: absolute; opacity: 0; pointer-events: none; }
.tf-staff-item span { display: inline-block; padding: 8px 14px; border: 1px solid var(--border-light); border-radius: 999px;
  font-size: 13px; cursor: pointer; background: var(--bg); color: var(--text); min-height: 36px; box-sizing: border-box; }
.tf-staff-item input:checked + span { background: #dbeafe; border-color: #2563eb; color: #1d4ed8; font-weight: 700; }
.tf-staff-item input:focus-visible + span { outline: 2px solid #93c5fd; }
.tf-hint { font-size: 11.5px; color: var(--text-muted); margin: 4px 0 0; }
.tf-warn { font-size: 12px; color: #b45309; margin: 4px 0 0; }
.tf-bd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tf-bd { display: flex; flex-direction: column; gap: 3px; }
.tf-bd label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.tf-bd input, .tf-block input, .tf-block select, .tf-block textarea { font: inherit; font-size: 13px; padding: 7px 9px; width: 100%; box-sizing: border-box;
  border: 1px solid var(--border-light); border-radius: var(--radius-sm, 6px); background: var(--bg); color: var(--text); }
.tf-ai { border: 1px dashed #93c5fd; border-radius: var(--radius-sm, 6px); padding: 10px; background: #f8fbff; display: flex; flex-direction: column; gap: 8px; }
.tf-ai-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tf-missing { font-size: 12px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 8px 10px; }
.tf-missing ul { margin: 4px 0 0 18px; padding: 0; }
.tf-legacy { font-size: 12px; color: var(--text-muted); border-top: 1px dashed var(--border-light); padding-top: 8px; margin-top: 4px; }
.tf-step-panel[hidden] { display: none !important; }
@media (max-width: 640px) {
  .tf-bd-grid { grid-template-columns: 1fr; }
  .tf-steps { gap: 6px; }
  .tf-step { padding: 7px 8px; font-size: 12px; }
  .tf-actions-sticky { position: sticky; bottom: 0; background: var(--panel-bg); padding: 10px 0 2px; margin-top: 12px; border-top: 1px solid var(--border-light); }
}
/* class側のdisplay指定が[hidden]属性に勝つ落とし穴の回避 */
.bt-btn[hidden], .bt-field[hidden], .tf-block [hidden] { display: none !important; }
/* 大まかな計画(日別カード) */
.tf-plan { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tf-plan-inline { padding: 0 12px 8px; }
.tf-plan-actions { display: flex; align-items: center; gap: 10px; padding: 0 14px 14px; }
.tf-plan-day { border: 1px solid var(--border-light); border-radius: var(--radius-sm, 6px); background: var(--bg); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.tf-plan-head { font-size: 12.5px; font-weight: 700; color: var(--text); margin: 0; }
.tf-plan-day textarea { resize: vertical; min-height: 42px; max-height: 320px; width: 100%; box-sizing: border-box; line-height: 1.6; overflow-y: hidden; }
@media (max-width: 640px) { .tf-plan { grid-template-columns: 1fr; } .tf-plan-day textarea { min-height: 46px; font-size: 16px; } }
/* 出張詳細の大まかな計画 */
.plan-card { border: 1px solid var(--border-light); border-radius: var(--radius-md, 10px); background: var(--panel-bg); margin: 0 0 12px; }
.plan-card > summary { cursor: pointer; padding: 10px 14px; font-size: 13.5px; font-weight: 700; list-style: none; }
.plan-card > summary::-webkit-details-marker { display: none; }
.plan-card > summary::before { content: '▸'; display: inline-block; margin-right: 8px; color: var(--text-muted); font-size: 12px; transition: transform .15s; }
.plan-card[open] > summary::before { transform: rotate(90deg); }
.plan-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px 12px; }
.plan-day { border: 1px solid var(--border-light); border-radius: var(--radius-sm, 6px); background: var(--bg); padding: 8px 10px; }
.plan-day-head { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.plan-day-body { font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.plan-day-empty { font-size: 12px; color: var(--text-faint, var(--text-muted)); }
@media (max-width: 640px) { .plan-days { grid-template-columns: 1fr; } }
/* 全体計画(大まかな計画タブの先頭、2026-10-03) */
.tf-plan-overview { display: flex; flex-direction: column; gap: 6px; padding: 0 14px 12px; }
.tf-plan-overview textarea { resize: vertical; min-height: 64px; max-height: 420px; width: 100%; box-sizing: border-box; line-height: 1.6; }
.plan-overview { margin: 0 14px 10px; padding: 8px 10px; border: 1px solid var(--border-light); border-radius: var(--radius-sm, 6px); background: var(--bg); }
.plan-overview .plan-day-body { white-space: pre-wrap; }
/* メンバーごとの役職ボタン(役員／従業員)。選んだ人にだけ出す */
.tf-staff-cell { display: inline-flex; align-items: center; gap: 6px; }
.tf-role { display: none; border: 1px solid var(--border-light); border-radius: 999px; overflow: hidden; }
.tf-staff-cell.is-on .tf-role { display: inline-flex; }
.tf-role-btn { border: 0; background: var(--bg); color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 600; padding: 6px 11px; min-height: 36px; cursor: pointer; }
.tf-role-btn[aria-pressed=true].tf-role-officer { background: #6d28d9; color: #fff; }
.tf-role-btn[aria-pressed=true].tf-role-staff { background: #475569; color: #fff; }
.tf-officer-note { font-size: 12px; margin: 8px 0 0; padding: 7px 10px; border-radius: 8px; background: #f1f5f9; color: #475569; }
.tf-officer-note.is-child { background: #f3e8ff; color: #581c87; font-weight: 600; }
