/* ===== リセット & ベース ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', Meiryo, sans-serif; font-size: 14px; color: #333; background: #f5f7fa; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== レイアウト ===== */
body { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ===== サイドバー ===== */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: 200px; background: #fff;
  border-right: 1px solid #e8ecf0;
  display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 14px; border-bottom: 1px solid #e8ecf0;
  font-weight: 700; font-size: 15px; color: #00B900;
}
.logo-icon { font-size: 20px; }
.sidebar-nav { padding: 8px 0; flex: 1; }
.nav-section-label {
  font-size: 11px; color: #999; padding: 4px 14px 2px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; color: #555;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav-item:hover { background: #f0faf0; color: #00B900; }
.nav-item.active { background: #e8f8e8; color: #00B900; border-left-color: #00B900; font-weight: 600; }
.nav-icon { font-size: 15px; width: 18px; text-align: center; }
.nav-badge {
  margin-left: auto; background: #e03030; color: #fff;
  border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 700;
}
.nav-arrow { margin-left: auto; color: #bbb; font-size: 16px; }

/* ===== メインコンテンツ ===== */
.main-content {
  margin-left: 200px; height: 100vh;
  display: flex; flex-direction: column; overflow: hidden;
}

/* ===== トップヘッダー ===== */
.top-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 52px; background: #fff;
  border-bottom: 1px solid #e8ecf0; flex-shrink: 0;
}
.header-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #333; }
.header-account-icon { font-size: 18px; }
.header-dropdown { color: #888; font-size: 12px; }
.header-actions { display: flex; gap: 12px; }
.header-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 4px 10px; color: #666; font-size: 11px;
  border-radius: 6px; transition: background 0.15s;
}
.header-btn:hover { background: #f0f2f5; }
.header-btn-danger { color: #dc2626; }
.header-btn-danger:hover { background: #fee2e2; }
.header-btn span:first-child { font-size: 18px; }

/* ===== ページコンテナ ===== */
.page-container { flex: 1; overflow-y: auto; }
.page { display: none; padding: 24px; max-width: 1200px; }
.page.active { display: block; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-header h1 { font-size: 22px; font-weight: 700; color: #222; }

/* ===== サマリーカード ===== */
.summary-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.summary-card {
  background: #fff; border-radius: 10px; padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07); border-left: 4px solid #00B900;
}
.summary-card.accent-orange { border-left-color: #ff6b35; }
.summary-card.accent-blue { border-left-color: #3b82f6; }
.summary-card.accent-green { border-left-color: #10b981; }
.summary-card.compact { flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 16px; }
.summary-icon { font-size: 28px; }
.summary-value { font-size: 22px; font-weight: 700; color: #222; }
.summary-label { font-size: 12px; color: #888; }

/* ===== セクションカード ===== */
.section-card { background: #fff; border-radius: 10px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.07); }
.section-title { font-size: 16px; font-weight: 700; color: #222; margin-bottom: 14px; }
.section-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-header-row .section-title { margin-bottom: 0; }

/* ===== お知らせテーブル ===== */
.notice-table { border: 1px solid #e8ecf0; border-radius: 6px; overflow: hidden; }
.notice-header { display: grid; grid-template-columns: 140px 1fr; background: #4a6b8a; color: #fff; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.notice-row { display: grid; grid-template-columns: 140px 1fr; padding: 8px 14px; border-top: 1px solid #eef0f3; font-size: 13px; }
.notice-row:hover { background: #fafbfc; }
.badge-new { background: #ff6b35; color: #fff; padding: 1px 6px; border-radius: 3px; font-size: 11px; font-weight: 700; margin-right: 6px; }
.link-blue { color: #3b82f6; }
.link-blue:hover { text-decoration: underline; }

/* ===== 統計テーブル ===== */
.stats-table-wrapper { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; }
.stats-table th {
  background: #4a7b9d; color: #fff; padding: 10px 14px;
  text-align: center; font-size: 13px;
}
.stats-table td { padding: 9px 14px; text-align: center; border-bottom: 1px solid #eef0f3; font-size: 13px; }
.stats-table tbody tr:hover { background: #f5f8fc; }
.stats-table td a { color: #3b82f6; }
.stats-table td.positive { color: #10b981; font-weight: 600; }
.stats-table td.negative { color: #e03030; font-weight: 600; }
.stats-note { font-size: 11px; color: #999; margin-top: 8px; }

/* ===== チャットレイアウト ===== */
.chat-page { padding: 0 !important; max-width: 100% !important; height: calc(100vh - 52px); }
.chat-layout { display: grid; grid-template-columns: 280px 1fr 260px; height: 100%; }

/* 連絡先リストパネル */
.contact-list-panel { border-right: 1px solid #e8ecf0; display: flex; flex-direction: column; background: #fff; overflow: hidden; }
.contact-list-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #e8ecf0; font-size: 13px; color: #555; font-weight: 600; }
.contact-search { padding: 8px 10px; border-bottom: 1px solid #e8ecf0; }
.contact-search input { width: 100%; padding: 6px 10px; border: 1px solid #dde2e8; border-radius: 16px; font-size: 12px; background: #f7f9fc; outline: none; }
.contact-search input:focus { border-color: #00B900; }
.contact-list { flex: 1; overflow-y: auto; }
.contact-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f0f2f5; transition: background 0.12s; }
.contact-item:hover { background: #f5faf5; }
.contact-item.active { background: #e8f8e8; }
.contact-avatar { width: 40px; height: 40px; border-radius: 50%; background: #c8e6c9; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; overflow: hidden; }
.contact-avatar img { width: 100%; height: 100%; object-fit: cover; }
.contact-info { flex: 1; min-width: 0; }
.contact-name { font-weight: 600; font-size: 13px; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-tag { font-size: 11px; color: #888; }
.contact-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.contact-time { font-size: 11px; color: #aaa; }
.contact-unread { width: 8px; height: 8px; background: #e03030; border-radius: 50%; }

/* チャットエリア */
.chat-area { display: flex; flex-direction: column; background: #f5f7fa; overflow: hidden; }
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #aaa; gap: 12px; }
.chat-empty-icon { font-size: 48px; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #fff; border-bottom: 1px solid #e8ecf0; flex-shrink: 0; }
.chat-header-name { font-weight: 700; font-size: 15px; }
.chat-header-right { display: flex; align-items: center; gap: 10px; }
.chat-status { font-size: 12px; color: #888; background: #f0f2f5; padding: 3px 10px; border-radius: 12px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg-row { display: flex; gap: 8px; }
.msg-row.out { flex-direction: row-reverse; }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; background: #c8e6c9; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; overflow: hidden; }
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-bubble-group { display: flex; flex-direction: column; gap: 4px; max-width: 70%; }
.msg-sender-name { font-size: 11px; color: #888; margin-bottom: 2px; }
.msg-bubble { padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.55; word-break: break-word; white-space: pre-wrap; }
.msg-row.in .msg-bubble { background: #fff; border-top-left-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.msg-row.out .msg-bubble { background: #00B900; color: #fff; border-top-right-radius: 4px; }
.msg-time { font-size: 10px; color: #bbb; margin-top: 2px; }
.msg-row.out .msg-time { text-align: right; }
.msg-date-divider { text-align: center; font-size: 11px; color: #aaa; margin: 8px 0; }
.msg-sticker-wrap { padding: 4px 0; }
.msg-sticker { width: 100px; height: 100px; object-fit: contain; display: block; }
.msg-image { max-width: 200px; max-height: 200px; border-radius: 10px; cursor: pointer; object-fit: cover; display: block; }
.msg-image:hover { opacity: 0.9; }
.msg-date-divider span { background: #e8ecf0; padding: 3px 10px; border-radius: 10px; }
.chat-input-area { padding: 12px 16px; background: #fff; border-top: 1px solid #e8ecf0; flex-shrink: 0; }
.chat-input-row { display: flex; align-items: flex-end; gap: 10px; }
.chat-template-btn { padding: 6px 10px; background: #f5f7fa; border-radius: 6px; color: #666; font-size: 12px; transition: background 0.12s; border: 1px solid #dde2e8; }
.chat-template-btn:hover { background: #e8f8e8; color: #00B900; }
.chat-input-wrap { flex: 1; border: 1px solid #dde2e8; border-radius: 20px; display: flex; align-items: flex-end; padding: 6px 14px; gap: 8px; background: #f9fafb; }
.chat-input { flex: 1; border: none; background: transparent; outline: none; resize: none; font-size: 13px; max-height: 120px; line-height: 1.5; }
.chat-send-btn { width: 36px; height: 36px; border-radius: 50%; background: #00B900; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: background 0.15s; flex-shrink: 0; }
.chat-send-btn:hover { background: #009900; }
.chat-send-btn:disabled { background: #ccc; }

/* テンプレートドロップダウン */
.template-dropdown {
  position: absolute; bottom: 100%; left: 0;
  background: #fff; border: 1px solid #dde2e8; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); width: 300px; max-height: 300px;
  overflow-y: auto; z-index: 200;
}
.template-dropdown-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f0f2f5; font-size: 13px; }
.template-dropdown-item:hover { background: #f5faf5; }
.template-dropdown-item strong { display: block; color: #222; }
.template-dropdown-item span { color: #888; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* ユーザー情報パネル */
.user-info-panel { border-left: 1px solid #e8ecf0; background: #fff; overflow-y: auto; display: flex; flex-direction: column; }
.info-tabs { display: flex; border-bottom: 1px solid #e8ecf0; }
.info-tab { flex: 1; padding: 12px; text-align: center; font-size: 16px; color: #888; border-bottom: 2px solid transparent; transition: all 0.15s; }
.info-tab.active { color: #00B900; border-bottom-color: #00B900; }
.info-content { padding: 16px; flex: 1; }
.info-section { margin-bottom: 16px; }
.info-section-title { font-size: 12px; font-weight: 700; color: #888; margin-bottom: 8px; text-transform: uppercase; }
.info-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.info-label { color: #888; flex-shrink: 0; }
.info-value { color: #222; font-weight: 500; text-align: right; word-break: break-all; }
.info-avatar-big { width: 60px; height: 60px; border-radius: 50%; background: #c8e6c9; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 10px; overflow: hidden; }
.info-avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.info-name { text-align: center; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.info-sub { text-align: center; font-size: 12px; color: #888; margin-bottom: 12px; }
.info-edit-btn { width: 100%; padding: 6px; background: #f5f7fa; border: 1px solid #dde2e8; border-radius: 6px; font-size: 12px; color: #555; }
.info-edit-btn:hover { background: #e8f8e8; }
.info-placeholder { display: flex; align-items: center; justify-content: center; height: 200px; color: #bbb; font-size: 13px; text-align: center; }
.buyback-quick-list { display: flex; flex-direction: column; gap: 6px; }
.buyback-quick-item { padding: 8px 10px; background: #f5f7fa; border-radius: 6px; font-size: 12px; }
.buyback-quick-item .card-name { font-weight: 600; color: #222; }
.buyback-quick-item .card-status { display: flex; justify-content: space-between; margin-top: 2px; color: #888; }
.quick-add-btn { width: 100%; margin-top: 8px; padding: 7px; background: #00B900; color: #fff; border-radius: 6px; font-size: 12px; }
.quick-add-btn:hover { background: #009900; }

/* ===== 買取帳簿 ===== */
.buyback-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar input, .filter-bar select { padding: 7px 12px; border: 1px solid #dde2e8; border-radius: 6px; background: #fff; outline: none; }
.filter-bar input { flex: 1; min-width: 200px; }
.filter-bar input:focus, .filter-bar select:focus { border-color: #00B900; }
.table-wrapper { overflow-x: auto; border-radius: 8px; border: 1px solid #e8ecf0; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; }
.data-table th { background: #4a7b9d; color: #fff; padding: 10px 12px; text-align: left; font-size: 13px; white-space: nowrap; }
.data-table td { padding: 9px 12px; border-bottom: 1px solid #eef0f3; font-size: 13px; vertical-align: middle; }
.data-table tbody tr:hover { background: #f5f8fc; }
.data-table tbody tr:last-child td { border-bottom: none; }
.status-badge { padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.status-査定中 { background: #fff3cd; color: #856404; }
.status-買取完了 { background: #d1fae5; color: #065f46; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-pending  { background: #fff3cd; color: #856404; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-unregistered { background: #f3f4f6; color: #6b7280; }
.status-保留 { background: #dbeafe; color: #1e40af; }
.status-キャンセル { background: #fee2e2; color: #991b1b; }
.loading-cell { text-align: center; color: #aaa; padding: 24px; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.page-btn { padding: 5px 12px; border: 1px solid #dde2e8; border-radius: 6px; background: #fff; color: #555; cursor: pointer; font-size: 13px; }
.page-btn.active { background: #00B900; color: #fff; border-color: #00B900; }
.page-btn:hover:not(.active) { background: #f5faf5; }

/* ===== テンプレートグリッド ===== */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.template-card { background: #fff; border: 1px solid #e8ecf0; border-radius: 10px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); display: flex; flex-direction: column; gap: 10px; }
.template-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.template-card-name { font-weight: 700; font-size: 14px; color: #222; }
.template-card-category { font-size: 11px; background: #e8f8e8; color: #00B900; padding: 2px 8px; border-radius: 10px; }
.template-card-content { font-size: 12px; color: #555; line-height: 1.55; white-space: pre-wrap; max-height: 80px; overflow: hidden; flex: 1; }
.template-card-actions { display: flex; gap: 8px; }

/* ===== 設定ページ ===== */
.settings-form { display: flex; flex-direction: column; gap: 14px; max-width: 500px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: #555; }
.form-group input, .form-group select, .form-group textarea { padding: 8px 12px; border: 1px solid #dde2e8; border-radius: 6px; outline: none; background: #fff; transition: border-color 0.15s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #00B900; }
.form-hint { font-size: 11px; color: #888; margin-top: 2px; }
.input-with-copy { display: flex; gap: 8px; }
.input-with-copy input { flex: 1; }
.required { color: #e03030; }

/* ===== モーダル ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1000; display: none; }
.modal-overlay.active { display: block; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.18); z-index: 1001; width: 520px; max-width: 95vw; max-height: 90vh; display: none; flex-direction: column; }
.modal.active { display: flex; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #e8ecf0; }
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { font-size: 18px; color: #888; padding: 4px 8px; border-radius: 4px; }
.modal-close:hover { background: #f0f2f5; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid #e8ecf0; display: flex; justify-content: flex-end; gap: 10px; }

/* ===== タグリスト（設定ページ） ===== */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; min-height: 32px; }
.tag-item {
  display: inline-flex; align-items: center; gap: 4px;
  background: #e8f8e8; color: #007a00;
  border: 1px solid #b6e2b6; border-radius: 20px;
  padding: 3px 10px 3px 12px; font-size: 13px;
}
.tag-remove {
  color: #888; font-size: 11px; line-height: 1;
  padding: 1px 2px; border-radius: 50%;
  transition: background 0.1s, color 0.1s;
}
.tag-remove:hover { background: #f87171; color: #fff; }
.tag-add-row { display: flex; gap: 8px; margin-top: 4px; }
.tag-add-row input { flex: 1; }

/* ===== 画像プレビューモーダル ===== */
.image-preview-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  z-index: 2000; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.image-preview-overlay.active { display: flex; }
.image-preview-overlay #image-preview-img {
  max-width: 80vw; max-height: 80vh;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.5);
}
.image-preview-close {
  position: absolute; top: 16px; right: 20px;
  color: #fff; font-size: 28px; background: rgba(0,0,0,0.4);
  border-radius: 50%; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; line-height: 1;
}
.image-preview-close:hover { background: rgba(0,0,0,0.7); }
.image-preview-download {
  color: #fff; background: rgba(255,255,255,0.15);
  padding: 6px 18px; border-radius: 20px; font-size: 13px;
  transition: background 0.15s; text-decoration: none;
}
.image-preview-download:hover { background: rgba(255,255,255,0.3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ===== ボタン ===== */
.btn-primary { padding: 8px 20px; background: #00B900; color: #fff; border-radius: 6px; font-weight: 600; font-size: 13px; transition: background 0.15s; }
.btn-primary:hover { background: #009900; }
.btn-secondary { padding: 8px 16px; background: #f5f7fa; border: 1px solid #dde2e8; color: #555; border-radius: 6px; font-size: 13px; transition: background 0.15s; }
.btn-secondary:hover { background: #e8ecf0; }
.btn-danger { padding: 5px 10px; background: #fee2e2; color: #991b1b; border-radius: 5px; font-size: 12px; transition: background 0.15s; }
.btn-danger:hover { background: #fecaca; }
.btn-edit { padding: 5px 10px; background: #dbeafe; color: #1e40af; border-radius: 5px; font-size: 12px; transition: background 0.15s; }
.btn-edit:hover { background: #bfdbfe; }
.icon-btn { padding: 5px 8px; border-radius: 5px; color: #666; font-size: 14px; }
.icon-btn:hover { background: #f0f2f5; }

/* ===== トースト ===== */
#toast-container { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 2000; }
.toast { padding: 12px 18px; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideUp 0.3s ease; max-width: 320px; }
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }
.toast.info { background: #3b82f6; }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ===== 流入経路分析 ===== */
.tracking-card { background:#fff; border:1px solid #e8ecf0; border-radius:10px; padding:18px 20px; margin-bottom:14px; box-shadow:0 1px 3px rgba(0,0,0,0.06); }
.tracking-card-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:8px; flex-wrap:wrap; gap:10px; }
.tracking-card-name { font-weight:700; font-size:15px; color:#222; }
.tracking-card-code { font-size:12px; color:#00B900; font-family:monospace; margin-top:2px; }
.tracking-card-desc { font-size:12px; color:#888; margin-bottom:10px; }
.tracking-card-actions { display:flex; gap:6px; flex-wrap:wrap; }
.tracking-stats-row { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:12px 0; }
.tracking-stat { text-align:center; padding:10px; background:#f5f7fa; border-radius:8px; }
.tracking-stat.accent-green { background:#d1fae5; }
.tracking-stat.accent-blue  { background:#dbeafe; }
.tracking-stat-value { font-size:20px; font-weight:700; color:#222; }
.tracking-stat-label { font-size:11px; color:#888; margin-top:2px; }
.tracking-url-row { display:flex; align-items:center; gap:8px; background:#f5f7fa; border-radius:6px; padding:8px 12px; margin-top:8px; }
.tracking-url-text { font-size:12px; color:#3b82f6; font-family:monospace; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tracking-empty { text-align:center; padding:60px 20px; color:#aaa; }

/* ===== スクロールバー ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ===== レスポンシブ ===== */
@media (max-width: 900px) {
  .user-info-panel { display: none; }
  .chat-layout { grid-template-columns: 240px 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
  .summary-cards { grid-template-columns: 1fr 1fr; }
  .buyback-summary { grid-template-columns: 1fr 1fr; }
}
