/* ===== Admin console layout ===== */
.admin-header {
  background: #111827;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.admin-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-logo {
  font-size: 1.1rem;
  font-weight: 700;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.role-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.role-badge.superadmin { background: #dc2626; }
.role-badge.eventadmin { background: var(--primary); }

.admin-layout {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 24px;
}

.admin-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  padding: 12px 8px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.side-nav {
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.side-nav:hover:not(:disabled) { background: var(--primary-light); }
.side-nav.active { background: var(--primary); color: #fff; }
.side-nav:disabled { color: #9ca3af; cursor: not-allowed; }

.admin-main {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  min-height: 60vh;
}

.admin-view { display: none; }
.admin-view.active { display: block; }

.view-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.view-head h2 { font-size: 1.25rem; }

/* ===== Table ===== */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th,
.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.data-table th {
  background: #f9fafb;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.82rem;
  white-space: nowrap;
}
.data-table tr:hover td { background: #fafbfc; }
.data-table .empty { text-align: center; color: var(--text-secondary); padding: 40px; }

.status-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: #e5e7eb;
}
.status-chip.upcoming { background: #dbeafe; color: #1e40af; }
.status-chip.ongoing  { background: #dcfce7; color: #166534; }
.status-chip.ended    { background: #f3f4f6; color: #6b7280; }
.status-chip.archived { background: #fee2e2; color: #991b1b; }

/* ===== Buttons ===== */
/* 覆蓋 style.css 的 .btn-primary { width: 100%; padding: 14px; box-shadow: ...; } */
.btn-primary, .btn-ghost, .btn-danger {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  border: none;
  font-weight: 500;
  width: auto;
  box-shadow: none;
  transform: none;
  transition: background 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.admin-header .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.4); }
.admin-header .btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: #fef2f2; }

.row-actions { display: flex; gap: 6px; }
.row-actions button { padding: 5px 10px; font-size: 0.8rem; }

/* ===== Modal ===== */
/* 注意：style.css 也定義了 .modal（前台 bottom-sheet），admin.css 需明確覆蓋衝突屬性 */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px;
  overflow-y: auto;
  /* 覆蓋 style.css 的前台 modal 樣式，確保遮罩蓋滿整個視窗 */
  max-width: none;
  max-height: none;
  width: auto;
  border-radius: 0;
  animation: none;
  margin: 0;
}
.modal.active { display: flex; }

/* 覆蓋 style.css 的 @media (min-width: 640px) .modal 規則 */
@media (min-width: 640px) {
  .modal {
    border-radius: 0;
    margin: 0;
    max-height: none;
  }
}
.modal-inner {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
}
.modal-inner h3 { margin-bottom: 16px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input[type=text],
.form-group input[type=date],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.user-search-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 4px;
  display: none;
}
.user-search-list.active { display: block; }
.user-search-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.user-search-item:last-child { border-bottom: none; }
.user-search-item:hover { background: var(--primary-light); }

.checklist {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}
.checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.9rem;
  color: var(--text);
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
  z-index: 2000;
}
.toast.active { display: block; }

/* 依角色顯示/隱藏 */
body:not(.is-superadmin) .superadmin-only { display: none !important; }

/* ===== Series status chips ===== */
.status-chip.active   { background: #dcfce7; color: #166534; }

/* ===== File Ingest Modal ===== */
.ingest-drop {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  transition: border-color 0.2s, background 0.2s;
}
.ingest-drop:hover,
.ingest-drop.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* spinner */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ingest preview */
.ingest-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.ingest-field-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.88rem;
}
.ingest-field-row span { color: var(--text-secondary); }
.ingest-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  max-height: 340px;
  overflow-y: auto;
}
.ingest-session-item {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
}
.ingest-session-item strong { display: block; margin-bottom: 2px; }

/* ===== Saving Overlay ===== */
#saving-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}
#saving-overlay.active { display: flex; }
#saving-overlay-msg {
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  max-width: 320px;
  line-height: 1.5;
}
#saving-overlay .spinner {
  width: 52px;
  height: 52px;
  border-width: 5px;
  border-color: rgba(255,255,255,.25);
  border-top-color: #fff;
}

/* ===== P3：資源管理 ===== */

/* 篩選列 */
.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-row select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.88rem;
  background: #fff;
  min-width: 160px;
}

/* 標籤核取清單（resource modal） */
.resource-tag-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding: 2px;
}

.tag-group { }
.tag-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.tag-group-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  user-select: none;
}
.tag-check:hover { background: #f0f7ff; border-color: var(--primary); }
.tag-check input { display: none; }
.tag-check:has(input:checked) {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== P3：標籤管理頁 ===== */
/* ===== Sub-tab bar（標籤管理 / 全域信號庫）===== */
.sub-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
}
.sub-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.sub-tab:hover { color: var(--primary, #3b82f6); }
.sub-tab.active {
  color: var(--primary, #3b82f6);
  border-bottom-color: var(--primary, #3b82f6);
  font-weight: 600;
}

.tag-category-section {
  margin-bottom: 24px;
}
.tag-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.tag-chips-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-chip-admin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 12px;
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
}
.tag-chip-del {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  border-radius: 50%;
  transition: color .15s, background .15s;
}
.tag-chip-del:hover { color: var(--danger); background: #fee2e2; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; padding: 12px; }
  .admin-sidebar nav { flex-direction: row; overflow-x: auto; }
  .side-nav { white-space: nowrap; }
  .form-row { grid-template-columns: 1fr; }
}

/* ===== 問卷匯入 ===== */
.survey-list-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.survey-list-toolbar input[type=text] {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  background: #fff;
}

.survey-info-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: #0c4a6e;
}
.survey-info-box p { margin: 0 0 4px; }
.survey-info-box p:last-child { margin: 0; }

/* 重複警告框 */
.survey-dup-warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.875rem;
  color: #92400e;
  margin-bottom: 10px;
}

/* 預先生成區塊 */
.survey-generate-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 8px;
}
.survey-generate-box h4 { color: #14532d; }

/* 進度條 */
.survey-progress-bar-wrap {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.survey-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.3s ease;
  width: 0%;
}

/* 訊號標籤 */
.signal-tag {
  display: inline-block;
  padding: 1px 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  font-size: 0.72rem;
  color: #1e40af;
  margin: 1px;
}

/* ===== 活動產業類型多選 ===== */
.industry-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: var(--surface, #fff);
}

.industry-checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.industry-checkbox-item:hover {
  border-color: var(--primary, #3b82f6);
  background: #eff6ff;
}

.industry-checkbox-item input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--primary, #3b82f6);
}

.industry-checkbox-item:has(input:checked) {
  border-color: var(--primary, #3b82f6);
  background: #eff6ff;
  color: var(--primary, #3b82f6);
}

/* ===== 說帖知識庫 — 欄位頁籤 ===== */
.knowledge-field-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 2px solid var(--border, #e5e7eb);
  margin-bottom: 0;
  flex-wrap: wrap;
}

.kf-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s, border-color 0.15s;
}

.kf-tab:hover {
  color: var(--primary, #3b82f6);
}

.kf-tab.active {
  color: var(--primary, #3b82f6);
  border-bottom-color: var(--primary, #3b82f6);
}

.kf-ai-btn {
  margin-left: auto;
  font-size: 0.82rem;
  padding: 5px 12px;
}

/* 問卷設定方式頁籤 */
.q-mode-tab {
  padding: 6px 18px;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.q-mode-tab:hover { color: var(--primary, #3b82f6); }
.q-mode-tab.active {
  color: var(--primary, #3b82f6);
  border-bottom-color: var(--primary, #3b82f6);
  font-weight: 600;
}

/* 人工輸入問項卡 */
.q-manual-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
}
.q-manual-opt-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.badge-required {
  display: inline-block;
  padding: 1px 5px;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
}

.badge-optional {
  display: inline-block;
  padding: 1px 5px;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
}

.kf-tab-content {
  border: 1px solid var(--border, #e5e7eb);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.kf-pane { display: none; }
.kf-pane.active { display: block; }

.kf-pane textarea {
  width: 100%;
  box-sizing: border-box;
}


/* ===== 講師知識卡 ===== */
.speaker-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.sc-card {
  background: var(--surface, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sc-card-code {
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-secondary, #6b7280);
  background: var(--bg, #f3f4f6);
  border-radius: 4px;
  padding: 2px 6px;
}

.sc-card-speaker {
  font-weight: 600;
  font-size: 0.875rem;
}

.sc-card-quote {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary, #4f46e5);
  line-height: 1.4;
}

.sc-card-content {
  font-size: 0.8rem;
  color: var(--text-secondary, #6b7280);
  line-height: 1.5;
}

.sc-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

/* ===== Sidebar layout (sticky + flex column) ===== */
.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 76px;
  align-self: start;
  max-height: calc(100vh - 100px);
}

.admin-sidebar nav {
  flex: 1;
}

/* ===== Sidebar help button ===== */
.sidebar-help-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 8px;
}

.sidebar-help-btn {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.sidebar-help-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* ===== Help guide modal ===== */
.help-guide-inner {
  max-width: 600px !important;
}

.help-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.help-guide-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}
.modal-close:hover { background: #f3f4f6; color: var(--text); }


.help-guide-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.help-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.help-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 10px;
  border-left: 3px solid var(--primary);
}

.help-item-icon {
  font-size: 1.3rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.help-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.help-item-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.help-item-desc code {
  background: #e5e7eb;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: monospace;
  color: #374151;
}

/* ===== Help flow section ===== */
.help-flow-section {
  background: #f0fdf4;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid #bbf7d0;
}

.help-flow-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.help-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.flow-step {
  background: #fff;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 6px 10px;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #166534;
}

.flow-step-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.flow-step-label {
  font-size: 0.78rem;
  font-weight: 600;
}

.flow-step-label small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: #6b7280;
}

.flow-arrow {
  color: #6b7280;
  font-size: 1rem;
  flex-shrink: 0;
}

.help-flow-note {
  font-size: 0.8rem;
  color: #166534;
  margin: 10px 0 0;
  line-height: 1.5;
}

/* ===== Info FAB (操作說明按鈕) ===== */
.info-fab {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  transition: background 0.2s, color 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.info-fab:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.08);
}

/* Info modal body */
.info-modal-body {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text);
}
.info-modal-body .info-step {
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}
.info-modal-body .info-step-title {
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 4px;
}
.info-modal-body .info-step p {
  margin: 4px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.info-modal-body .info-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 4px;
}
.info-tag.before { background: #dbeafe; color: #1e40af; }
.info-tag.after  { background: #dcfce7; color: #166534; }
.info-tag.optional { background: #fef3c7; color: #92400e; }

/* ===== 問題反饋按鈕（sidebar 底部） ===== */
.sidebar-feedback-btn {
  margin-top: 6px;
  border-color: #fbbf24;
  color: #92400e;
}
.sidebar-feedback-btn:hover {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #78350f;
}

/* ===== 反饋類型選擇（後台 modal 共用） ===== */
.feedback-category-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feedback-cat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.feedback-cat:has(input:checked) {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
  font-weight: 500;
}
.feedback-cat input[type="radio"] {
  display: none;
}
