/* 問い合わせ管理CRM スタイル */
header { background: linear-gradient(135deg, #134e4a, #115e59, #0d9488); color: white; padding: 20px 24px 16px; }
header h1 { font-size: 22px; }
header p  { font-size: 13px; opacity: .8; margin-top: 4px; }

.hero-stats { display: flex; align-items: center; justify-content: center; gap: 0; background: #0f172a; padding: 20px 24px; flex-wrap: wrap; }
.hero-stat { text-align: center; padding: 0 24px; }
.hero-stat-accent .hero-num { color: #5eead4; }
.hero-num  { font-size: 40px; font-weight: 800; color: white; line-height: 1; }
.hero-unit { font-size: 18px; font-weight: 600; margin-left: 2px; }
.hero-label { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 4px; }
.hero-divider { width: 1px; height: 48px; background: rgba(255,255,255,.15); margin: 0 16px; }
@media(max-width:700px){ .hero-divider{display:none;} .hero-stats{gap:16px;} }

.tab-nav { display: flex; background: #0f766e; padding: 0 24px; overflow-x: auto; }
.tab { padding: 10px 20px; color: rgba(255,255,255,.65); font-size: 14px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab:hover { color: white; }
.tab.active { color: white; border-bottom-color: white; font-weight: bold; }

.container { max-width: 960px; margin: 24px auto; padding: 0 16px; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.box { background: white; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.box h2 { font-size: 15px; color: #1e293b; margin-bottom: 14px; font-weight: 700; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.full { grid-column: span 2; }
@media(max-width:640px){ .form-grid{grid-template-columns:1fr;} .full{grid-column:span 1;} }
label { display: block; font-size: 12px; color: #64748b; margin-bottom: 4px; font-weight: 600; }
.req { color: #dc2626; font-size: 10px; background: #fee2e2; padding: 1px 5px; border-radius: 4px; margin-left: 4px; }

/* チップ（流入経路・トーン） */
.goal-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.goal-chip { display: flex; align-items: center; gap: 6px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 20px; padding: 5px 12px; cursor: pointer; font-size: 12px; font-weight: normal; transition: background .15s; }
.goal-chip input[type=radio] { display: none; }
.goal-chip:has(input:checked) { background: #0d9488; color: white; border-color: #0d9488; }
.goal-chip:hover { background: #f0fdfa; }
.goal-chip:has(input:checked):hover { background: #0f766e; }

.btn-row { margin-top: 16px; }
.btn-primary  { background: #0d9488; color: white; }
.btn-primary:hover { background: #0f766e; }
.btn-secondary{ background: #f1f5f9; color: #475569; }
.btn-sm { padding: 5px 10px; font-size: 11px; border-radius: 6px; border: none; cursor: pointer; font-weight: bold; }
.btn-copy-all { background: #0f766e; color: white; border: none; }
.btn-copy-all:hover { background: #115e59; }

.progress-wrap { margin-top: 12px; }
.progress-bar  { background: #ccfbf1; border-radius: 8px; height: 8px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, #0d9488, #2dd4bf); height: 100%; transition: width .4s; width: 0%; }
.progress-text { font-size: 12px; color: #0f766e; margin-top: 6px; }

.success-box { background: #f0fdf4; color: #15803d; border-radius: 8px; padding: 12px 16px; font-size: 13px; margin-top: 10px; display: none; }

/* ── フィルタ ── */
.filter-box { padding: 14px 20px; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 20px; padding: 6px 14px; cursor: pointer; font-size: 12px; font-weight: 600; color: #64748b; }
.filter-chip:hover { background: #f0fdfa; }
.filter-chip.active { background: #0d9488; color: white; border-color: #0d9488; }

/* ── 案件カード ── */
.inquiry-card { background: white; border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.inquiry-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.inquiry-company { font-size: 15px; font-weight: 700; color: #1e293b; }
.inquiry-meta { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.inquiry-content { font-size: 13px; color: #475569; line-height: 1.6; margin-top: 10px; white-space: pre-wrap; background: #f8fafc; border-radius: 8px; padding: 10px 12px; }
.inquiry-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.inquiry-memo { margin-top: 10px; }
.inquiry-memo textarea { font-size: 12px; }
.inquiry-memo-row { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; }

/* ステータスバッジ */
.status-badge { font-size: 11px; font-weight: bold; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.status-新規     { background: #eff6ff; color: #2563eb; }
.status-連絡済み { background: #fffbeb; color: #d97706; }
.status-商談中   { background: #f5f3ff; color: #7c3aed; }
.status-成約     { background: #f0fdf4; color: #16a34a; }
.status-失注     { background: #f3f4f6; color: #6b7280; }

.status-select { width: auto; padding: 4px 8px; font-size: 12px; border-radius: 6px; }
.btn-delete { background: #fee2e2; color: #dc2626; }
.btn-delete:hover { background: #fecaca; }
.btn-save-memo { background: #ecfeff; color: #0e7490; }

/* ── 返信ドラフト ── */
.reply-draft { font-size: 13px; color: #1e293b; line-height: 1.8; white-space: pre-wrap; background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: 8px; padding: 16px; }
.ai-note { font-size: 11px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 12px; margin-top: 12px; line-height: 1.6; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
