/* ════════════════════════════════════════════════════════════════════════════
   FinCanvas — Workspace UI
   Reutiliza las CSS variables de TheWaveRadar (base.css)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Layout ──────────────────────────────────────────────────────────────── */
.fc-canvas { padding: 0 !important; }

.fc-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

.fc-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--tw-bg-card, #1e293b);
  border-right: 1px solid var(--tw-border, #334155);
  display: flex;
  flex-direction: column;
  padding: 16px 0;
}

.fc-sidebar-header {
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--tw-border, #334155);
}
.fc-sidebar-header h2 {
  font-size: 16px;
  color: var(--tw-text-head, #e2e8f0);
  margin: 0;
}

.fc-sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }

.fc-sidebar-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tw-text-muted, #64748b);
  padding: 8px 16px 4px;
}

.fc-sidebar-page-link {
  display: block;
  padding: 8px 16px;
  color: var(--tw-text-body, #cbd5e1);
  text-decoration: none;
  font-size: 13px;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.fc-sidebar-page-link:hover { background: rgba(255,255,255,0.04); }
.fc-sidebar-page-link.is-active {
  background: rgba(255,255,255,0.06);
  border-left-color: var(--tw-accent, #16a34a);
  color: var(--tw-text-head, #e2e8f0);
}

.fc-default-badge {
  font-size: 10px;
  color: var(--tw-text-muted, #64748b);
  margin-left: 4px;
}

.fc-sidebar-conn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 12px;
  color: var(--tw-text-body, #cbd5e1);
}
.fc-conn-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--tw-text-muted, #64748b);
}
.fc-conn-dot.active { background: #16a34a; }
.fc-conn-ago {
  margin-left: auto;
  font-size: 11px;
  color: var(--tw-text-muted, #64748b);
}

.fc-sidebar-actions { padding: 8px 12px; }
.fc-btn-new-page {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--tw-border, #334155);
  border-radius: 6px;
  background: transparent;
  color: var(--tw-text-muted, #64748b);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.fc-btn-new-page:hover {
  border-color: var(--tw-accent, #16a34a);
  color: var(--tw-text-head, #e2e8f0);
}

.fc-sidebar-bottom {
  padding: 8px 0;
  border-top: 1px solid var(--tw-border, #334155);
}
.fc-sidebar-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  color: var(--tw-text-body, #cbd5e1);
  text-decoration: none;
  font-size: 13px;
}
.fc-sidebar-link:hover { color: var(--tw-text-head, #e2e8f0); }
.fc-sidebar-link.is-active { color: var(--tw-accent, #16a34a); }

/* ── Main area ───────────────────────────────────────────────────────────── */
.fc-main {
  flex: 1;
  padding: 24px;
  overflow-x: hidden;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */
.fc-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.fc-grid-cell { min-width: 0; }

/* ── Widget card ─────────────────────────────────────────────────────────── */
.fc-widget {
  background: var(--tw-bg-card, #1e293b);
  border: 1px solid var(--tw-border, #334155);
  border-radius: 12px;
  padding: 16px;
  height: 100%;
}
.fc-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.fc-widget-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--tw-text-head, #e2e8f0);
}
.fc-widget-body { overflow: hidden; }
.fc-widget-empty, .fc-widget-error {
  padding: 16px;
  text-align: center;
  color: var(--tw-text-muted, #64748b);
  font-size: 13px;
}
.fc-widget-error { color: #dc2626; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.fc-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.fc-page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--tw-text-head, #e2e8f0);
  margin: 0;
}
.fc-page-actions { display: flex; gap: 8px; }

/* ── SVG charts ──────────────────────────────────────────────────────────── */
.fc-line-chart, .fc-sparkline, .fc-treemap, .fc-donut-gauge, .fc-score-ring {
  width: 100%;
  height: auto;
}
.fc-chart-label {
  font-size: 10px;
  fill: var(--tw-text-muted, #64748b);
}

/* ── Donut gauge ─────────────────────────────────────────────────────────── */
.fc-gauge-wrap { text-align: center; }
.fc-gauge-value {
  font-size: 22px;
  font-weight: 700;
  fill: var(--tw-text-head, #e2e8f0);
}
.fc-gauge-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 8px;
}
.fc-gauge-legend-item {
  font-size: 12px;
  color: var(--tw-text-body, #cbd5e1);
  display: flex;
  align-items: center;
  gap: 4px;
}
.fc-gauge-dot { width: 8px; height: 8px; border-radius: 50%; }
.fc-gauge-pct { color: var(--tw-text-muted, #64748b); }

/* ── Score ring ──────────────────────────────────────────────────────────── */
.fc-score-ring-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.fc-score-ring-label {
  font-size: 11px;
  color: var(--tw-text-muted, #64748b);
}

/* ── Thermometer ─────────────────────────────────────────────────────────── */
.fc-thermo-label {
  font-size: 12px;
  color: var(--tw-text-body, #cbd5e1);
  margin-bottom: 6px;
}
.fc-thermo-bar {
  height: 8px;
  background: var(--tw-border, #334155);
  border-radius: 4px;
  overflow: hidden;
}
.fc-thermo-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}
.fc-thermo-vals {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--tw-text-muted, #64748b);
  margin-top: 4px;
}
.fc-thermo-current { font-weight: 600; }

/* ── Data table ──────────────────────────────────────────────────────────── */
.fc-table-wrap { overflow-x: auto; }
.fc-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.fc-data-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tw-text-muted, #64748b);
  border-bottom: 1px solid var(--tw-border, #334155);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.fc-data-table td {
  padding: 8px 10px;
  color: var(--tw-text-body, #cbd5e1);
  border-bottom: 1px solid rgba(51,65,85,0.3);
}
.fc-data-table tr:hover td { background: rgba(255,255,255,0.02); }
.fc-cell-pos { color: #16a34a; }
.fc-cell-neg { color: #dc2626; }

/* ── Metric card ─────────────────────────────────────────────────────────── */
.fc-metric-card {
  padding: 12px 16px;
  background: var(--tw-bg-card, #1e293b);
  border-radius: 8px;
}
.fc-metric-title {
  font-size: 12px;
  color: var(--tw-text-muted, #64748b);
  margin-bottom: 4px;
}
.fc-metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--tw-text-head, #e2e8f0);
}
.fc-metric-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.fc-metric-subtitle {
  font-size: 12px;
  color: var(--tw-text-muted, #64748b);
}
.fc-metric-trend {
  font-size: 12px;
  font-weight: 600;
}

/* ── Note block ──────────────────────────────────────────────────────────── */
.fc-note-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--tw-text-head, #e2e8f0);
  margin-bottom: 8px;
}
.fc-note-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--tw-text-body, #cbd5e1);
}
.fc-note-content p { margin: 0 0 8px; }
.fc-note-content code {
  background: rgba(255,255,255,0.06);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 12px;
}

/* ── Badge row ───────────────────────────────────────────────────────────── */
.fc-badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ── Settings ────────────────────────────────────────────────────────────── */
.fc-settings { max-width: 720px; }
.fc-settings h2 {
  font-size: 20px;
  color: var(--tw-text-head, #e2e8f0);
  margin: 0 0 20px;
}
.fc-settings-section {
  margin-bottom: 32px;
}
.fc-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.fc-settings-header h3 {
  font-size: 16px;
  color: var(--tw-text-head, #e2e8f0);
  margin: 0;
}
.fc-settings-desc {
  font-size: 13px;
  color: var(--tw-text-muted, #64748b);
  margin: 0 0 12px;
}

.fc-conn-list { display: flex; flex-direction: column; gap: 8px; }
.fc-conn-card {
  background: var(--tw-bg-card, #1e293b);
  border: 1px solid var(--tw-border, #334155);
  border-radius: 8px;
  padding: 12px 16px;
}
.fc-conn-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.fc-conn-name {
  font-weight: 600;
  color: var(--tw-text-head, #e2e8f0);
  font-size: 14px;
}
.fc-conn-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}
.fc-conn-status.active { background: rgba(22,163,74,0.15); color: #16a34a; }
.fc-conn-status.inactive { background: rgba(100,116,139,0.15); color: #64748b; }
.fc-conn-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.fc-scope-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--tw-text-muted, #64748b);
}
.fc-conn-last {
  font-size: 11px;
  color: var(--tw-text-muted, #64748b);
  margin-left: auto;
}
.fc-conn-actions { margin-top: 8px; text-align: right; }

/* ── API Reference ───────────────────────────────────────────────────────── */
.fc-api-ref { display: flex; flex-direction: column; gap: 4px; }
.fc-api-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}
.fc-api-item code {
  background: rgba(22,163,74,0.15);
  color: #16a34a;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
}
.fc-api-item span {
  font-family: monospace;
  color: var(--tw-text-body, #cbd5e1);
  font-size: 12px;
}
.fc-api-item em {
  color: var(--tw-text-muted, #64748b);
  font-size: 12px;
  font-style: normal;
  margin-left: auto;
}

/* ── Activity feed ───────────────────────────────────────────────────────── */
.fc-activity-feed { display: flex; flex-direction: column; gap: 4px; }
.fc-activity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(51,65,85,0.3);
  font-size: 12px;
}
.fc-activity-action {
  font-family: monospace;
  color: var(--tw-accent, #16a34a);
  font-size: 11px;
}
.fc-activity-summary { color: var(--tw-text-body, #cbd5e1); }
.fc-activity-conn {
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  color: var(--tw-text-muted, #64748b);
}
.fc-activity-time {
  margin-left: auto;
  color: var(--tw-text-muted, #64748b);
  font-size: 11px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.fc-btn-sm {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid var(--tw-border, #334155);
  background: transparent;
  color: var(--tw-text-body, #cbd5e1);
  cursor: pointer;
}
.fc-btn-sm:hover { background: rgba(255,255,255,0.04); }
.fc-btn-danger {
  border-color: rgba(220,38,38,0.3);
  color: #dc2626;
}
.fc-btn-danger:hover { background: rgba(220,38,38,0.1); }

/* ── States ──────────────────────────────────────────────────────────────── */
.fc-loading, .fc-error {
  padding: 40px;
  text-align: center;
  color: var(--tw-text-muted, #64748b);
}
.fc-error { color: #dc2626; }
.fc-loading-sm { padding: 8px 16px; font-size: 12px; color: var(--tw-text-muted, #64748b); }
.fc-error-sm { padding: 8px 16px; font-size: 12px; color: #dc2626; }

.fc-auth-gate {
  text-align: center;
  padding: 80px 20px;
}
.fc-auth-gate h2 {
  font-size: 24px;
  color: var(--tw-text-head, #e2e8f0);
  margin: 0 0 12px;
}
.fc-auth-gate p {
  color: var(--tw-text-muted, #64748b);
  margin: 0 0 20px;
}

.fc-empty-state, .fc-empty-page, .fc-empty-conn {
  text-align: center;
  padding: 60px 20px;
  color: var(--tw-text-muted, #64748b);
}
.fc-empty-state h3 {
  font-size: 18px;
  color: var(--tw-text-head, #e2e8f0);
  margin: 0 0 8px;
}
.fc-empty-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}
.fc-empty-hint {
  font-size: 13px;
  color: var(--tw-text-muted, #64748b);
  margin-top: 8px;
}
.fc-empty-hint a { color: var(--tw-accent, #16a34a); }

/* ── Onboarding ──────────────────────────────────────────────────────────── */
.fc-onboarding {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 20px auto;
  text-align: left;
}
.fc-onboarding-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--tw-bg-card, #1e293b);
  border: 1px solid var(--tw-border, #334155);
  border-radius: 8px;
}
.fc-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tw-accent, #16a34a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.fc-onboarding-step strong {
  color: var(--tw-text-head, #e2e8f0);
  font-size: 14px;
}
.fc-step-desc {
  font-size: 12px;
  color: var(--tw-text-muted, #64748b);
  line-height: 1.4;
}
.fc-step-desc a { color: var(--tw-accent, #16a34a); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .fc-sidebar { width: 200px; }
  .fc-main { padding: 16px; }
  .fc-grid { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .fc-grid-cell { grid-column: span 6 !important; }
}

@media (max-width: 480px) {
  .fc-layout { flex-direction: column; }
  .fc-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--tw-border, #334155);
    padding: 8px;
  }
  .fc-sidebar-header { display: none; }
  .fc-sidebar-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 0;
  }
  .fc-sidebar-section-title { display: none; }
  .fc-sidebar-page-link {
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 6px 12px;
    font-size: 12px;
  }
  .fc-sidebar-page-link.is-active {
    border-bottom-color: var(--tw-accent, #16a34a);
    border-left-color: transparent;
  }
  .fc-sidebar-actions, .fc-sidebar-bottom { display: none; }
}

/* ── Chat ────────────────────────────────────────────────────────────────── */
.fc-chat-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  max-width: 720px;
  margin: 0 auto;
  background: var(--tw-bg-card, #1e293b);
  border-left: 1px solid var(--tw-border, #334155);
  border-right: 1px solid var(--tw-border, #334155);
}

.fc-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--tw-border, #334155);
  background: var(--tw-bg-card, #1e293b);
  flex-shrink: 0;
}
.fc-chat-back {
  color: var(--tw-text-muted, #94a3b8);
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
}
.fc-chat-back:hover { color: var(--tw-text-head, #f1f5f9); }
.fc-chat-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tw-accent, #16a34a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.fc-chat-header-info { flex: 1; min-width: 0; }
.fc-chat-header-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--tw-text-head, #f1f5f9);
  line-height: 1.2;
}
.fc-chat-header-provider {
  font-size: 11px;
  color: var(--tw-text-muted, #94a3b8);
}
.fc-chat-header-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.fc-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fc-chat-msg { display: flex; gap: 8px; align-items: flex-start; }
.fc-chat-user { justify-content: flex-end; }
.fc-chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tw-accent, #16a34a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.fc-chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.fc-chat-bubble code {
  background: rgba(255,255,255,0.1);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
}
.fc-chat-bubble-user {
  background: var(--tw-accent, #16a34a);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.fc-chat-bubble-agent {
  background: var(--tw-bg-body, #0f172a);
  color: var(--tw-text-body, #cbd5e1);
  border: 1px solid var(--tw-border, #334155);
  border-bottom-left-radius: 4px;
}

.fc-chat-tool {
  justify-content: center;
}
.fc-chat-tool-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--tw-text-muted, #94a3b8);
  padding: 4px 12px;
  background: var(--tw-bg-body, #0f172a);
  border-radius: 12px;
  border: 1px solid var(--tw-border, #334155);
}
.fc-chat-tool-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tw-accent, #16a34a);
  animation: fc-pulse 1.5s ease-in-out infinite;
}
@keyframes fc-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.fc-chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--tw-border, #334155);
  background: var(--tw-bg-card, #1e293b);
  flex-shrink: 0;
}
.fc-chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--tw-bg-body, #0f172a);
  border: 1px solid var(--tw-border, #334155);
  border-radius: 20px;
  padding: 6px 6px 6px 16px;
}
.fc-chat-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--tw-text-body, #cbd5e1);
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  outline: none;
  font-family: inherit;
  max-height: 120px;
}
.fc-chat-input::placeholder { color: var(--tw-text-muted, #64748b); }
.fc-chat-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--tw-accent, #16a34a);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}
.fc-chat-send:hover { opacity: 0.85; }
.fc-chat-send:disabled { opacity: 0.4; cursor: default; }

/* Thinking dots */
.fc-chat-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}
.fc-chat-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tw-text-muted, #94a3b8);
  animation: fc-bounce 1.4s ease-in-out infinite;
}
.fc-chat-dots span:nth-child(2) { animation-delay: 0.2s; }
.fc-chat-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes fc-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Welcome screen */
.fc-chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 40px 20px;
  gap: 8px;
}
.fc-chat-welcome-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--tw-accent, #16a34a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}
.fc-chat-welcome h3 {
  font-size: 20px;
  color: var(--tw-text-head, #f1f5f9);
  margin: 0;
}
.fc-chat-welcome p {
  font-size: 14px;
  color: var(--tw-text-muted, #94a3b8);
  max-width: 400px;
  line-height: 1.5;
}
.fc-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.fc-chat-suggestion {
  background: var(--tw-bg-body, #0f172a);
  border: 1px solid var(--tw-border, #334155);
  color: var(--tw-text-body, #cbd5e1);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  font-family: inherit;
}
.fc-chat-suggestion:hover {
  border-color: var(--tw-accent, #16a34a);
  color: var(--tw-accent, #16a34a);
}

/* Setup screen */
.fc-chat-setup {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 40px 20px;
  gap: 8px;
}
.fc-chat-setup h3 {
  font-size: 20px;
  color: var(--tw-text-head, #f1f5f9);
  margin: 0;
}
.fc-chat-setup p {
  font-size: 14px;
  color: var(--tw-text-muted, #94a3b8);
  max-width: 400px;
  line-height: 1.5;
}
.fc-chat-setup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  text-align: left;
  margin-top: 16px;
}
.fc-chat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tw-text-head, #f1f5f9);
  letter-spacing: 0.03em;
}
.fc-chat-select,
.fc-chat-key-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--tw-bg-body, #0f172a);
  border: 1px solid var(--tw-border, #334155);
  border-radius: 8px;
  color: var(--tw-text-body, #cbd5e1);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.fc-chat-select:focus,
.fc-chat-key-input:focus { border-color: var(--tw-accent, #16a34a); }
.fc-chat-hint {
  font-size: 12px;
  color: var(--tw-text-muted, #64748b);
  line-height: 1.4;
}
.fc-chat-setup-form .tw-btn {
  margin-top: 8px;
}

/* Chat loading */
.fc-chat-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--tw-text-muted, #94a3b8);
  font-size: 14px;
}

/* Connection card chat button */
.fc-conn-chat-btn {
  background: var(--tw-accent, #16a34a);
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.fc-conn-chat-btn:hover { opacity: 0.85; }

@media (max-width: 480px) {
  .fc-chat-layout {
    height: calc(100vh - 56px);
    border: none;
  }
  .fc-chat-bubble { max-width: 92%; }
  .fc-chat-suggestions { flex-direction: column; }
}
