:root {
  /* Dark theme colors from style guide */
  --bg-dark: #0b1020;
  --bg-end: #0f172a;
  --bg-panel: rgba(255, 255, 255, 0.06);
  --border-soft: rgba(255, 255, 255, 0.12);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5f5;

  --ai-start: #7c83ff;
  --ai-end: #b084ff;

  --cta-primary: #6366f1;
  --cta-secondary: rgba(255, 255, 255, 0.12);

  /* Legacy mappings for compatibility */
  --primary-color: #6366f1;
  --secondary-color: #4f46e5;
  --background-color: var(--bg-dark);
  --surface-color: var(--bg-panel);
  --text-color: var(--text-primary);
  --text-muted: var(--text-secondary);
  --border-color: var(--border-soft);
  --success-color: #10b981;
  --warning-color: #f59e0b;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #1e1b4b, var(--bg-end));
  color: var(--text-primary);
  margin: 0;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--text-primary);
}

/* Prevent caret/text selection on non-editable UI elements */
.status-step,
.sidebar-section h3,
.concept-card-header,
.campaign-header,
.step-indicator,
.step-label,
.concept-status-badge,
.campaign-status-badge {
  user-select: none;
  -webkit-user-select: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: none;
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(90deg, var(--ai-start), var(--ai-end));
  color: #0b1020;
  box-shadow: 0 10px 30px rgba(124, 131, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(124, 131, 255, 0.5);
  color: #0b1020;
}

.btn-secondary {
  background: var(--cta-secondary);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  color: var(--text-primary);
}

.btn-large {
  font-size: 1.125rem;
  padding: 1rem 2rem;
}

/* Campaign Cards */
.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.campaign-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}

.campaign-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}

.campaign-card h3 {
  color: var(--text-primary);
  margin-top: 0;
}

.campaign-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, rgba(124, 131, 255, 0.2), rgba(176, 132, 255, 0.2));
  color: #a5b4fc;
  border: 1px solid rgba(124, 131, 255, 0.3);
}

.campaign-input {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Layout */
.campaign-layout {
  display: flex;
  gap: 2rem;
  height: calc(100vh - 200px);
}

.campaign-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 1.5rem;
  overflow-y: auto;
}

.campaign-main {
  flex-grow: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Chat Interface */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.messages-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.message {
  display: flex;
  gap: 1rem;
  max-width: 80%;
}

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-content {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-soft);
  padding: 1rem;
  border-radius: 1rem;
  border-top-left-radius: 0;
  color: var(--text-primary);
}

.user-message .message-content {
  background: linear-gradient(135deg, var(--ai-start), var(--ai-end));
  border: none;
  color: #0b1020;
  border-radius: 1rem;
  border-top-right-radius: 0;
}

.message-header {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  opacity: 0.7;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.message-avatar {
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-soft);
  border-radius: 50%;
}

/* Input Area */
.chat-input-form {
  padding: 1.5rem;
  border-top: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
}

.input-group {
  display: flex;
  gap: 1rem;
}

.chat-textarea {
  flex-grow: 1;
  padding: 0.75rem;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  resize: none;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.chat-textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.chat-textarea:focus {
  outline: none;
  border-color: var(--ai-start);
  box-shadow: 0 0 0 2px rgba(124, 131, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.form-control:focus {
  outline: none;
  border-color: var(--ai-start);
  box-shadow: 0 0 0 2px rgba(124, 131, 255, 0.25);
}

/* Status Steps */
.status-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
  border-radius: 8px;
  color: var(--text-secondary);
}

.status-step.active {
  background: linear-gradient(90deg, rgba(124, 131, 255, 0.15), rgba(176, 132, 255, 0.15));
  color: #a5b4fc;
  font-weight: 600;
  border: 1px solid rgba(124, 131, 255, 0.3);
}

.status-step.completed {
  color: var(--success-color);
}

.step-indicator {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.active .step-indicator {
  background: linear-gradient(135deg, var(--ai-start), var(--ai-end));
  color: #0b1020;
}

.completed .step-indicator {
  background: var(--success-color);
  color: white;
}

/* Structured Data Styling */
.questions-list {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
  color: var(--text-secondary);
}

.ambiguities-box {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 8px;
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.brief-summary-preview {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 0.875rem;
  border: 1px solid var(--border-soft);
}

.brief-summary-preview pre {
  white-space: pre-wrap;
  margin: 0;
  font-family: inherit;
  color: var(--text-secondary);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  height: 24px;
}

.typing-indicator span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, var(--ai-start), var(--ai-end));
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
  margin: 0 2px;
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

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

@keyframes typing {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

/* Streaming Message Styles */
.message.streaming .streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--primary-color);
  margin-left: 2px;
  animation: blink 1s infinite;
  vertical-align: text-bottom;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

.streaming-content {
  display: inline;
}

/* Error Message Styles */
.error-message .message-content {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.error-message .message-avatar {
  background: #fee2e2;
}

/* Suggestion Chips */
.suggestion-chip {
  margin-top: 1rem;
}

.suggestion-chip button {
  background: linear-gradient(90deg, rgba(124, 131, 255, 0.2), rgba(176, 132, 255, 0.2));
  border: 1px solid rgba(124, 131, 255, 0.4);
  color: #a5b4fc;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.suggestion-chip button:hover {
  background: linear-gradient(90deg, var(--ai-start), var(--ai-end));
  color: #0b1020;
  border-color: transparent;
}

/* Send Button */
.btn-send {
  background: linear-gradient(90deg, var(--ai-start), var(--ai-end));
  color: #0b1020;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(124, 131, 255, 0.3);
}

.btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(124, 131, 255, 0.45);
}

.btn-send:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: not-allowed;
  box-shadow: none;
}

/* Campaign Header */
.campaign-header {
  margin-bottom: 2rem;
}

.campaign-header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.campaign-header h1 {
  margin: 0;
  flex-grow: 1;
}

.back-link {
  width: 100%;
}

.back-link a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.back-link a:hover {
  color: var(--primary-color);
}

.btn-result {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-result:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.campaign-status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.campaign-status-badge.intake {
  background: #dbeafe;
  color: #1e40af;
}

.campaign-status-badge.briefing {
  background: #e0e7ff;
  color: #4338ca;
}

.campaign-status-badge.concepts {
  background: #fef3c7;
  color: #92400e;
}

.campaign-status-badge.evaluation {
  background: #fef3c7;
  color: #92400e;
}

.campaign-status-badge.selection {
  background: #fce7f3;
  color: #9d174d;
}

.campaign-status-badge.review {
  background: #d1fae5;
  color: #065f46;
}

.campaign-status-badge.refinement {
  background: #fed7aa;
  color: #9a3412;
}

.campaign-status-badge.finalization {
  background: #bbf7d0;
  color: #166534;
}

/* Sidebar Section */
.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #a5b4fc;
}

.brief-summary {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Concept List in Sidebar */
.concept-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.concept-item {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.concept-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.concept-status {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.concept-item.approved {
  background: rgba(16, 185, 129, 0.15);
  border-left: 3px solid var(--success-color);
}

.concept-item.rejected {
  background: rgba(239, 68, 68, 0.15);
  border-left: 3px solid #ef4444;
}

/* Concept Cards */
.concept-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.concept-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--border-soft);
  transition: all 0.2s;
}

.concept-card.approved {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
  border-left: 4px solid var(--success-color);
}

.concept-card.rejected {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  border-left: 4px solid #ef4444;
  opacity: 0.7;
}

.concept-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.concept-card-header:hover {
  background: rgba(255, 255, 255, 0.04);
  margin: -0.5rem;
  padding: 0.5rem;
  border-radius: 8px;
}

.concept-header-left {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex: 1;
}

.concept-toggle-icon {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.concept-name {
  font-size: 0.95rem;
  line-height: 1.3;
}

.concept-status-badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.concept-status-badge.approved {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.concept-status-badge.rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.concept-status-badge.draft {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.concept-status-badge.evaluated {
  background: rgba(124, 131, 255, 0.2);
  color: #a5b4fc;
}

.concept-card-body {
  font-size: 0.85rem;
  color: var(--text-color);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.concept-idea {
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
  color: var(--text-color);
}

.concept-detail {
  margin: 0.4rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.concept-detail strong {
  color: var(--text-color);
}

.concept-risk {
  margin: 0.5rem 0 0 0;
  font-size: 0.8rem;
}

/* Concept Evaluation Details */
.concept-evaluation {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.evaluation-strengths,
.evaluation-weaknesses {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.evaluation-strengths strong {
  color: var(--success-color);
}

.evaluation-weaknesses strong {
  color: #dc2626;
}

.evaluation-strengths ul,
.evaluation-weaknesses ul {
  margin: 0.25rem 0 0 0;
  padding-left: 1rem;
}

.evaluation-strengths li,
.evaluation-weaknesses li {
  margin-bottom: 0.15rem;
  line-height: 1.4;
}

.rejection-reason {
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: #fef2f2;
  border-radius: 0.375rem;
  border-left: 3px solid #ef4444;
  font-size: 0.8rem;
}

.rejection-reason strong {
  color: #dc2626;
  display: block;
  margin-bottom: 0.25rem;
}

.rejection-reason p {
  margin: 0;
  color: #991b1b;
}

.risk-score {
  letter-spacing: 2px;
}

.risk-score.risk-1 {
  color: #10b981;
}

.risk-score.risk-2 {
  color: #84cc16;
}

.risk-score.risk-3 {
  color: #f59e0b;
}

.risk-score.risk-4 {
  color: #f97316;
}

.risk-score.risk-5 {
  color: #ef4444;
}

/* Review Stage CTA */
.review-stage-cta {
  padding: 1.5rem;
  border-top: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
}

.review-instructions {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.review-instructions h4 {
  margin: 0 0 0.5rem 0;
  color: #34d399;
}

.review-instructions p {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: #6ee7b7;
}

.review-instructions ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: #6ee7b7;
}

.review-instructions li {
  margin-bottom: 0.25rem;
}

.suggestion-chips {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip-finalize {
  background: linear-gradient(135deg, var(--success-color), #059669);
  border: none;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.chip-finalize:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

/* Agent Output Formatting */
.agent-output {
  padding: 0.5rem 0;
}

.approved-concepts-list {
  margin: 0.5rem 0 1rem 0;
  padding-left: 1.25rem;
}

.approved-concepts-list li {
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.rationale-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.rationale-box strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #a5b4fc;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.creative-output,
.critic-output,
.refinement-output {
  font-size: 0.95rem;
}

.creative-output small,
.critic-output small,
.refinement-output small {
  color: var(--text-muted);
}

.refinements-list {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.refinements-list li {
  margin-bottom: 0.25rem;
}

/* Finalized State */
.finalized-state {
  padding: 2rem;
  text-align: center;
}

.completion-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.completion-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.completion-banner h3 {
  margin: 0 0 0.5rem 0;
  color: #34d399;
}

.completion-banner p {
  margin: 0;
  color: #6ee7b7;
}

.completion-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Finalization Output in Messages */
.finalization-output {
  max-width: 100%;
}

.finalization-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.finalization-icon {
  font-size: 1.5rem;
}

.finalization-header h4 {
  margin: 0;
  color: #065f46;
}

.asset-group {
  margin-top: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
}

.asset-group-title {
  margin: 0;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.concept-icon {
  font-size: 1rem;
}

.assets-list {
  padding: 1rem;
}

.channel-assets {
  margin-bottom: 1rem;
}

.channel-assets:last-child {
  margin-bottom: 0;
}

.channel-title {
  margin: 0 0 0.75rem 0;
  font-size: 0.85rem;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.asset-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.asset-item:last-child {
  margin-bottom: 0;
}

.asset-type-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: linear-gradient(90deg, var(--ai-start), var(--ai-end));
  color: #0b1020;
  border-radius: 9999px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.asset-content {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-color);
}

.asset-content p {
  margin: 0 0 0.5rem 0;
}

.asset-content p:last-child {
  margin-bottom: 0;
}

/* Visual prompt styling */
.asset-item.visual_prompt {
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid #f59e0b;
}

.asset-item.visual_prompt .asset-type-badge {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #0b1020;
}

/* Generated image styling */
.asset-image {
  margin: 0.75rem 0;
}

.generated-image {
  max-width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.asset-prompt {
  margin-top: 0.5rem;
}

.asset-prompt details {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.asset-prompt summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text-color);
}

.asset-prompt summary:hover {
  color: var(--primary-color);
}

.asset-prompt details[open] summary {
  margin-bottom: 0.5rem;
}

/* Status step finalized */
.status-step.finalized {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-step.finalized .step-indicator {
  background: var(--success-color);
  color: white;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .campaign-layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 150px);
  }

  .campaign-sidebar {
    width: 100%;
    order: 2;
    max-height: none;
  }

  .campaign-main {
    order: 1;
    min-height: 50vh;
  }

  .message {
    max-width: 95%;
  }

  .input-group {
    flex-direction: column;
  }

  .btn-send {
    width: 100%;
  }

  .campaign-header-content {
    flex-direction: column;
    align-items: flex-start;
  }

}

/* Authentication Pages */
.auth-container {
  max-width: 450px;
  margin: 4rem auto;
  padding: 0 1rem;
}

.auth-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.75rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.auth-header p {
  color: var(--text-secondary);
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.auth-input-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.auth-input-group input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.auth-input-group input:focus {
  outline: none;
  border-color: var(--ai-start);
  box-shadow: 0 0 0 3px rgba(124, 131, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.auth-actions {
  margin-top: 0.5rem;
}

.auth-actions .btn {
  width: 100%;
  text-align: center;
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.auth-footer a {
  color: #a5b4fc;
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.flash-message {
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  text-align: center;
}

.flash-alert {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.flash-notice {
  background: rgba(124, 131, 255, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(124, 131, 255, 0.3);
}

/* App Header */
.app-header {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-soft);
  padding: 0.75rem 0;
  margin-bottom: 2rem;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-logo {
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
}

.app-logo .ai {
  font-weight: 800;
  background: linear-gradient(90deg, var(--ai-start), var(--ai-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 16px rgba(124, 131, 255, 0.35);
}

.avatar-circle {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--border-soft);
  color: #a5b4fc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
}

.profile-icon {
  cursor: pointer;
  list-style: none;
}

.profile-icon:hover .avatar-circle {
  border-color: var(--ai-start);
  background: rgba(124, 131, 255, 0.15);
}

.profile-icon::-webkit-details-marker {
  display: none;
}

.profile-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 120%;
  background: linear-gradient(180deg, rgba(30, 27, 75, 0.98), rgba(15, 23, 42, 0.98));
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  min-width: 220px;
  padding: 0.5rem;
  z-index: 50;
  animation: slideDown 0.1s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

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

.user-info {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.user-info strong {
  display: block;
  color: var(--text-primary);
}

.user-info small {
  color: var(--text-secondary);
}

.dropdown-divider {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 0.5rem 0;
}

.dropdown-item {
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
  border-radius: 8px;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-item.text-danger {
  color: #f87171;
}

.dropdown-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* ========== LANDING PAGE ========== */

/* Landing Nav */
.landing-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.landing-logo {
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
}

.landing-logo .ai {
  font-weight: 800;
  background: linear-gradient(90deg, var(--ai-start), var(--ai-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 16px rgba(124, 131, 255, 0.35);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-cta {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--ai-start), var(--ai-end));
  color: #0b1020 !important;
  font-weight: 700;
  transition: transform 0.15s, box-shadow 0.15s;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 131, 255, 0.4);
  color: #0b1020 !important;
}

/* Hero Section */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-centered {
  max-width: 1100px;
  padding: 7rem 2rem 8rem;
  margin: 0 auto;
  text-align: left;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
}

.hero h1 span {
  color: #a5b4fc;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 620px;
  margin: 0 0 2.5rem 0;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* Hero Box */
.hero-box {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero-box h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: #a5b4fc;
}

.hero-box ul {
  padding-left: 1.2rem;
  color: var(--text-secondary);
  margin: 0;
}

.hero-box li {
  margin-bottom: 0.6rem;
}

/* Features Section */
.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.features h2 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.feature-card h4 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Visual/Image Placeholder */
.visual {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

.image-box {
  height: 420px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124, 131, 255, 0.25), rgba(176, 132, 255, 0.25));
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}

/* Landing Page Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.6rem;
  }

  .landing-logo {
    font-size: 1.5rem;
  }

  .landing-nav {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* Campaign List Page */
.actions-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
  gap: 1rem;
}

.campaign-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.campaign-actions {
  margin-top: auto;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state h2 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Campaign Form Page */
.form-container {
  max-width: 700px;
  margin: 0 auto;
}

.campaign-form {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-hint {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
}

.error-box {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #f87171;
}

.error-box h4 {
  margin: 0 0 0.5rem 0;
}

.error-box ul {
  margin: 0;
  padding-left: 1.25rem;
}

/* Select styling for dark theme */
.form-control select,
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a5b4fc' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}