/* KOL 合作管理系統 - 自訂樣式 */

/* 全域 box-sizing，防止 padding/border 撐破父容器 */
*, *::before, *::after { box-sizing: border-box; }

/* 滾動條美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* 導覽列 */
.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
}
.nav-link:hover { background: #f1f5f9; color: #1e293b; }
.nav-link.active { background: #4F46E5; color: white; }

/* 卡片 */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  padding: 20px;
  transition: box-shadow 0.2s;
  min-width: 0;       /* 防止 flex/grid 子項目撐破父容器 */
  overflow: hidden;   /* 裁切溢出內容 */
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.card-clickable { cursor: pointer; }

/* 按鈕樣式 */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #4F46E5; color: white; }
.btn-primary:hover:not(:disabled) { background: #4338CA; }
.btn-secondary { background: #f1f5f9; color: #475569; }
.btn-secondary:hover:not(:disabled) { background: #e2e8f0; }
.btn-success { background: #10b981; color: white; }
.btn-success:hover:not(:disabled) { background: #059669; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-warning { background: #f59e0b; color: white; }
.btn-warning:hover:not(:disabled) { background: #d97706; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-ghost { background: transparent; color: #64748b; }
.btn-ghost:hover { background: #f1f5f9; color: #1e293b; }
.btn-outline { background: transparent; border: 1px solid #e2e8f0; color: #475569; }
.btn-outline:hover { background: #f8fafc; }

/* 表單 */
.form-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 4px; }
.form-input { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; background: white; }
.form-input:focus { border-color: #4F46E5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.form-input::placeholder { color: #9ca3af; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.form-textarea { min-height: 80px; resize: vertical; }

/* 表格 */
.table-container { overflow-x: auto; border-radius: 8px; border: 1px solid #e5e7eb; }
table { width: 100%; border-collapse: collapse; }
th { background: #f8fafc; padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #e5e7eb; }
td { padding: 12px 14px; font-size: 14px; color: #374151; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-indigo { background: #e0e7ff; color: #3730a3; }

/* Modal 彈窗 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal-box { background: white; border-radius: 16px; width: 100%; max-width: 640px; box-shadow: 0 25px 50px rgba(0,0,0,0.25); margin: auto; }
.modal-box-lg { max-width: 900px; }
.modal-box-xl { max-width: 1100px; }
.modal-header { padding: 20px 24px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 18px; font-weight: 700; color: #111827; }
.modal-body { padding: 16px 24px 24px; }
.modal-footer { padding: 0 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid #e5e7eb; padding: 0 0 0 0; margin-bottom: 20px; }
.tab { padding: 10px 20px; font-size: 14px; font-weight: 600; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; white-space: nowrap; }
.tab:hover { color: #374151; }
.tab.active { color: #4F46E5; border-bottom-color: #4F46E5; }

/* 通知 Toast */
.toast { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast-item { padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideIn 0.3s ease; max-width: 360px; display: flex; align-items: center; gap: 8px; }
.toast-success { background: #065f46; color: white; }
.toast-error { background: #991b1b; color: white; }
.toast-info { background: #1d4ed8; color: white; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }

/* 圖片縮圖 */
.img-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid #e5e7eb; transition: border-color 0.2s; }
.img-thumb:hover { border-color: #4F46E5; }
.avatar-thumb { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #e5e7eb; cursor: pointer; background: #f3f4f6; }
.avatar-placeholder { width: 40px; height: 40px; border-radius: 50%; background: #e0e7ff; display: inline-flex; align-items: center; justify-content: center; color: #4F46E5; font-weight: 700; font-size: 14px; }

/* 搜尋工具列 */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 14px; }
.search-input-wrap input { padding-left: 32px; }

/* 決策按鈕組 */
.decision-group { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid #e5e7eb; }
.decision-btn { padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; background: white; color: #6b7280; transition: all 0.2s; }
.decision-btn:hover { background: #f8fafc; }
.decision-btn.active-consider { background: #fef3c7; color: #92400e; }
.decision-btn.active-collaborate { background: #d1fae5; color: #065f46; }
.decision-btn.active-reject { background: #fee2e2; color: #991b1b; }

/* 狀態標籤 */
.status-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }

/* 多選 chips */
.chips-container { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid #d1d5db; border-radius: 8px; min-height: 40px; cursor: text; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: #e0e7ff; color: #4F46E5; border-radius: 999px; font-size: 12px; font-weight: 500; }
.chip-remove { cursor: pointer; color: #6366F1; }
.chip-remove:hover { color: #4338CA; }

/* 摺疊區塊 */
.collapse-section { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.collapse-header { padding: 12px 16px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; background: #f8fafc; font-weight: 600; font-size: 14px; color: #374151; }
.collapse-header:hover { background: #f1f5f9; }
.collapse-body { padding: 16px; }

/* 外顯狀態勾勾 */
.status-check { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 6px; }
.status-check.done { color: #059669; background: #d1fae5; }
.status-check.pending { color: #9ca3af; background: #f3f4f6; }

/* 提醒通知卡片 */
.reminder-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: 10px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.reminder-card:hover { background: #f8fafc; border-color: #e2e8f0; }
.reminder-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }

/* KPI 卡片 */
.kpi-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.kpi-value { font-size: 28px; font-weight: 800; color: #111827; line-height: 1.2; }
.kpi-label { font-size: 13px; color: #6b7280; margin-top: 4px; }

/* 上傳區域 */
.upload-area { border: 2px dashed #d1d5db; border-radius: 10px; padding: 16px; text-align: center; cursor: pointer; transition: all 0.2s; }
.upload-area:hover { border-color: #4F46E5; background: #f5f3ff; }
.upload-images-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.upload-img-item { position: relative; }
.upload-img-item .remove-btn { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; background: #ef4444; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; cursor: pointer; }

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: #6b7280; }
.spinner { width: 32px; height: 32px; border: 3px solid #e5e7eb; border-top-color: #4F46E5; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 頁面切換過場動畫 */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-enter {
  animation: pageFadeIn 0.1s ease both;
}

/* Skeleton Loading */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 600px 100%;
  animation: shimmer 1.2s infinite linear;
  border-radius: 6px;
}
.skeleton-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  overflow: hidden;
}
.skeleton-line { height: 12px; margin-bottom: 8px; }
.skeleton-title { height: 18px; width: 60%; margin-bottom: 12px; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }

/* 空狀態 */
.empty-state { text-align: center; padding: 48px 24px; color: #6b7280; }
.empty-state i { font-size: 40px; margin-bottom: 12px; color: #d1d5db; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; color: #374151; }

/* 麵包屑 */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #6b7280; margin-bottom: 16px; }
.breadcrumb a, .breadcrumb span[data-link] { color: #4F46E5; cursor: pointer; }
.breadcrumb a:hover, .breadcrumb span[data-link]:hover { text-decoration: underline; }

/* 分隔線 */
.divider { height: 1px; background: #e5e7eb; margin: 16px 0; }

/* 多選下拉 */
.multi-select-dropdown { position: relative; }
.multi-select-panel { position: absolute; top: 100%; left: 0; right: 0; z-index: 100; background: white; border: 1px solid #d1d5db; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); max-height: 200px; overflow-y: auto; margin-top: 4px; }
.multi-select-option { padding: 8px 12px; cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.multi-select-option:hover { background: #f5f3ff; }
.multi-select-option input[type="checkbox"] { accent-color: #4F46E5; }

/* 合作者卡片 */
.collaborator-card { background: white; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; transition: box-shadow 0.2s; }
.collaborator-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.collaborator-card-header { padding: 14px 16px; display: flex; align-items: center; gap: 12px; background: #f8fafc; border-bottom: 1px solid #e5e7eb; }
.collaborator-card-body { padding: 16px; }

/* 報價展開 */
.quote-preview { background: #f8fafc; border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.6; color: #374151; max-height: 100px; overflow-y: auto; white-space: pre-wrap; }
.quote-full { max-height: none; }

/* Stage tabs 特殊 */
.stage-tab { padding: 8px 20px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; color: #6b7280; background: transparent; border: 1px solid transparent; }
.stage-tab:hover { background: #f1f5f9; }
.stage-tab.active { background: #4F46E5; color: white; border-color: #4F46E5; }

/* 新增連結列表 */
.link-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

/* Readonly 欄位 */
.readonly-field { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 12px; font-size: 14px; color: #374151; font-weight: 600; }

/* 搜尋高亮 */
.highlight { background: #fef3c7; border-radius: 2px; }

/* 銀行資訊收合 */
.bank-info { display: none; }
.bank-info.show { display: block; }

/* Modal 分頁 */
.modal-tab { padding: 8px 20px; font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; color: #6b7280; transition: all 0.2s; }
.modal-tab.active { color: #4F46E5; border-bottom-color: #4F46E5; }
.modal-tab:hover:not(.active) { color: #374151; }

/* 回收站群組 */
.trash-group { margin-bottom: 24px; }
.trash-group-title { font-size: 13px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 0; border-bottom: 1px solid #e5e7eb; margin-bottom: 8px; }

/* 進度指示 */
.progress-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.progress-dot.done { background: #10b981; }
.progress-dot.pending { background: #d1d5db; }

/* 頁面過場優化 */
#main-content { will-change: auto; }
#main-content.page-enter { will-change: opacity, transform; }

/* 圖片佔位色，避免 layout shift */
img { background: #f3f4f6; }

/* 部落客卡片網格過渡 */
#bloggers-grid { transition: opacity 0.1s ease; }

/* 協作者卡片順滑 */
.collaborator-card { will-change: auto; }

/* =========================================================
   Stage 2 卡片元件樣式
   ========================================================= */

/* ── 卡片容器 ── */
.s2-card {
  padding: 14px 16px;
}

/* ── Header 佈局 ── */
.s2-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.s2-header-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.s2-blogger-name {
  font-weight: 700;
  font-size: 14px;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s2-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.s2-header-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.s2-total-fee {
  font-size: 14px;
  font-weight: 800;
  color: #4F46E5;
}
.s2-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.s2-quick-rate {
  display: flex;
  gap: 3px;
}

/* ── Status Pill ── */
.s2-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.s2-pill-green  { background: #d1fae5; color: #065f46; }
.s2-pill-red    { background: #fee2e2; color: #b91c1c; }
.s2-pill-amber  { background: #fef9c3; color: #713f12; }
.s2-pill-gray   { background: #f3f4f6; color: #6b7280; }

/* ── Tags ── */
.s2-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.s2-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.s2-tag-blue   { background: #eff6ff; color: #1d4ed8; }
.s2-tag-green  { background: #d1fae5; color: #065f46; }
.s2-tag-warn   { background: #fef3c7; color: #92400e; }
.s2-tag-muted  { background: #f3f4f6; color: #9ca3af; }
.s2-tag-amber  { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.s2-tag-purple { background: #ede9fe; color: #5b21b6; }
.s2-tag-indigo { background: #e0e7ff; color: #3730a3; }

/* ── Tab Body ── */
.s2-tab-body {
  margin-top: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

/* ── Tab 按鈕列 ── */
.s2-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
  scrollbar-width: none;
}
.s2-tabs::-webkit-scrollbar { display: none; }
.s2-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.s2-tab-btn:hover { color: #374151; }
.s2-tab-active {
  color: #4F46E5 !important;
  border-bottom-color: #4F46E5 !important;
  background: #fff;
}

/* ── Tab 內容面板 ── */
.s2-tab-panel {
  padding: 12px 14px;
  background: #fff;
}

/* ── Mini row（廣告期間等補充資訊） ── */
.s2-mini-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

/* ── 費用格子 ── */
.s2-fee-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}
.s2-fee-cell {
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 6px 4px;
  min-width: 0;
  overflow: hidden;
}
.s2-fee-total { background: #EEF2FF; border-color: #c7d2fe; }
.s2-fee-label { font-size: 10px; color: #9ca3af; margin-bottom: 2px; }
.s2-fee-total .s2-fee-label { color: #4F46E5; font-weight: 600; }
.s2-fee-value { font-size: 13px; font-weight: 700; color: #374151; }
.s2-fee-total .s2-fee-value { color: #4F46E5; font-size: 14px; font-weight: 800; }

/* ── KV 表格（寄送資訊等） ── */
.s2-kv-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 12px;
  color: #374151;
}
.s2-kv-key { color: #9ca3af; font-weight: 500; white-space: nowrap; }
.s2-kv-val { font-weight: 600; }

/* ── 上片連結列 ── */
.s2-post-row {
  padding: 8px 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
}
.s2-post-overdue { background: #fff5f5; border-color: #fca5a5; }
.s2-post-row-top {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.s2-post-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  text-decoration: none;
  font-weight: 700;
}
.s2-post-link-btn:hover { background: #bfdbfe; }
.s2-rate-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── 讚 / 不推 按鈕 ── */
.s2-like-btn {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #16a34a;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all .15s;
  font-weight: 600;
}
.s2-dislike-btn {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all .15s;
  font-weight: 600;
}
.s2-like-btn:hover    { background: #dcfce7; border-color: #86efac; }
.s2-dislike-btn:hover { background: #fee2e2; border-color: #fca5a5; }

/* ── Tab 內小區塊標題 ── */
.s2-mini-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: .3px;
}

/* ── 圖片標籤 ── */
.s2-media-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── 得獎者 chip ── */
.s2-winner-chip {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 7px 11px;
  min-width: 130px;
}

/* ── section（保留向後相容）── */
.s2-section {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
}
.s2-section-blue  { background: #f0f9ff; border-color: #bae6fd; }
.s2-section-amber { background: #fffbeb; border-color: #fde68a; }
.s2-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.s2-title-blue  { color: #0369a1; }
.s2-title-amber { color: #b45309; }
.s2-row-2col { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.s2-row-2col > .s2-section { flex: 1; min-width: 180px; }
.s2-fee-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
  padding-top: 6px;
  border-top: 1px solid #e5e7eb;
}

/* =========================================================
   手機響應式 (max-width: 768px)
   ========================================================= */

/* 底部 Tab Bar - 預設隱藏，手機才顯示 */
#mobile-tab-bar { display: none; }

/* =========================================================
   手機響應式 (max-width: 768px) — 統一管理
   ========================================================= */
@media (max-width: 768px) {

  /* ── 頂部 nav 手機隱藏 ── */
  #top-nav { display: none; }

  /* ── 底部 Tab Bar ── */
  #mobile-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid #e5e7eb;
    z-index: 200;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  }
  .mob-tab {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px; font-size: 10px; font-weight: 600; color: #9ca3af;
    cursor: pointer; transition: color 0.15s; padding: 6px 0;
    user-select: none; -webkit-tap-highlight-color: transparent;
  }
  .mob-tab i { font-size: 18px; }
  .mob-tab.active { color: #4F46E5; }
  .mob-tab.active i { color: #4F46E5; }

  /* ── 內容區 padding（底部留白避免被 Tab Bar 遮住） ── */
  #main-content { padding: 14px 10px 80px !important; }

  /* ── Toast ── */
  .toast { bottom: 72px; right: 12px; left: 12px; }
  .toast-item { max-width: 100%; }

  /* ── Modal 底部抽屜 ── */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box, .modal-box-lg, .modal-box-xl {
    max-width: 100% !important;
    border-radius: 20px 20px 0 0;
    margin: 0; max-height: 92vh;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }

  /* ── 卡片 ── */
  .card { padding: 12px; }

  /* ── 按鈕（觸控面積） ── */
  .btn { padding: 10px 14px; font-size: 13px; }
  .btn-sm { padding: 6px 10px; font-size: 12px; }

  /* ── Stage Tabs 橫向滾動 ── */
  .stage-tabs-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; white-space: nowrap; margin-bottom: 12px;
  }
  .stage-tabs-wrap::-webkit-scrollbar { display: none; }
  .stage-tab { padding: 7px 14px; font-size: 12px; }

  /* ── 協作者卡片 ── */
  .collaborator-card-body { padding: 10px; }

  /* ── 表格 ── */
  .table-container { border-radius: 10px; }
  th { padding: 8px 10px; font-size: 11px; }
  td { padding: 10px; font-size: 13px; }

  /* ── 麵包屑 ── */
  .breadcrumb { font-size: 12px; gap: 5px; }

  /* ── Form ── */
  .form-label { font-size: 12px; }
  .form-input { font-size: 16px; } /* 防 iOS 自動縮放 */

  /* ── Skeleton ── */
  .skeleton-card { padding: 12px; }

  /* ── 動畫加速 ── */
  .page-enter { animation-duration: 0.12s; }

  /* ════════════════════════════════════
     Grid 響應式覆蓋
     ════════════════════════════════════ */

  /* 2欄 → 1欄 */
  .mob-grid-2 { grid-template-columns: 1fr !important; }

  /* 3欄 → 1欄 */
  .mob-grid-3 { grid-template-columns: 1fr !important; }

  /* 4欄 → 2欄（費用輸入等） */
  .mob-grid-4 { grid-template-columns: 1fr 1fr !important; }

  /* 成效數據 3欄 → 2欄（數字短，2欄較好看） */
  .mob-metrics-grid { grid-template-columns: 1fr 1fr !important; }

  /* 博主詳情側欄 1fr+360px → 1欄 */
  .mob-detail-layout { grid-template-columns: 1fr !important; }

  /* 上片連結 130px+1fr+auto → 平台跨全寬，URL+刪除在同行 */
  .mob-post-link-row {
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto;
  }
  .mob-post-link-row > select { grid-column: 1 / -1; }
  .mob-post-link-row > input  { grid-column: 1; }
  .mob-post-link-row > button { grid-column: 2; grid-row: 1; align-self: center; }

  /* 上片連結舊版 class */
  .mob-post-row {
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto;
  }
  .mob-post-row > *:nth-child(1) { grid-column: 1 / -1; }
  .mob-post-row > *:nth-child(2) { grid-column: 1; }
  .mob-post-row > *:nth-child(3) { grid-column: 1; }
  .mob-post-row > *:nth-child(4) { grid-column: 2; grid-row: 2; align-self: end; }

  /* ════════════════════════════════════
     Dashboard
     ════════════════════════════════════ */

  /* 標題列：堆疊，匯出按鈕全寬 */
  #dashboard-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }
  #dashboard-header h1 { font-size: 17px !important; }
  #btn-export-excel { width: 100%; justify-content: center; }

  /* 三格通知 → 單欄 */
  #reminders-grid { grid-template-columns: 1fr !important; }

  /* 通知卡片防溢出 */
  #reminders-grid .card,
  #not-posted-list, #unpaid-posted-list,
  #no-metrics-list, #pickup-reminder-list {
    width: 100%; max-width: 100%; overflow: hidden;
  }
  #not-posted-list > div, #unpaid-posted-list > div, #no-metrics-list > div {
    overflow: hidden; width: 100%; max-width: 100%;
  }
  #not-posted-list > div > div,
  #unpaid-posted-list > div > div,
  #no-metrics-list > div > div { min-width: 0; }

  /* 抽獎提醒卡片網格 → 單欄 */
  #pickup-reminder-list > div { grid-template-columns: 1fr !important; }

  /* 已上片未匯款：條目堆疊顯示 */
  .reminder-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
  }
  .reminder-amount { margin-left: 0 !important; }
  .bank-line { flex-wrap: wrap !important; }
  .confirm-btn-row { flex-wrap: wrap !important; justify-content: flex-start !important; }
  .project-tags { flex-wrap: wrap !important; }

  /* ════════════════════════════════════
     其他頁面
     ════════════════════════════════════ */

  /* 專案管理標題換行 */
  #projects-page-header { flex-wrap: wrap !important; gap: 8px !important; }

  /* 年度切換器縮小 */
  #year-switcher { padding: 3px 6px !important; }
}

/* 極小螢幕 (< 360px) */
@media (max-width: 360px) {
  .mob-tab span { display: none; }
  .mob-tab { gap: 0; }
  .mob-tab i { font-size: 20px; }
}


/* ======== Multi-select 擴充選項 ======== */
.multi-select-special { background: #f8f5ff; font-weight: 600; }
.multi-select-special:hover { background: #ede9fe; }
.multi-select-panel { max-height: 260px; }

/* ======== 部落客卡片優化 ======== */
.blogger-card-wrap { transition: box-shadow .15s, transform .1s; }
.blogger-card-wrap:hover { transform: translateY(-1px); }

/* ======== 門市卡片優化 ======== */
.store-card-detail { padding: 8px 14px 12px; border-top: 1px solid #f1f5f9; }

/* ======== 寄送資訊區塊 ======== */
.delivery-info-block { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 7px; padding: 8px 10px; font-size: 12px; }

/* ======== Stage 2 手機響應式 ======== */
@media (max-width: 768px) {
  /* header 在手機允許換行 */
  .s2-card-header { flex-wrap: wrap; }
  .s2-header-right { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
  .s2-header-meta { flex-wrap: wrap; gap: 4px; }
  /* 費用格子：手機 2 欄 */
  .s2-fee-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* 讚/不推按鈕縮小 */
  .s2-like-btn, .s2-dislike-btn { padding: 4px 8px; font-size: 11px; }
  /* 得獎者 chip 全寬 */
  .s2-winner-chip { width: 100%; }
  /* 備註 popup 手機優化 */
  #rate-note-popup { min-width: 90vw !important; padding: 18px 16px !important; }
  /* Tab 按鈕縮小文字 */
  .s2-tab-btn { padding: 7px 10px; font-size: 11px; }
  .s2-tab-btn span { display: none; }
  /* header 操作按鈕換行 */
  .s2-header-actions { flex-wrap: wrap; gap: 4px; }
}

/* ======== 評分按鈕 active 狀態 ======== */
.s2-like-btn.s2-rate-active {
  background: #16a34a !important;
  color: #fff !important;
  border-color: #15803d !important;
  box-shadow: 0 0 0 2px #bbf7d0;
}
.s2-dislike-btn.s2-rate-active {
  background: #e85d04 !important;
  color: #fff !important;
  border-color: #c2410c !important;
  box-shadow: 0 0 0 2px #fed7aa;
}

/* 評分 toast info 顏色 */
