@charset "UTF-8";
/* ============================================================
   YOGA FIRE ｜ ベースレイヤー
   ワイヤーフレーム各画面の <style> に重複していた共通部分を集約したもの。
   yogafire.css より先に読み込むこと（yogafire.css が後勝ちで上書きする）。
   ============================================================ */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 14px;
  color: #333;
  background: #f2f2f2;
}

.box {
  border: 1px solid #999;
  background: #fff;
}
.dashed {
  border: 1px dashed #999;
}
.login-sub, .error {
  font-size: 11px;
  color: #003399;
}

/* ------------------------------------------------------------
   ヘッダー
   ------------------------------------------------------------ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #999;
}
.logo { font-weight: bold; }
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.admin-badge {
  border: 1px solid #666;
  background: #666;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
}

/* ------------------------------------------------------------
   レイアウト
   ------------------------------------------------------------ */
.layout {
  display: flex;
  min-height: calc(100vh - 49px);
}
.sidebar {
  width: 200px;
  background: #fff;
  border-right: 1px solid #999;
  padding: 16px 0;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 10px 20px; border-bottom: 1px solid #e0e0e0; }
.sidebar li a { display: block; margin: -10px -20px; padding: 10px 20px; }
.sidebar li.current { background: #e6e6e6; font-weight: bold; }
.sidebar a { text-decoration: none; color: inherit; }
.sidebar .group {
  padding: 12px 20px 4px;
  font-size: 11px;
  color: #888;
  border: none;
}
.main { flex: 1; padding: 20px; }

h1 { font-size: 18px; margin: 0 0 16px; }
h2 { font-size: 15px; margin: 0 0 10px; }

.breadcrumb {
  font-size: 12px;
  color: #003399;
  margin-bottom: 8px;
}
.breadcrumb a { color: #003399; }

/* ------------------------------------------------------------
   カード・ボタン
   ------------------------------------------------------------ */
.card {
  border: 1px solid #999;
  background: #fff;
  padding: 16px;
  margin-bottom: 16px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.card-head h2 { margin: 0; }

.btn {
  display: inline-block;
  border: 1px solid #666;
  background: #ddd;
  padding: 8px 20px;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.btn-block { display: block; width: 100%; }
a.btn { text-decoration: none; color: inherit; }
a.btn-primary { color: #fff; }
.btn-primary { background: #666; color: #fff; }
.btn-sm { padding: 4px 12px; font-size: 12px; }

.badge {
  display: inline-block;
  border: 1px solid #666;
  background: #fff;
  font-size: 10px;
  padding: 1px 6px;
}
.badge-fill { border: 1px solid #666; background: #666; color: #fff; }
.badge-off { border: 1px solid #bbb; background: #f2f2f2; color: #888; }
.badge-alert { border: 1px solid #c00; background: #fff; color: #c00; font-weight: bold; }
.alert { color: #c00; }

/* ------------------------------------------------------------
   フォーム
   ------------------------------------------------------------ */
label { display: block; margin-bottom: 4px; font-size: 13px; }
input[type=text], input[type=password], select, textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #999;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
}
textarea { height: 70px; }
/* WF-19 のプロンプト入力欄。数行の文章をそのまま書くので通常の textarea より高くする。 */
textarea.prompt-area { height: 260px; line-height: 1.8; }
.field { margin-bottom: 14px; }
.required {
  border: 1px solid #666;
  font-size: 10px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: 1px;
}
.form-section {
  border-top: 1px dashed #999;
  padding-top: 14px;
  margin-top: 6px;
}
/* WF-17 の記録ダイアログの「記録の種類」。選択肢（.kind）を縦に並べる箱。
   「変更済を記録」は選ぶものが無いので、同じ見た目の文を1行置く。 */
.kind-box {
  border: 1px solid #999;
  background: #eee;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.kind-box .kind {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.5;
}
.kind-box .kind:last-child { margin-bottom: 0; }
.kind-box input[type=radio] { margin-right: 4px; }
/* WF-17「出品を記録」ダイアログの商品ページURL欄。ホストと店舗のパス
   （https://item.rakuten.co.jp/my-shop/）は入力させず、欄の前後に固定表示する。 */
.url-inline { display: flex; flex-wrap: wrap; align-items: stretch; gap: 5px; }
.url-inline input[type=text] { flex: 1 1 140px; min-width: 0; }
.url-inline .url-fixed {
  border: 1px solid #999;
  background: #eee;
  color: #333;
  padding: 8px 5px;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}
/* URLを丸ごと貼られたときは固定部分を使わないので、効いていないことを見せる。 */
.url-inline.url-pasted .url-fixed { background: #f6f6f6; color: #aaa; }
.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid #999;
  padding-top: 16px;
  margin-top: 4px;
}

/* ------------------------------------------------------------
   タブ（WF-09 ターゲットショップ登録の「ショップ一覧／ショップグループ」）
   ------------------------------------------------------------ */
.mode-tabs {
  display: flex;
  gap: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}
.mode-tabs a {
  border: 1px solid #999;
  border-right: none;
  border-bottom: none;
  background: #e6e6e6;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  margin-bottom: -1px;
  text-decoration: none;
  color: inherit;
}
.mode-tabs a:last-child { border-right: 1px solid #999; }
.mode-tabs a.current {
  background: #fff;
  font-weight: bold;
  padding-bottom: 9px;
}
.tab-panel {
  border: 1px solid #999;
  background: #fff;
  padding: 16px;
  margin-bottom: 16px;
}

/* ------------------------------------------------------------
   テーブル
   ------------------------------------------------------------ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  border: 1px solid #999;
  padding: 6px 8px;
  text-align: left;
}
th { background: #e6e6e6; }
td.center, th.center { text-align: center; }
/* WF-18 一覧の「プロンプト（先頭3行）」。1行ずつ div で出す。 */
.prompt-excerpt { font-size: 12px; line-height: 1.6; }
.head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.head-row h3 { font-size: 14px; margin: 0; }

/* ------------------------------------------------------------
   その他
   ------------------------------------------------------------ */
.row { display: flex; gap: 16px; }
.col { flex: 1; }

.placeholder {
  border: 1px dashed #999;
  background: #fafafa;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  font-size: 12px;
}

.stats { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; max-width: 1200px; }
.stats .stat { min-width: 180px; }
.stat {
  flex: 1;
  border: 1px solid #999;
  background: #fff;
  padding: 14px 16px;
}
.stat .stat-label { font-size: 12px; color: #666; margin-bottom: 6px; }
.stat .stat-num { font-size: 26px; font-weight: bold; line-height: 1.1; }
.stat .stat-unit { font-size: 12px; font-weight: normal; margin-left: 2px; }
.stat .stat-sub { font-size: 11px; color: #666; margin-top: 6px; }
.stat .stat-link { margin-top: 10px; }

.pager {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
}
.pager a, .pager span { margin: 0 4px; }
.pager a { color: #003399; }
.pager .pager-off { color: #999; }
.pager .pager-current { font-weight: bold; }

/* 処理結果の通知（登録・更新・削除／入力エラー） */
.flash {
  border: 1px solid #666;
  background: #fff;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 13px;
}
.flash-error { border-color: #c00; color: #c00; }

.inline-form { display: inline; }
.inline-form button { font-family: inherit; }
.note { font-size: 11px; color: #666; margin-top: 6px; }

/* ------------------------------------------------------------
   モーダル（WF-09-3「ショップを追加」）
   .modal は全画面オーバーレイ、中身の箱が .modal-box。
   ------------------------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  display: none;
  /* 中身が画面より高いときは**ダイアログごと縦にスクロールする**。
     align-items: center のままだと上側がはみ出して、×もキャンセルも押せなくなる。
     収まるときに縦中央へ置くのは .modal-box の margin: auto（flex の自動マージン）。 */
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  z-index: 50;
}
.modal.open { display: flex; }
/* 縦中央に置くのはこの auto マージン（align-items より強い）。
   **フレックスの子は .modal-box ではなく、それを包む form** のことがあるので、
   .modal-box ではなく直下の子に当てる。 */
.modal > * { margin: auto; max-width: 100%; }
.modal-box {
  background: #fff;
  border: 2px solid #666;
  width: 440px;
  max-width: 100%;
  padding: 18px;
}
.modal-box.wide { width: 620px; }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.modal-head h2 { margin: 0; }
.modal-head small { display: block; font-size: 11px; color: #666; margin-top: 3px; }
.modal-close {
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.modal-box .form-actions { margin-top: 0; }

.searchrow { display: flex; gap: 8px; margin-bottom: 10px; }
.searchrow input { flex: 1; }
.searchrow select { width: 180px; }
.add-result {
  height: 280px;
  overflow-y: auto;
  border: 1px solid #ccc;
  margin-bottom: 8px;
}
.add-result label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 7px 10px;
  margin: 0;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
}
.add-result label.disabled { background: #fafafa; color: #888; cursor: not-allowed; }
.add-result input[type=checkbox] { width: auto; margin-top: 2px; }
.add-result .empty { padding: 10px; color: #888; font-size: 12px; line-height: 1.8; }
.add-count { font-size: 12px; color: #666; margin-bottom: 12px; }

.todo-list { border-top: 1px solid #e0e0e0; }
.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}
.todo-item .todo-text { flex: 1; }

/* ------------------------------------------------------------
   提案実行の状況（WF-29）
   進捗バー・状態の帯・明細の絞り込みチップ。
   ------------------------------------------------------------ */
.page-status, .from-history {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #999;
  padding: 8px 10px;
  font-size: 12px;
  margin-bottom: 16px;
}
.page-status { background: #fff; }
.page-status-id { margin-left: auto; color: #666; }
.from-history { background: #eee; }

.prog-main { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 10px; }
.prog-pct { font-size: 30px; font-weight: bold; line-height: 1; }
.prog-count { font-size: 13px; color: #666; }
.prog-bar {
  display: block;
  height: 14px;
  border: 1px solid #999;
  background: #fff;
  overflow: hidden;
  margin-bottom: 6px;
}
.prog-fill { display: block; height: 100%; background: #666; }
.prog-fill.run { background: #2563eb; }
.prog-fill.done { background: #067647; }
.prog-fill.fail { background: #c00; }
.prog-fill.stop { background: #bbb; }
.prog-meta { display: flex; gap: 24px; flex-wrap: wrap; font-size: 12px; color: #666; }
.prog-meta b { color: #333; font-size: 13px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
  border: 1px solid #999;
  background: #fff;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
a.chip { text-decoration: none; color: inherit; }
.chip.active { background: #666; color: #fff; border-color: #666; }

/* ログの本文。等幅にして URL やメッセージを読みやすくする。 */
.log { font-family: "Consolas", monospace; font-size: 11px; }
