/* ========================================================
   TCTarget Admin Dashboard Styles
   Obsidian Dark Mode, High-density Cockpit Design
   ======================================================== */

:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #111622;
  --bg-surface: #182030;
  --bg-card: #1f293d;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 189, 248, 0.4);
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Microsoft JhengHei", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.admin-navbar {
  height: 64px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: #fff;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.admin-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.model-tags {
  display: flex;
  gap: 12px;
  align-items: center;
}

.model-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.model-tag.active {
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.dot-green {
  width: 7px;
  height: 7px;
  background: var(--accent-emerald);
  border-radius: 50%;
  display: inline-block;
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-open-site {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-open-site:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Stats Ribbon */
.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 16px 24px;
  background: var(--bg-primary);
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-color);
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.stat-card.alert {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.05);
}
.stat-card.alert .stat-value {
  color: #fb7185;
}

.stat-card.points {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(37, 99, 235, 0.04) 100%);
}
.stat-card.points .stat-value {
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

/* Main 2-Column Cockpit */
.dashboard-main {
  flex: 1;
  display: grid;
  grid-template-columns: 380px 1fr;
  overflow: hidden;
}

/* Column 1: Sessions List */
.sessions-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sessions-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.filter-tabs {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
}

.filter-tab {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.sessions-list {
  flex: 1;
  overflow-y: auto;
}

.session-item {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.session-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.session-item.selected {
  background: var(--bg-surface);
  border-left: 3px solid var(--primary);
}

.session-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.session-user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
}

.session-time {
  font-size: 11px;
  color: var(--text-sub);
}

.session-preview {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

.session-tags {
  display: flex;
  gap: 6px;
  align-items: center;
}

.status-badge {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.status-badge.bot {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-badge.human_requested {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
  animation: pulse-red 1.5s infinite;
}

.status-badge.human_active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-badge.resolved {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Column 2: Chat Workspace */
.chat-workspace {
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.current-session-info h3 {
  font-size: 15px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.current-session-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-action {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-takeover {
  background: var(--accent-emerald);
  color: #fff;
}
.btn-takeover:hover {
  background: #059669;
}

.btn-handback {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.btn-handback:hover {
  background: rgba(59, 130, 246, 0.35);
}

/* Chat Messages */
.workspace-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  margin-bottom: 14px;
}

.admin-msg-row.user {
  align-self: flex-start;
  align-items: flex-start;
}

/* AI Assistant messages aligned to the RIGHT side */
.admin-msg-row.model {
  align-self: flex-end;
  align-items: flex-end;
}

/* Human Support messages aligned to the RIGHT side */
.admin-msg-row.admin {
  align-self: flex-end;
  align-items: flex-end;
}

.admin-msg-sender {
  font-size: 11.5px;
  font-weight: 600;
  margin-bottom: 4px;
  padding: 0 4px;
}
.admin-msg-row.user .admin-msg-sender {
  color: #94a3b8;
}
.admin-msg-row.model .admin-msg-sender {
  color: #38bdf8;
  text-align: right;
}
.admin-msg-row.admin .admin-msg-sender {
  color: #34d399;
  text-align: right;
}

.admin-bubble {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.6;
  word-break: break-word;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.admin-msg-row.user .admin-bubble {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-left-radius: 4px;
  color: #fff;
}

.admin-msg-row.model .admin-bubble {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-bottom-right-radius: 4px;
  color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.12);
}

.admin-msg-row.admin .admin-bubble {
  background: linear-gradient(135deg, #065f46, #047857);
  color: #fff;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.admin-msg-time {
  font-size: 10.5px;
  color: var(--text-sub);
  margin-top: 4px;
  padding: 0 4px;
}
.admin-msg-row.model .admin-msg-time,
.admin-msg-row.admin .admin-msg-time {
  text-align: right;
}

/* Rich Markdown Typography inside admin chat bubbles (matching client widget) */
.admin-bubble p {
  margin: 0 0 8px 0;
  line-height: 1.65;
}
.admin-bubble p:last-child {
  margin-bottom: 0;
}

.admin-bubble strong {
  color: #ffffff;
  font-weight: 700;
}

.admin-bubble em {
  font-style: italic;
  color: #cbd5e1;
}

.admin-bubble h3 {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 12px 0 6px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-bubble h3:first-child {
  margin-top: 0;
}

.admin-bubble h4 {
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
  margin: 10px 0 4px 0;
}
.admin-bubble h4:first-child {
  margin-top: 0;
}

.admin-bubble h5, .admin-bubble h6 {
  font-size: 13px;
  font-weight: 600;
  color: #93c5fd;
  margin: 8px 0 4px 0;
}

.admin-bubble hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
  margin: 12px 0;
}

.admin-bubble ul, .admin-bubble ol {
  margin: 6px 0 10px 20px;
  padding: 0;
}
.admin-bubble li {
  margin-bottom: 4px;
  line-height: 1.6;
  color: #e2e8f0;
}
.admin-bubble li:last-child {
  margin-bottom: 0;
}

.admin-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 12.5px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.admin-bubble th, .admin-bubble td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 7px 12px;
  text-align: left;
}
.admin-bubble th {
  background: rgba(255, 255, 255, 0.08);
  color: #38bdf8;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3px;
}
.admin-bubble tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.admin-bubble img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.admin-bubble a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.admin-bubble a:hover {
  color: #7dd3fc;
}

.admin-bubble code {
  background: rgba(15, 23, 42, 0.7);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #38bdf8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Bottom Reply Composer */
.workspace-composer {
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.quick-templates {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.btn-suggest-reply {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(37, 99, 235, 0.22) 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.15);
}

.btn-suggest-reply:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.28) 0%, rgba(37, 99, 235, 0.38) 100%);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.btn-suggest-reply:active:not(:disabled) {
  transform: translateY(0);
}

.btn-suggest-reply:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-suggest-reply.loading .suggest-icon {
  display: inline-block;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.suggest-tip {
  font-size: 12px;
  color: var(--text-sub);
  transition: all 0.2s ease;
}

.suggest-tip.success {
  color: #34d399;
}

.suggest-tip.error {
  color: #f87171;
}

.composer-input-row {
  display: flex;
  gap: 12px;
}

.composer-textarea {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-size: 13.5px;
  resize: none;
  height: 52px;
  outline: none;
}
.composer-textarea:focus {
  border-color: var(--primary);
}

.btn-send-admin {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-send-admin:hover {
  background: #047857;
  transform: translateY(-1px);
}

/* Column 3: Knowledge & Pipeline Explorer */
.knowledge-sidebar {
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.knowledge-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.pipeline-card {
  padding: 16px;
  background: rgba(56, 189, 248, 0.04);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: var(--radius-md);
  margin: 16px;
}

.pipeline-card h4 {
  font-size: 13px;
  color: #38bdf8;
  margin-bottom: 8px;
}

.pipeline-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.btn-trigger-pipeline {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-trigger-pipeline:hover {
  opacity: 0.9;
}

.knowledge-files-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 16px;
}

.knowledge-file-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.knowledge-file-item:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.file-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #e2e8f0;
}
.file-meta {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* ========================================================
   Settings Button & Dedicated Settings View Styles
   ======================================================== */

.btn-nav-settings {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  margin-right: 8px;
}
.btn-nav-settings:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  transform: translateY(-1px);
}
.btn-nav-settings.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.settings-main {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-primary);
  padding: 32px 24px 60px;
  display: flex;
  justify-content: center;
}

.settings-container {
  max-width: 1040px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  gap: 16px;
}

.settings-header-bar h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-header-bar p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.btn-back-cockpit {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-back-cockpit:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 20px;
}

.settings-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.settings-card:hover {
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.card-icon {
  font-size: 24px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.card-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}

.card-head p {
  font-size: 12px;
  color: var(--text-muted);
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-label:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(56, 189, 248, 0.3);
}

.option-label input[type="radio"] {
  margin-top: 3px;
  accent-color: #38bdf8;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.option-label:has(input[type="radio"]:checked) {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.option-content {
  flex: 1;
}

.option-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.badge-rec {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.option-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Export Card */
.export-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(31, 41, 61, 0.8), rgba(16, 24, 40, 0.9));
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.export-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.export-info ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}

.export-info li {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.export-info li::before {
  content: "•";
  color: #10b981;
  font-weight: bold;
}

.btn-download-csv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-download-csv:hover {
  background: linear-gradient(135deg, #047857, #059669);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
/* Embed Card Styles */
.embed-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(24, 32, 48, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.embed-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.embed-desc code {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.code-box-wrapper {
  position: relative;
  background: #070a12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.code-box {
  margin: 0;
  overflow-x: auto;
  flex: 1;
}

.code-box code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  color: #7dd3fc;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.btn-copy-code {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-copy-code:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.embed-tip {
  font-size: 12.5px;
  color: #34d399;
  font-weight: 600;
  margin-top: 8px;
  min-height: 18px;
  transition: opacity 0.2s ease;
}

.settings-actions-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 10px;
}

.btn-save-settings {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}
.btn-save-settings:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.settings-save-tip {
  font-size: 13.5px;
  font-weight: 600;
  transition: opacity 0.3s ease;
}
.settings-save-tip.success {
  color: #34d399;
}
.settings-save-tip.error {
  color: #f43f5e;
}

