/* ===== mape Design System ===== */
/* Brand: Orange #FF9933, Blue #7B8EAD, Peach #FFA64C, Dark Orange #E67333 */
/* Font: Montserrat */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand Colors — from mape logo */
  --brand-slate: #7B8EAD;
  --brand-sage: #9FBFAB;
  --brand-gold: #D4C48A;
  --brand-slate-light: #9AABC4;
  --brand-sage-light: #B5D1BF;

  /* Dark Theme — Navy-tinted Blacks (progressive + Apple-like) */
  --bg-primary: #0D1117;
  --bg-secondary: #161B22;
  --bg-tertiary: #21262D;
  --bg-elevated: #282E36;
  --bg-hover: rgba(139, 148, 158, 0.08);
  --bg-active: rgba(139, 148, 158, 0.14);

  /* Glass — Subtle Navy */
  --glass-bg: rgba(22, 27, 34, 0.85);
  --glass-border: rgba(139, 148, 158, 0.10);
  --glass-highlight: rgba(255, 255, 255, 0.02);

  /* Text — Clean Hierarchy */
  --text-primary: #E6EDF3;
  --text-secondary: #8B949E;
  --text-tertiary: #484F58;
  --text-accent: var(--brand-slate-light);
  --text-link: var(--brand-slate-light);

  /* Borders — Hairline */
  --border-default: rgba(139, 148, 158, 0.12);
  --border-hover: rgba(139, 148, 158, 0.22);
  --border-active: var(--brand-slate);

  /* Shadows — Minimal */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow-slate: 0 0 20px rgba(123, 142, 173, 0.12);
  --shadow-glow-sage: 0 0 20px rgba(159, 191, 171, 0.12);
  --shadow-glow-gold: 0 0 20px rgba(212, 196, 138, 0.10);

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, var(--brand-slate), var(--brand-sage));
  --gradient-warm: linear-gradient(135deg, var(--brand-gold), var(--brand-sage));
  --gradient-dark: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Radius — Rounder (Apple-like) */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions — Smooth */
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;

  /* Layout */
  --sidebar-width: 260px;
  --detail-panel-width: 380px;
  --header-height: 52px;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.01em;
}

a {
  color: var(--text-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

/* ===== App Layout ===== */
.app-container {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform var(--duration-normal) var(--ease-out);
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.sidebar-header {
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  border-bottom: 1px solid var(--border-default);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 34px;
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.sidebar-logo .logo-dot-accent {
  color: var(--brand-sage);
}

.new-chat-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: calc(100% - var(--space-lg) * 2);
  margin: var(--space-md) var(--space-lg);
  padding: var(--space-md);
  background: rgba(123, 142, 173, 0.10);
  color: var(--brand-slate);
  border: 1px solid rgba(123, 142, 173, 0.20);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  transition: all var(--duration-fast) var(--ease-out);
}

.new-chat-btn:hover {
  background: rgba(123, 142, 173, 0.15);
  border-color: rgba(123, 142, 173, 0.30);
  transform: translateY(-1px);
}

.new-chat-btn svg {
  width: 18px;
  height: 18px;
}

.sidebar-section-title {
  padding: var(--space-md) var(--space-lg) var(--space-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-sm);
}

.chat-history-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin: 2px 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
  font-size: 13px;
  color: var(--text-secondary);
}

.chat-history-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.chat-history-item.active {
  background: var(--bg-active);
  color: var(--text-primary);
}

.chat-history-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.5;
}

.chat-history-item .chat-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gradient-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  color: var(--bg-primary);
}

.user-info {
  flex: 1;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
}

.user-role {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

/* ===== Top Bar ===== */
.topbar {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  border-bottom: 1px solid var(--border-default);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.topbar-title {
  font-size: 15px;
  font-weight: 600;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  background: rgba(123, 142, 173, 0.08);
  color: var(--brand-slate);
  border: 1px solid rgba(123, 142, 173, 0.15);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.topbar-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast);
  color: var(--text-secondary);
}

.topbar-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.topbar-btn svg {
  width: 18px;
  height: 18px;
}

.menu-toggle {
  display: none;
}

/* ===== Chat Area ===== */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-xl) 0;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--bg-active);
  border-radius: var(--radius-full);
}

/* Messages */
.message-wrapper {
  padding: var(--space-md) var(--space-xl);
  max-width: 850px;
  margin: 0 auto;
  width: 100%;
  animation: messageIn var(--duration-normal) var(--ease-out);
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-wrapper.user-message {
  display: flex;
  justify-content: flex-end;
}

.message-wrapper.user-message .message-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  max-width: 75%;
  font-size: 14px;
}

.message-wrapper.ai-message {
  display: flex;
  gap: var(--space-md);
}

.ai-avatar {
  width: 32px;
  height: 32px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.ai-avatar svg {
  width: 18px;
  height: 18px;
  color: var(--brand-slate);
}

.ai-message-body {
  flex: 1;
  min-width: 0;
}

.ai-message-body .message-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
}

.ai-message-body .message-content p {
  margin-bottom: var(--space-md);
}

.ai-message-body .message-content p:last-child {
  margin-bottom: 0;
}

.ai-message-body .message-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.ai-message-body .message-content code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
}

.ai-message-body .message-content pre {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  overflow-x: auto;
  margin: var(--space-md) 0;
}

.ai-message-body .message-content pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
}

/* Message Actions */
.message-actions {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.message-wrapper:hover .message-actions {
  opacity: 1;
}

.msg-action-btn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--duration-fast);
}

.msg-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.msg-action-btn svg {
  width: 14px;
  height: 14px;
}

/* Welcome Screen */
.welcome-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl);
  animation: fadeIn var(--duration-slow) var(--ease-out);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.welcome-logo {
  width: 56px;
  height: 56px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.welcome-logo svg {
  width: 32px;
  height: 32px;
  color: var(--brand-slate);
}

.welcome-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.5px;
}

.welcome-title span {
  color: var(--brand-slate);
}

.welcome-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: var(--space-2xl);
}

.welcome-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-width: 700px;
  width: 100%;
}

.welcome-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: left;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.welcome-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.welcome-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  font-size: 20px;
}

.welcome-card-icon.newsletter {
  background: rgba(255, 255, 255, 0.06);
}

.welcome-card-icon.segment {
  background: rgba(123, 142, 173, 0.12);
}

.welcome-card-icon.consultant {
  background: rgba(255, 255, 255, 0.06);
}

.welcome-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.welcome-card p {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

/* ===== Input Area ===== */
.input-area {
  padding: var(--space-md) var(--space-xl) var(--space-lg);
  max-width: 850px;
  margin: 0 auto;
  width: 100%;
}

.input-container {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast);
  overflow: hidden;
}

.input-container:focus-within {
  border-color: rgba(123, 142, 173, 0.40);
  box-shadow: 0 0 0 2px rgba(123, 142, 173, 0.08);
}

.input-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-md);
}

#chat-input {
  flex: 1;
  min-height: 24px;
  max-height: 150px;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  padding: var(--space-sm) 0;
  color: var(--text-primary);
}

#chat-input::placeholder {
  color: var(--text-tertiary);
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--brand-slate);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast);
  flex-shrink: 0;
  opacity: 0.3;
}

.send-btn.active {
  opacity: 1;
}

.send-btn:hover.active {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow-slate);
}

.send-btn svg {
  width: 18px;
  height: 18px;
  color: #000;
}

.input-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: var(--space-sm);
}

/* ===== Detail Panel ===== */
.detail-panel {
  width: var(--detail-panel-width);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transform: translateX(100%);
  transition: transform var(--duration-normal) var(--ease-out);
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 90;
}

.detail-panel.open {
  transform: translateX(0);
}

/* Email Builder: wider overlay panel */
.detail-panel[data-view="email"] {
  width: min(960px, calc(100vw - var(--sidebar-width) - 40px));
}

.detail-panel[data-view="email"] .detail-panel-body {
  padding: 0;
  overflow: hidden;
}

.detail-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-default);
  min-height: var(--header-height);
}

.detail-panel-title {
  font-size: 14px;
  font-weight: 600;
}

.detail-panel-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
}

.detail-panel-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.detail-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
}

/* ===== Email Builder Split Layout ===== */
.email-builder-split {
  display: flex;
  height: 100%;
  min-height: 0;
}

.eb-config-col {
  flex: 0 0 380px;
  max-width: 380px;
  overflow-y: auto;
  padding: var(--space-lg);
  border-right: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
}

.eb-preview-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-primary);
}

.eb-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.eb-preview-frame {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: var(--space-md);
  overflow: auto;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.03) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px;
}

.eb-preview-frame iframe {
  width: 100%;
  max-width: 600px;
  height: 100%;
  min-height: 500px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

/* ===== Email Builder — Save Bar ===== */
.eb-save-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-default);
}

.eb-draft-name {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border-default);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
  padding: 6px 0;
  outline: none;
  transition: border-color var(--duration-fast);
}

.eb-draft-name:focus {
  border-bottom-color: var(--brand-slate);
}

.eb-draft-name::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.eb-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eb-campaign-type {
  flex: 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  padding: 6px 10px;
  outline: none;
  cursor: pointer;
}

.eb-campaign-type:focus {
  border-color: var(--brand-slate);
}

.eb-status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.eb-status-badge.draft {
  color: var(--warning);
  background: rgba(255, 180, 0, 0.12);
}

.eb-status-badge.saved {
  color: var(--success);
  background: rgba(0, 200, 100, 0.12);
}

/* ===== Asset Cards (Campaign Overview) ===== */
.asset-grid {
  display: grid;
  gap: var(--space-md);
}

.asset-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all var(--duration-fast);
  cursor: pointer;
}

.asset-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.asset-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.asset-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.asset-type-badge.email {
  background: rgba(123, 142, 173, 0.10);
  color: var(--brand-slate);
}

.asset-type-badge.segment {
  background: rgba(123, 142, 173, 0.12);
  color: var(--brand-slate);
}

.asset-type-badge.draft {
  background: rgba(107, 114, 128, 0.2);
  color: var(--text-tertiary);
}

.asset-status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--brand-slate);
}

.asset-status-dot.draft {
  background: var(--text-tertiary);
}

.asset-card h4 {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

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

/* ===== Code Block / SQL Preview ===== */
.code-block {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--space-md) 0;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-default);
  font-size: 12px;
  color: var(--text-tertiary);
}

.code-block-header .lang-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-tertiary);
  transition: all var(--duration-fast);
}

.copy-btn:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.code-block pre {
  padding: var(--space-md);
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0;
  background: none;
  border: none;
}

.code-block pre code {
  background: none;
  padding: 0;
}

/* SQL Keywords */
.sql-keyword {
  color: var(--brand-slate);
  font-weight: 600;
}

.sql-string {
  color: var(--brand-slate);
}

.sql-number {
  color: var(--brand-sage);
}

.sql-comment {
  color: var(--text-tertiary);
  font-style: italic;
}

/* ===== Collapsible Section ===== */
.collapsible {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  margin: var(--space-md) 0;
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
}

.collapsible-header:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.collapsible-header svg {
  width: 16px;
  height: 16px;
  transition: transform var(--duration-fast);
}

.collapsible.open .collapsible-header svg {
  transform: rotate(90deg);
}

.collapsible-body {
  display: none;
  padding: var(--space-md);
}

.collapsible.open .collapsible-body {
  display: block;
}

/* ===== Info Banner ===== */
.info-banner {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  margin: var(--space-md) 0;
}

.info-banner.blue {
  background: rgba(123, 142, 173, 0.08);
  border: 1px solid rgba(123, 142, 173, 0.15);
  color: var(--brand-slate);
}

.info-banner.orange {
  background: rgba(123, 142, 173, 0.06);
  border: 1px solid rgba(123, 142, 173, 0.12);
  color: var(--brand-slate);
}

.info-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===== Progress Stepper ===== */
.stepper {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  margin: var(--space-md) 0;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.stepper-step.active {
  color: var(--brand-slate);
}

.stepper-step.completed {
  color: var(--brand-slate);
}

.stepper-dot {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.stepper-step.active .stepper-dot {
  border-color: var(--brand-slate);
  background: rgba(123, 142, 173, 0.12);
  color: var(--brand-slate);
}

.stepper-step.completed .stepper-dot {
  border-color: var(--brand-slate);
  background: var(--brand-slate);
  color: var(--bg-primary);
}

.stepper-line {
  width: 32px;
  height: 2px;
  background: var(--border-default);
}

.stepper-line.completed {
  background: var(--brand-slate);
}

/* ===== Email Preview ===== */
.email-preview-frame {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: var(--space-md) 0;
}

.email-preview-frame iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* ===== Data Table ===== */
.data-table-wrapper {
  overflow-x: auto;
  margin: var(--space-md) 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}

.data-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-default);
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--bg-hover);
}

.data-table .editable {
  cursor: pointer;
  position: relative;
}

.data-table .editable:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* ===== Toast Notification ===== */
.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  box-shadow: var(--shadow-lg);
  animation: toastIn var(--duration-normal) var(--ease-out);
  max-width: 360px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast.success {
  border-left: 3px solid var(--brand-slate);
}

.toast.error {
  border-left: 3px solid var(--brand-gold);
}

.toast.info {
  border-left: 3px solid var(--brand-slate);
}

.toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ===== Onboarding Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--duration-fast);
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  width: 480px;
  max-width: 90vw;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalIn var(--duration-normal) var(--ease-out);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-body {
  padding: var(--space-2xl);
  text-align: center;
}

.modal-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.modal-body p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-2xl) var(--space-lg);
}

.modal-dots {
  display: flex;
  gap: var(--space-sm);
}

.modal-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--bg-active);
  transition: all var(--duration-fast);
}

.modal-dot.active {
  background: var(--brand-slate);
  width: 24px;
}

.btn {
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--duration-fast);
}

.btn-primary {
  background: var(--gradient-brand);
  color: var(--bg-primary);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow-slate);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* ===== Typing Indicator ===== */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-md);
}

.typing-indicator .dot {
  width: 6px;
  height: 6px;
  background: var(--text-tertiary);
  border-radius: var(--radius-full);
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* ===== Sample Data Badge ===== */
.sample-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(123, 142, 173, 0.08);
  color: var(--brand-slate);
  border: 1px solid rgba(123, 142, 173, 0.15);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .detail-panel {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: flex;
  }

  .welcome-cards {
    grid-template-columns: 1fr;
  }

  .message-wrapper {
    padding: var(--space-md);
  }

  .input-area {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  :root {
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 32px;
  }

  .welcome-title {
    font-size: 22px;
  }
}

/* ===== Tooltip ===== */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast);
  z-index: 50;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* ===== Refinement Prompt ===== */
.refine-prompt {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(123, 142, 173, 0.04);
  border: 1px solid rgba(123, 142, 173, 0.10);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
  cursor: pointer;
  transition: all var(--duration-fast);
  font-size: 13px;
  color: var(--brand-slate);
}

.refine-prompt:hover {
  background: rgba(123, 142, 173, 0.08);
  border-color: rgba(123, 142, 173, 0.18);
}

.refine-prompt svg {
  width: 16px;
  height: 16px;
}

/* ===== Content Block Editor ===== */

/* SFMC badge */
.sfmc-badge {
  background: rgba(123, 142, 173, 0.06);
  border: 1px solid rgba(123, 142, 173, 0.15);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--brand-slate);
  text-align: center;
  margin-bottom: var(--space-md);
  font-weight: 500;
}

/* Block Canvas */
.block-canvas {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-md);
}

/* Block Card */
.block-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
  animation: blockIn var(--duration-normal) var(--ease-out);
  overflow: hidden;
}

@keyframes blockIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.block-card:hover {
  border-color: var(--border-hover);
}

.block-card.expanded {
  border-color: var(--brand-slate);
  background: rgba(123, 142, 173, 0.02);
  box-shadow: 0 0 0 1px rgba(123, 142, 173, 0.08);
}

.block-card.locked {
  opacity: 0.65;
}

/* Block Card Header */
.block-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
  min-height: 36px;
  gap: 8px;
}

.block-card.locked .block-card-header {
  cursor: default;
}

.block-card-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.block-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.block-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}

.block-lock {
  font-size: 10px;
  opacity: 0.6;
}

.block-ai-tag {
  font-size: 10px;
  background: rgba(167, 139, 250, 0.12);
  color: #A78BFA;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* Block Card Actions */
.block-card-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--duration-fast);
  flex-shrink: 0;
}

.block-card:hover .block-card-actions {
  opacity: 1;
}

.block-action-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-tertiary);
  transition: all var(--duration-fast);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.block-action-btn:hover {
  background: var(--bg-active);
  color: var(--text-primary);
}

.block-action-btn.delete:hover {
  background: rgba(230, 115, 51, 0.15);
  color: var(--brand-gold);
}

/* ===== Config Panel ===== */
.block-config-panel {
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: blockIn var(--duration-fast) var(--ease-out);
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.config-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.config-input,
.config-textarea,
.config-select {
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color var(--duration-fast);
  box-sizing: border-box;
}

.config-input:focus,
.config-textarea:focus,
.config-select:focus {
  outline: none;
  border-color: var(--brand-slate);
  box-shadow: 0 0 0 2px rgba(123, 142, 173, 0.08);
}

.config-textarea {
  resize: vertical;
  min-height: 56px;
  line-height: 1.5;
}

.config-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='%23888'%3E%3Cpath d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

/* Color picker */
.config-color-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-color-preview {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  flex-shrink: 0;
  cursor: pointer;
}

.config-color-input {
  width: 0;
  height: 0;
  padding: 0;
  border: none;
  visibility: hidden;
  position: absolute;
}

.config-hex-input {
  width: 80px;
  padding: 5px 8px;
  font-size: 12px;
  font-family: 'SF Mono', monospace;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

.config-hex-input:focus {
  outline: none;
  border-color: var(--brand-slate);
}

/* Toggle */
.config-toggle-wrap {
  display: flex;
  align-items: center;
}

.config-toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--bg-active);
  border: none;
  cursor: pointer;
  position: relative;
  transition: background var(--duration-fast);
  padding: 0;
}

.config-toggle.on {
  background: var(--brand-slate);
}

.config-toggle-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left var(--duration-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.config-toggle.on .config-toggle-thumb {
  left: 18px;
}

/* ===== Block Palette ===== */
.add-block-toggle {
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 8px;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--duration-fast);
}

.add-block-toggle:hover,
.add-block-toggle.active {
  border-color: var(--brand-slate);
  color: var(--brand-slate);
  background: rgba(123, 142, 173, 0.04);
}

.block-palette {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.block-palette.open {
  display: grid;
}

.palette-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: all var(--duration-fast);
  text-align: center;
}

.palette-block:hover {
  border-color: var(--brand-slate);
  background: rgba(123, 142, 173, 0.04);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.palette-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.palette-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.palette-desc {
  font-size: 10px;
  color: var(--text-tertiary);
  line-height: 1.3;
}

/* ===== AI Creator ===== */
.ai-creator {
  margin-bottom: var(--space-md);
}

.ai-creator-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.ai-creator-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0 0 8px;
  line-height: 1.4;
}

.ai-creator-input-row {
  display: flex;
  gap: 6px;
}

.ai-creator-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
}

.ai-creator-input:focus {
  outline: none;
  border-color: var(--brand-slate);
  box-shadow: 0 0 0 2px rgba(123, 142, 173, 0.08);
}

.ai-creator-input::placeholder {
  color: var(--text-tertiary);
}

.ai-creator-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 13px;
}

/* ===== Panel Utilities ===== */
.panel-divider {
  height: 1px;
  background: var(--border-default);
  margin: var(--space-md) 0;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.panel-actions {
  display: flex;
  gap: 8px;
  margin: var(--space-md) 0;
}

/* Token bar */
.token-bar {
  margin-top: var(--space-sm);
}

.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.token-chip {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-family: 'SF Mono', monospace;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.token-chip:hover {
  border-color: var(--brand-slate);
  color: var(--brand-slate);
  background: rgba(123, 142, 173, 0.06);
}

/* ===== Campaign Wizard ===== */

/* Stepper Bar */
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-sm);
  margin-bottom: var(--space-lg);
  gap: 0;
}

.wizard-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--duration-normal);
  min-width: 50px;
}

.wizard-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-default);
  color: var(--text-tertiary);
  transition: all var(--duration-normal);
}

.wizard-step-dot.active .wizard-dot {
  background: var(--brand-slate);
  border-color: var(--brand-slate);
  color: #fff;
  box-shadow: 0 0 12px rgba(123, 142, 173, 0.3);
}

.wizard-step-dot.completed .wizard-dot {
  background: var(--brand-slate);
  border-color: var(--brand-slate);
  color: #fff;
}

.wizard-step-dot.past .wizard-dot {
  border-color: var(--text-tertiary);
  color: var(--text-secondary);
}

.wizard-step-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-tertiary);
  white-space: nowrap;
  transition: color var(--duration-normal);
}

.wizard-step-dot.active .wizard-step-label {
  color: var(--brand-slate);
  font-weight: 600;
}

.wizard-step-dot.completed .wizard-step-label {
  color: var(--brand-slate);
}

.wizard-step-dot:hover .wizard-step-label {
  color: var(--text-primary);
}

.wizard-line {
  flex: 1;
  height: 2px;
  background: var(--border-default);
  margin: 0 4px;
  margin-bottom: 18px;
  transition: background var(--duration-normal);
  min-width: 12px;
}

.wizard-line.completed {
  background: var(--brand-slate);
}

/* Step Content */
.wizard-step-content {
  padding: 0 var(--space-sm);
}

.wizard-step-header {
  margin-bottom: var(--space-md);
}

.wizard-step-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.wizard-step-header p {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Info Cards */
.wizard-info-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.wizard-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-default);
}

.wizard-info-row:last-child {
  border-bottom: none;
}

.wizard-info-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.wizard-info-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
}

.wizard-info-value.mono {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 12px;
  color: var(--brand-slate);
}

/* Status Badges */
.wizard-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.wizard-status-badge.ready {
  color: var(--brand-slate);
  background: rgba(123, 142, 173, 0.1);
}

.wizard-status-badge.ready.large {
  font-size: 13px;
  padding: 6px 16px;
}

/* Action Buttons */
.wizard-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  border: none;
  transition: all var(--duration-normal);
  background: var(--brand-slate);
  color: #000;
  margin-top: var(--space-sm);
}

.wizard-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-slate);
}

.wizard-action-btn svg {
  width: 14px;
  height: 14px;
}

.wizard-action-btn.secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
}

.wizard-action-btn.secondary:hover {
  border-color: var(--brand-slate);
  box-shadow: none;
}

.wizard-action-btn.ghost {
  background: none;
  color: var(--text-secondary);
  padding: 10px 16px;
}

.wizard-action-btn.ghost:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  box-shadow: none;
  transform: none;
}

.wizard-action-btn.danger {
  background: linear-gradient(135deg, var(--brand-gold), var(--brand-slate));
}

.wizard-action-btn.small {
  padding: 6px 14px;
  font-size: 12px;
}

/* Send Configuration Panel */
.wizard-config-panel {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--space-md) 0;
}

.wizard-config-header {
  background: var(--bg-tertiary);
  padding: 10px var(--space-md);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--border-default);
}

.wizard-config-body {
  padding: 0;
}

.wizard-config-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px var(--space-md);
  border-bottom: 1px solid var(--border-default);
}

.wizard-config-row:last-child {
  border-bottom: none;
}

.wizard-config-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.wizard-config-value {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 12px;
  color: var(--brand-slate);
  font-weight: 500;
}

.wizard-config-status {
  padding: 10px var(--space-md);
  border-top: 1px solid var(--border-default);
  background: rgba(123, 142, 173, 0.04);
  text-align: center;
}

/* Form Inputs */
.wizard-form-group {
  margin-bottom: var(--space-md);
}

.wizard-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wizard-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  transition: border-color var(--duration-fast);
  box-sizing: border-box;
}

.wizard-input:focus {
  outline: none;
  border-color: var(--brand-slate);
}

/* Doc Card */
.wizard-doc-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-md) 0;
}

/* Send Actions */
.wizard-send-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

/* Empty State */
.wizard-empty-state {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--text-tertiary);
}

.wizard-empty-state p {
  font-size: 13px;
  margin-top: var(--space-sm);
}

/* Navigation */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-default);
}

/* Preview Frame */
.wizard-preview-frame {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

/* Builder Switch Cards in Chat */
.builder-switch-cards {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

.builder-switch-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.builder-switch-card:hover {
  border-color: var(--brand-slate);
  color: var(--brand-slate);
  background: rgba(123, 142, 173, 0.06);
}

.builder-switch-card .switch-icon {
  font-size: 14px;
}