/* Non→Proデザイン広告運用 — Stripeダッシュボード参考の高可読テーマ
   背景 #f6f8fa / 本文 #1f2937 / 補助 #6b7280 / アクセント(少量) #d96589 / リンク #3b6fc9 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; background: #f6f8fa; color: #1f2937; font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: #3b6fc9; }

header { background: #fff; color: #1f2937; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; position: sticky; top: 0; z-index: 10; border-bottom: 1px solid #e5e7eb; }
header h1 { font-size: 15px; color: #1f2937; display: flex; align-items: center; gap: 9px; font-weight: 600; }
header h1 img { width: 26px; height: 26px; }
header .meta { font-size: 12px; color: #6b7280; display: flex; align-items: center; gap: 10px; }
.btn-sub { color: #374151; background: #fff; padding: 4px 10px; border-radius: 6px; text-decoration: none; font-size: 12px; border: 1px solid #d8dde3; }
.btn-sub:hover { background: #f3f4f6; }
.active-filter { background: #1f2937; color: #fff; border-color: #1f2937; }

.layout { display: flex; min-height: calc(100vh - 47px); align-items: flex-start; }
.sidebar { width: 200px; background: #fff; padding: 14px 10px; flex-shrink: 0; position: sticky; top: 47px; height: calc(100vh - 47px); overflow-y: auto; border-right: 1px solid #e5e7eb; }
.sidebar ul { list-style: none; display: grid; gap: 2px; }
.sidebar li a { display: block; color: #4b5563; padding: 9px 12px; text-decoration: none; font-size: 13px; border-radius: 6px; }
.sidebar li a:hover { background: #f3f4f6; color: #1f2937; }
.sidebar li.active a { background: #fdf1f5; color: #c2185b; font-weight: 600; }
.sidebar-note { color: #9ca3af; font-size: 11px; line-height: 1.9; padding: 16px 12px; border-top: 1px solid #e5e7eb; margin-top: 14px; }
.help-link { color: #9ca3af; font-size: 11px; }
.sidebar-note a { color: #3b6fc9; }

main { flex: 1; max-width: 1100px; padding: 20px; display: grid; gap: 16px; align-content: start; }
.card { background: #fff; border-radius: 8px; padding: 16px 20px; box-shadow: 0 1px 2px rgba(16,24,40,.05); overflow-x: auto; position: relative; border: 1px solid #e5e7eb; }
.card.highlight { border-left: 3px solid #d96589; }
.card.guide { border-left: 3px solid #93b8e8; }
.card.guide p { line-height: 1.8; margin-top: 4px; color: #374151; }
.card h2 { font-size: 14px; margin-bottom: 10px; color: #1f2937; font-weight: 600; }
.card h3 { font-size: 12px; margin: 12px 0 4px; color: #6b7280; font-weight: 600; }

.ai-report { border-left: 3px solid #d96589; }
.ai-summary { line-height: 1.9; font-size: 14px; }
.ai-body { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 12px; white-space: pre-wrap; font-family: inherit; line-height: 1.8; font-size: 13px; margin-top: 8px; }
details summary { cursor: pointer; margin-top: 6px; color: #6b7280; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat-card { background: #fff; border-radius: 8px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(16,24,40,.05); border: 1px solid #e5e7eb; text-decoration: none; color: #1f2937; display: grid; gap: 4px; }
.stat-card.attention { border-left: 3px solid #d96589; }
.stat-card .num { font-size: 24px; font-weight: 700; color: #1f2937; }
.stat-card.attention .num { color: #c2185b; }
.stat-card .num.small-num { font-size: 13px; font-weight: 600; }
.stat-card .label { font-size: 12px; color: #6b7280; }

table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid #f0f2f5; padding: 8px 10px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
th { background: #fff; font-size: 11px; color: #6b7280; font-weight: 600; letter-spacing: .02em; border-bottom: 1px solid #e5e7eb; }
th:first-child, td:first-child, td.wrap, th.wrap { text-align: left; }
td.wrap { white-space: normal; min-width: 160px; }
.small { font-size: 12px; color: #6b7280; }
th.em, td.em { background: #f8fafc; font-weight: 600; }
.good { color: #15803d; font-weight: 600; }
.bad { color: #dc2626; font-weight: 600; }

.filter-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.filter-bar label { display: grid; gap: 4px; font-size: 12px; color: #6b7280; }
.filter-bar input, .filter-bar select { padding: 6px 8px; border: 1px solid #d8dde3; border-radius: 6px; font-size: 13px; background: #fff; color: #1f2937; }
.filter-bar button { padding: 7px 16px; border: 0; border-radius: 6px; background: #d96589; color: #fff; cursor: pointer; font-weight: 600; }
.filter-bar button:hover { background: #c95579; }

.inline-form { display: flex; gap: 4px; align-items: center; }
.btn-ok, .btn-ng { border: 0; border-radius: 6px; padding: 5px 12px; color: #fff; cursor: pointer; font-size: 12px; font-weight: 600; }
.btn-ok { background: #15803d; }
.btn-ng { background: #9ca3af; }

.todo-list { padding-left: 24px; display: grid; gap: 8px; margin-top: 4px; }
.todo-list li { line-height: 1.7; }
.todo-list li.done { color: #9ca3af; }
.todo-list li.bad-item { color: #b91c1c; }
.todo-list a { color: #c2185b; text-decoration: none; }
.todo-list a:hover { text-decoration: underline; }

.draft-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.draft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
@media (max-width: 900px) { .draft-grid { grid-template-columns: 1fr; } }
.draft pre { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 12px; white-space: pre-wrap; font-family: inherit; line-height: 1.8; font-size: 13px; }
.copy-line { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.tag { display: inline-block; background: #f3f4f6; color: #4b5563; border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: normal; vertical-align: middle; }
.tag.status-確認待ち { background: #fef3c7; color: #92400e; }
.tag.status-承認 { background: #dcfce7; color: #15803d; }
.tag.status-入稿済み { background: #dbeafe; color: #1d4ed8; }
.tag.status-却下 { background: #f3f4f6; color: #9ca3af; }

.guide-close { position: absolute; top: 10px; right: 12px; border: 0; background: #f3f4f6; color: #6b7280; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1; }
.guide-close:hover { background: #e5e7eb; }

.chart-block { display: grid; gap: 6px; align-content: start; }
.bar-line { display: flex; align-items: center; gap: 8px; }
.bar-label { width: 44px; font-size: 11px; color: #6b7280; flex-shrink: 0; text-align: right; }
.bar { height: 14px; border-radius: 3px; min-width: 2px; }
.bar.spend { background: #b8cef0; }
.bar-val { font-size: 11px; color: #6b7280; white-space: nowrap; }
.selected-row { background: #f8fafc; }

.kpi-table td, .kpi-table th { text-align: right; }
.kpi-table th:not(.kpi-name), .kpi-table td:not(.kpi-name) { min-width: 130px; width: 130px; }
.kpi-table .kpi-name { text-align: left; position: sticky; left: 0; background: #fff; min-width: 235px; width: 235px; }
.kpi-table th.kpi-name { background: #fff; }
.kpi-table tbody tr:nth-child(even) td { background: #fafbfc; }
.kpi-table tr.kpi-sec td { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 8px 10px; position: static; color: #374151; }
.kpi-table tr.sec-pink td { background: #fdf1f5 !important; }
.kpi-table tr.sec-beige td { background: #fdf7ea !important; }
.kpi-table tr.sec-green td { background: #eefaf1 !important; }
.kpi-table tr.sec-yellow td { background: #fefae5 !important; }
.kpi-table tbody tr:not(.kpi-sec):hover td { background: #f3f6fa; }

.funnel-steps { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; margin-bottom: 12px; }
.funnel-step { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 14px; text-align: center; min-width: 110px; }
.funnel-step .fs-num { font-size: 20px; font-weight: 700; color: #1f2937; font-variant-numeric: tabular-nums; }
.funnel-step .fs-label { font-size: 11px; color: #6b7280; }
.funnel-step .fs-rate { font-size: 11px; color: #c2185b; font-weight: 600; }
.funnel-arrow { align-self: center; color: #d1d5db; font-size: 18px; }

.auto-summary { cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.auto-body { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f2f5; }
.auto-steps { padding-left: 22px; display: grid; gap: 6px; margin-top: 6px; line-height: 1.7; }

.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f6f8fa; }
.login-box { background: #fff; padding: 32px; border-radius: 12px; box-shadow: 0 4px 16px rgba(16,24,40,.08); display: grid; gap: 12px; width: 320px; border: 1px solid #e5e7eb; }
.login-box h1 { font-size: 15px; text-align: center; color: #1f2937; }
.login-box img { width: 40px; height: 40px; margin: 0 auto; }
.login-box input { padding: 10px; border: 1px solid #d8dde3; border-radius: 6px; }
.login-box button { padding: 10px; border: 0; border-radius: 6px; background: #d96589; color: #fff; cursor: pointer; font-weight: 600; }
.login-note { font-size: 11px; color: #9ca3af; text-align: center; }
.error { color: #dc2626; font-size: 12px; text-align: center; }

/* ---------- 画像クリエイティブ（2026-09-11） ---------- */
.tag.status-検品待ち { background: #fef3c7; color: #92400e; }
a.btn-ok, a.btn-ng { text-decoration: none; display: inline-block; }

.asset-block { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; padding: 14px 0 4px; border-top: 1px dashed #e5e7eb; margin-top: 12px; }
.asset-thumb { width: 240px; border: 1px solid #e5e7eb; border-radius: 10px; display: block; transition: box-shadow .15s; }
a:hover > .asset-thumb { box-shadow: 0 4px 14px rgba(16,24,40,.18); }
.asset-info { flex: 1; min-width: 280px; display: grid; gap: 8px; align-content: start; }
.asset-title { font-size: 13px; font-weight: 600; color: #1f2937; }
.asset-meta { font-size: 12px; color: #6b7280; line-height: 1.7; margin: 0; }
.asset-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.asset-review { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.asset-review input[type=text] { flex: 1; min-width: 200px; padding: 6px 8px; border: 1px solid #d8dde3; border-radius: 6px; font-size: 12px; }
details.prompt summary { cursor: pointer; color: #6b7280; font-size: 12px; }
details.prompt pre { margin-top: 6px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 12px; white-space: pre-wrap; font-family: inherit; font-size: 12px; line-height: 1.7; }

.submit-panel { margin-top: 4px; background: #fdf7f9; border: 1px solid #f2d4de; border-radius: 8px; padding: 14px 16px; }
.submit-panel h3 { margin: 0 0 8px; font-size: 13px; color: #1f2937; }
.submit-panel p { margin: 8px 0; font-size: 13px; }
.submit-panel select, .submit-panel input[type=text] { padding: 6px 8px; border: 1px solid #d8dde3; border-radius: 6px; font-size: 13px; background: #fff; max-width: 100%; }
.submit-note { font-size: 12px; color: #6b7280; line-height: 1.8; background: #fff; border: 1px solid #f0e2e7; border-radius: 6px; padding: 10px 12px; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.gallery-item { margin: 0; }
.gallery-item .thumb-wrap { position: relative; }
.gallery-item .thumb-wrap img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 1px solid #e5e7eb; border-radius: 10px; display: block; transition: box-shadow .15s; }
.gallery-item .thumb-wrap a:hover img { box-shadow: 0 4px 14px rgba(16,24,40,.18); }
.gallery-item .thumb-wrap .tag { position: absolute; top: 8px; left: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.gallery-item figcaption { margin-top: 8px; font-size: 12px; color: #6b7280; line-height: 1.7; }
.gallery-item figcaption strong { color: #1f2937; }

.card.draft, .asset-block, .submit-panel { scroll-margin-top: 72px; }

.tagcopy { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 10px 12px; font-size: 12px; }
.tagcopy code { background: #fff; border: 1px solid #e5e7eb; border-radius: 4px; padding: 3px 8px; font-size: 12px; word-break: break-all; }

/* ---------- カンバンボード（2026-09-14） ---------- */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; }
.kb-col { flex: 0 0 300px; background: #f6f8fa; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 10px 4px; }
.kb-col h2 { font-size: 13px; margin: 0 0 10px; padding-bottom: 6px; color: #1f2937; border-bottom: 2px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; }
.kb-col h2 .count { color: #6b7280; font-weight: normal; font-size: 12px; background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:1px 8px; }
.kb-body { display: flex; flex-direction: column; gap: 10px; max-height: 74vh; overflow-y: auto; padding: 2px; }
.kb-body:empty::after { content: "なし"; color: #9ca3af; font-size: 12px; padding: 8px; }
.kb-card { background: #fff; border: 1px solid #e5e7eb; border-left-width: 4px; border-radius: 8px; padding: 9px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.kb-card.st-inspect { border-left-color: #f59e0b; }
.kb-card.st-approved { border-left-color: #15803d; }
.kb-card.st-submitted { border-left-color: #2563eb; }
.kb-card.st-rejected { border-left-color: #9ca3af; }
.kb-thumb { width: 100%; border-radius: 6px; display: block; border: 1px solid #eee; }
.kb-title { font-size: 12.5px; font-weight: 700; color: #1f2937; margin: 7px 0 3px; line-height: 1.4; }
.kb-meta { font-size: 11px; color: #6b7280; line-height: 1.6; margin: 0 0 6px; }
.kb-card .btn-ok, .kb-card .btn-ng, .kb-card .btn-sub { font-size: 11px; padding: 4px 9px; }
.kb-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.kb-card details.prompt summary { font-size: 11px; }
.kb-card pre { font-size: 11px; padding: 8px; }
.kb-flash-ok { background:#dcfce7; border:1px solid #86efac; border-radius:6px; padding:7px 9px; color:#15803d; font-weight:600; font-size:11px; margin-bottom:7px; }
.kb-flash-err { background:#fef2f2; border:1px solid #fca5a5; border-radius:6px; padding:7px 9px; color:#b91c1c; font-weight:600; font-size:11px; margin-bottom:7px; }
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 9000; background: rgba(31,41,55,.55); align-items: center; justify-content: center; padding: 20px; }
.modal-box { background:#fff; border-radius:16px; padding:0 28px 24px; max-width:560px; width:100%; max-height:88vh; overflow-y:auto; box-shadow:0 20px 60px rgba(16,24,40,.35); }
.modal-head { display:flex; justify-content:space-between; align-items:center; position:sticky; top:0; background:#fff; padding:20px 0 12px; border-bottom:1px solid #eef0f3; margin-bottom:16px; }
.modal-head h3 { margin:0; font-size:17px; color:#1f2937; }
.modal-x { border:0; background:transparent; color:#9ca3af; font-size:26px; line-height:1; cursor:pointer; padding:0 4px; }
.modal-x:hover { color:#4b5563; }
.modal-sub { margin:-6px 0 18px; font-size:14px; color:#374151; font-weight:600; }
.mfield { margin-bottom:16px; }
.mlabel { display:block; font-size:13px; font-weight:600; color:#1f2937; margin-bottom:7px; }
.mhint { font-weight:normal; color:#9ca3af; font-size:12px; }
.mchecks { display:flex; gap:10px; flex-wrap:wrap; }
.mcheck { display:flex; align-items:center; gap:7px; border:1px solid #d8dde3; border-radius:8px; padding:9px 14px; font-size:13px; cursor:pointer; flex:1; min-width:150px; transition:border-color .12s, background .12s; }
.mcheck:has(input:checked) { border-color:#d96589; background:#fdf1f5; }
.mcheck input { width:16px; height:16px; accent-color:#d96589; }
.minput { width:100%; padding:9px 11px; border:1px solid #d8dde3; border-radius:8px; font-size:14px; color:#1f2937; }
.minput:focus { outline:none; border-color:#d96589; box-shadow:0 0 0 3px rgba(217,101,137,.15); }
.mnote { background:#f9fafb; border:1px solid #eef0f3; border-radius:10px; padding:13px 15px; font-size:12.5px; color:#4b5563; line-height:1.5; display:grid; gap:6px; margin:18px 0; }
.mnote-k { display:inline-block; min-width:66px; color:#9ca3af; font-weight:600; margin-right:6px; }
.mnote-warn { margin-top:4px; padding-top:9px; border-top:1px dashed #e5e7eb; color:#b45309; font-weight:600; }
.mactions { display:flex; gap:10px; align-items:center; }
.btn-lg { font-size:14px; padding:11px 22px; border-radius:8px; }

/* ---------- タブ内の詳細カード（2026-09-14） ---------- */
.detail-card { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.detail-thumb { width: 280px; max-width: 100%; border: 1px solid #e5e7eb; border-radius: 10px; display: block; }
.detail-body { flex: 1; min-width: 300px; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.detail-head h2 { margin: 0; }
.detail-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 2026-10-08 ヘッダーの分類（中カテゴリ）＋サイドはその分類の中身だけ ---------- */
header { gap: 8px 20px; padding: 0 20px; min-height: 52px; }
header h1 { padding: 10px 0; white-space: nowrap; }
.topnav { display: flex; align-self: stretch; gap: 2px; margin-right: auto; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { display: flex; align-items: center; padding: 0 14px; color: #4b5563; text-decoration: none; font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; transition: color .12s, border-color .12s; }
.topnav a:hover { color: #1f2937; background: #f9fafb; }
.topnav a.on { color: #c2185b; border-bottom-color: #d96589; }
.topnav a:focus-visible { outline: 2px solid #d96589; outline-offset: -2px; }
.layout { min-height: calc(100vh - 52px); }
.sidebar { top: 52px; height: calc(100vh - 52px); }
.sidebar-title { font-size: 11px; font-weight: 700; color: #9ca3af; letter-spacing: .08em; padding: 4px 12px 10px; }

@media (max-width: 820px) {
  header { padding: 0 12px; }
  header h1 { font-size: 14px; }
  header .meta { width: 100%; justify-content: flex-end; padding-bottom: 8px; }
  .topnav { order: 3; width: 100%; margin-right: 0; border-top: 1px solid #e5e7eb; }
  .topnav a { padding: 12px 12px; }
  body { overflow-x: hidden; }
  .layout { flex-direction: column; align-items: stretch; min-height: 0; }
  .sidebar { position: static; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid #e5e7eb; padding: 8px 12px; overflow-x: auto; }
  .sidebar-title, .sidebar-note { display: none; }
  .sidebar ul { display: flex; gap: 6px; }
  .sidebar li a { white-space: nowrap; padding: 7px 12px; border: 1px solid #e5e7eb; border-radius: 999px; }
  .sidebar li.active a { border-color: #d96589; }
  main { padding: 12px; width: 100%; min-width: 0; }
  header .meta { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { .topnav a { transition: none; } }
