/* =============================================================================
   SME Business Plan Builder - Chat UI Styles
   ============================================================================= */

/* CSS Variables */
:root {
  /* Brand Colors - Green/Teal theme for business/finance */
  --accent-primary: #059669;
  --accent-secondary: #10b981;
  --accent-soft: rgba(5, 150, 105, 0.1);
  --accent-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);

  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-sidebar: #1e293b;
  --bg-sidebar-hover: #334155;

  /* Text Colors */
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-on-dark: #f9fafb;
  --text-on-accent: #ffffff;

  /* Border Colors */
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Spacing & Sizing */
  --sidebar-width: 280px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Variables */
.dark-mode {
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;
  --border-color: #374151;
  --border-light: #4b5563;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Alpine.js Cloak */
[x-cloak] { display: none !important; }

/* Ensure Font Awesome icons display correctly */
.fa-solid, .fas, .fa {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

.feature-icon i,
.prompt-card-icon i,
.template-item i,
.footer-btn i,
.action-icon i,
.dropdown-menu button i,
.section-header i,
.sidebar-close i,
.new-plan-btn i {
  display: inline-block;
  line-height: 1;
}

/* ============================================
   Main App Layout
   ============================================ */
.business-plan-app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ============================================
   Sidebar
   ============================================ */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform var(--transition-normal);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-logo svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-on-dark);
  white-space: nowrap;
}

.brand-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-close {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
}

/* New Plan Button */
.new-plan-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px;
  padding: 12px 16px;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.new-plan-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.new-plan-btn kbd {
  margin-left: auto;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 11px;
  font-family: inherit;
}

.sme-hub-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.sme-hub-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  color: white;
  text-decoration: none;
}

.sme-hub-btn i {
  display: inline-block;
  line-height: 1;
}

.sme-hub-label {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.sme-hub-label-main {
  font-weight: 600;
  white-space: nowrap;
}
.sme-hub-label-sub {
  font-size: 12px;
  font-weight: 500;
  color: #bfdbfe;
  white-space: nowrap;
  margin-top: 2px;
}

/* Tier-gating UI */
.upgrade-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.dropdown-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 6px 0;
}

.modal-lg {
  max-width: 860px;
  width: 92vw;
}

/* =========================================================
   Executive Preview Modal
   ========================================================= */
.preview-overlay { padding: 24px; }

.modal-xl.preview-modal {
  max-width: 1100px;
  width: 96vw;
  height: 92vh;
  display: flex;
  flex-direction: column;
  background: #f5f5f7;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  padding: 0;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.preview-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.preview-header-left > i {
  font-size: 22px;
  color: #059669;
}

.preview-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.preview-subtitle {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.preview-modal-body {
  flex: 1;
  overflow-y: auto;
  background: #f5f5f7;
  padding: 32px;
}

.preview-document {
  max-width: 820px;
  margin: 0 auto;
  background: #ffffff;
  color: #111827;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding: 56px 64px;
  font-family: 'Georgia', 'Source Serif Pro', 'Times New Roman', serif;
  font-size: 15px;
  line-height: 1.7;
}

.preview-cover {
  text-align: center;
  border-bottom: 2px solid #059669;
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.preview-cover-badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  border-radius: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.preview-cover-title {
  font-family: 'Georgia', serif;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.preview-cover-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12px;
  color: #6b7280;
}

.preview-cover-meta i { margin-right: 5px; color: #059669; }

.preview-content h1,
.preview-content h2,
.preview-content h3,
.preview-content h4 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #0f172a;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.preview-content h1 { font-size: 22px; border-bottom: 1px solid #e5e7eb; padding-bottom: 6px; }
.preview-content h2 { font-size: 18px; color: #059669; }
.preview-content h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.4px; color: #374151; }
.preview-content h4 { font-size: 14px; color: #4b5563; }

.preview-content p { margin: 0 0 14px; }

.preview-content ul,
.preview-content ol {
  margin: 0 0 16px 20px;
  padding: 0;
}

.preview-content li { margin-bottom: 6px; }

.preview-content strong { color: #0f172a; font-weight: 700; }
.preview-content em     { color: #374151; }

.preview-content a { color: #059669; }

.preview-content blockquote {
  margin: 16px 0;
  padding: 10px 18px;
  border-left: 3px solid #059669;
  background: #f8fafc;
  color: #374151;
  font-style: italic;
}

.preview-content code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  color: #be123c;
}

.preview-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px 18px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
  margin: 16px 0;
}
.preview-content pre code { background: transparent; color: inherit; padding: 0; }

.preview-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
}

.preview-content thead {
  background: #059669;
  color: #ffffff;
}

.preview-content th,
.preview-content td {
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.preview-content tbody tr:nth-child(even) { background: #f9fafb; }

.preview-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 28px 0;
}

.preview-page-footer {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 11px;
  text-align: center;
  color: #9ca3af;
  letter-spacing: 0.3px;
}

.preview-empty {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 40px;
}

.preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
}

.preview-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
  flex: 1;
  min-width: 240px;
}

.preview-actions-left i { color: #f59e0b; }

.preview-actions-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

@media (max-width: 900px) {
  .modal-xl.preview-modal { width: 100vw; height: 100vh; max-width: none; border-radius: 0; }
  .preview-overlay { padding: 0; }
  .preview-document { padding: 32px 22px; }
  .preview-cover-title { font-size: 24px; }
}

.upgrade-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* ============================================
   Generation progress panel (ChatGPT-style)
   ============================================ */
.gen-panel {
  min-width: 320px;
  max-width: 560px;
}

.gen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.gen-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  flex-shrink: 0;
}

.gen-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  line-height: 1.3;
}

.gen-title strong {
  font-weight: 600;
}

.gen-sub {
  font-size: 12px;
  opacity: 0.75;
}

.gen-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 5.6 Loading skeleton — shaped like the eventual plan output so the wait
   reads as "rendering" instead of "stuck". Pulses subtly via background
   shimmer; respects prefers-reduced-motion. */
.gen-skeleton {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.gen-skeleton .sk-line {
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.6s linear infinite;
}
.gen-skeleton .sk-h        { height: 14px; width: 38%; }
.gen-skeleton .sk-l        { width: 100%; }
.gen-skeleton .sk-l-short  { width: 72%; }
.gen-skeleton .sk-mt       { margin-top: 14px; }

@keyframes sk-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gen-skeleton .sk-line { animation: none; }
}

.gen-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  font-size: 13px;
  line-height: 1.3;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.gen-step-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.gen-step.is-pending { opacity: 0.45; }
.gen-step.is-active  { opacity: 1; font-weight: 500; }
.gen-step.is-active .gen-step-icon { color: #10b981; }
.gen-step.is-done    { opacity: 0.75; }
.gen-step.is-done .gen-step-icon { color: #10b981; }

/* Error bubble */
.error-bubble {
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: inherit !important;
}

.error-avatar {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
  color: #fff !important;
}

.error-title { margin: 0 0 6px; font-size: 14px; }
.error-text  { margin: 0 0 12px; font-size: 13px; line-height: 1.5; opacity: 0.9; }

.error-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.error-btn:hover { background: rgba(0, 0, 0, 0.05); }

.error-btn.primary {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

.error-btn.primary:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Sidebar Sections */
.sidebar-section {
  padding: 0 12px;
  margin-bottom: 8px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
}

.section-header:hover {
  color: rgba(255, 255, 255, 0.7);
}

.section-header i:last-child {
  font-size: 10px;
}

.section-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Templates group — glowing border bounding all template items together */
.template-glow-group {
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.06);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.12),
              0 0 14px rgba(16, 185, 129, 0.28);
  animation: template-glow-pulse 3.2s ease-in-out infinite;
  /* Cap height so the growing template list scrolls internally instead of
     pushing the Recent / footer sections off-screen. */
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.5) transparent;
}

.template-glow-group::-webkit-scrollbar {
  width: 6px;
}
.template-glow-group::-webkit-scrollbar-track {
  background: transparent;
}
.template-glow-group::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.45);
  border-radius: 3px;
}
.template-glow-group::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.7);
}

/* "Don't want to follow the wizard?" banner — hover lifts the edge colour
   and adds a soft shadow. border-color needs !important to beat the inline
   border declared on the element. */
.bp-packs-banner {
  cursor: pointer;
}
.bp-packs-banner:hover {
  border-color: #34d399 !important;
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.22);
  transform: translateY(-2px);
}

@keyframes template-glow-pulse {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.12),
                0 0 10px rgba(16, 185, 129, 0.22);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.22),
                0 0 18px rgba(16, 185, 129, 0.42);
  }
}

/* Template Items */
.template-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}

.template-item:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-on-dark);
}

.template-item.is-active {
  background: rgba(16, 185, 129, 0.16);
  color: var(--text-on-dark);
}

.template-item i {
  width: 18px;
  text-align: center;
  color: var(--accent-secondary);
}

/* Per-item checkbox indicator */
.template-check {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.template-check i {
  width: auto;
  font-size: 9px;
  color: #fff;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.template-check.is-checked {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

.template-check.is-checked i {
  opacity: 1;
}

/* History Section */
.history-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 12px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.history-item:hover {
  background: var(--bg-sidebar-hover);
}

.history-item.active {
  background: var(--bg-sidebar-hover);
  color: var(--text-on-dark);
}

.history-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.history-content {
  flex: 1;
  min-width: 0;
}

.history-title {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-date {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.history-delete {
  opacity: 0;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px;
  transition: all var(--transition-fast);
}

.history-item:hover .history-delete {
  opacity: 1;
}

.history-delete:hover {
  color: var(--error);
}

.clear-history {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px;
}

.clear-history:hover {
  color: var(--error);
}

.empty-state {
  text-align: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.4);
}

.empty-state i {
  font-size: 32px;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.footer-btn:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-on-dark);
}

.footer-btn.highlight {
  background: var(--accent-gradient);
  color: white;
}

.footer-btn.highlight:hover {
  transform: translateY(-1px);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 8px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  color: white;
  font-size: 14px;
}

.user-name {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   Main Content Area
   ============================================ */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-primary);
}

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

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
}

.current-chat-info {
  display: flex;
  flex-direction: column;
}

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

.message-count {
  font-size: 12px;
  color: var(--text-tertiary);
}

.header-center {
  display: flex;
  align-items: center;
}

.model-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.model-selector i {
  color: var(--accent-primary);
  font-size: 18px;
}

.model-badge {
  padding: 4px 10px;
  background: var(--accent-gradient);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-icon:hover:not(:disabled) {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.action-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Saved-prompts header link: anchor-as-action-icon. Reset link styling and
   adopt the same hover/focus affordances as <button>.action-icon. */
a.action-icon,
a.action-icon:visited {
  color: var(--text-secondary);
  text-decoration: none;
}
a.action-icon:hover { color: var(--text-primary); }
.action-icon--saved { position: relative; }
.action-icon--saved:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 2px;
}
.action-icon-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #059669;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  letter-spacing: .02em;
  box-shadow: 0 0 0 2px #fff;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 12px;
  min-width: 200px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 100;
}

.dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.dropdown-menu button:hover {
  background: var(--bg-secondary);
}

.dropdown-menu button i {
  width: 16px;
  color: var(--text-tertiary);
}

/* ============================================
   Chat Container
   ============================================ */
.chat-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Welcome Screen */
.welcome-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 40px 48px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.welcome-header {
  text-align: center;
  margin-bottom: 40px;
}

.welcome-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.welcome-logo svg {
  width: 100%;
  height: 100%;
}

.welcome-title {
  font-size: 36px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.welcome-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* Feature Cards */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
  width: 100%;
}

.feature-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 40px;
}

.feature-viewport {
  overflow: hidden;
  flex: 1;
}

.feature-track {
  display: flex;
  gap: 16px;
  transition: transform 0.35s ease;
}

.feature-track > .feature-card {
  /* 6-up on desktop: 5 gaps of 16px = 80px removed before dividing. */
  flex: 0 0 calc((100% - 80px) / 6);
  box-sizing: border-box;
}

.carousel-arrow {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-arrow:hover:not(:disabled) {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.carousel-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.feature-card {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 6px 10px 7px;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.feature-card.is-selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.45),
              0 0 12px rgba(59, 130, 246, 0.22);
  background: rgba(59, 130, 246, 0.06);
}

/* Custom tick badge on each carousel card — visually identical to the
   Step-1 prompt-card-check so the two steps feel consistent. Empty box by
   default; turns into a solid green tick when the card is .is-selected. */
.feature-tick {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 12px;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  pointer-events: none;
  z-index: 2;
}
.feature-card.is-selected .feature-tick {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}
.feature-card.is-selected .feature-tick i { color: #ffffff; }

/* Visually-hidden but accessible native checkbox (used for a11y/state only). */
.feature-card .sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.feature-card:hover {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25),
              0 0 10px rgba(59, 130, 246, 0.18);
  transform: translateY(-1px);
}

.feature-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  margin-bottom: 2px;
  color: var(--accent-primary);
  font-size: 11px;
}

.feature-icon i {
  color: var(--accent-primary);
  font-size: 11px;
}

.feature-card h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0;
  line-height: 1.15;
}

.feature-card p {
  font-size: 10.5px;
  color: var(--text-tertiary);
  line-height: 1.25;
  margin-bottom: 0;
}

/* Prompt Suggestions */
.prompt-section {
  width: 100%;
  margin-bottom: 32px;
}

.prompt-section-title {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.prompt-suggestions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 1280px) {
  .prompt-suggestions {
    grid-template-columns: repeat(2, 1fr);
  }
}

.prompt-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.prompt-card:hover {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25),
              0 0 10px rgba(59, 130, 246, 0.18);
  background: rgba(59, 130, 246, 0.03);
  transform: translateY(-1px);
}

.prompt-card.is-selected {
  border-color: #10b981;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.45),
              0 0 12px rgba(16, 185, 129, 0.22);
  background: rgba(16, 185, 129, 0.06);
}

/* Visual-only checkbox indicator on each Step-1 template card.
   Empty square by default; turns into a green tick when the card is active. */
.prompt-card-check {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 12px;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  pointer-events: none;
}
.prompt-card-check.is-checked {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}
.prompt-card-check.is-checked i {
  color: #ffffff;
}

.prompt-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  color: var(--accent-primary);
  font-size: 20px;
  flex-shrink: 0;
}

.prompt-card-icon i {
  color: var(--accent-primary);
  font-size: 20px;
}

.prompt-card-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

/* ============================================
   Input Area
   ============================================ */
.input-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.input-wrapper {
  background: var(--bg-primary);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.15);
  overflow: hidden;
}

.input-wrapper:focus-within {
  box-shadow: 0 4px 24px rgba(5, 150, 105, 0.25);
}

.chat-textarea {
  width: 100%;
  min-height: 160px;
  max-height: 400px;
  padding: 16px 20px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  outline: none;
}

.chat-textarea::placeholder {
  color: var(--text-tertiary);
}

/* Active-context panel — listed below the textarea so the user can see
   their Step-2 selections at a glance, even if they're hidden below the
   textarea's scroll fold. */
.active-context {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-md);
  color: #1e3a8a;
  font-size: 13px;
}
.active-context-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #1d4ed8;
}
.active-context-head i { color: #3b82f6; font-size: 14px; }
.active-context-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.active-context-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #334155;
}
.active-context-list li i { color: #3b82f6; font-size: 10px; }

/* Brief flash to confirm a feature was appended / removed (Step 2 → Step 3) */
.chat-textarea.is-flash {
  animation: textarea-flash 0.7s ease-out;
}
@keyframes textarea-flash {
  0%   { box-shadow: 0 0 0 0   rgba(59, 130, 246, 0); }
  35%  { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35),
                     0 0 16px rgba(59, 130, 246, 0.25); }
  100% { box-shadow: 0 0 0 0   rgba(59, 130, 246, 0); }
}

.input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
}

.input-hints {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.input-hints kbd {
  padding: 3px 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
}

.input-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.char-count {
  font-size: 12px;
  color: var(--text-tertiary);
}

.send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.powered-by {
  text-align: center;
  padding: 12px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.powered-by i {
  color: var(--accent-primary);
}

/* ============================================
   Chat Messages
   ============================================ */
.messages-container {
  flex: 1;
  padding: 24px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.message {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

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

.message-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 14px;
  flex-shrink: 0;
}

.message.assistant .message-avatar {
  background: var(--accent-gradient);
  color: white;
}

.message.user .message-avatar {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.message-content {
  flex: 1;
  max-width: 80%;
}

.message.user .message-content {
  text-align: right;
}

.message-bubble {
  display: inline-block;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

.message.assistant .message-bubble {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.message.user .message-bubble {
  background: var(--accent-gradient);
  color: white;
  border-bottom-right-radius: 4px;
}

/* Markdown rendered inside an assistant bubble */
.message-bubble .md-body {
  max-width: 100%;
}

.message-bubble .md-body > :first-child { margin-top: 0; }
.message-bubble .md-body > :last-child  { margin-bottom: 0; }

.message-bubble .md-body h1,
.message-bubble .md-body h2,
.message-bubble .md-body h3,
.message-bubble .md-body h4,
.message-bubble .md-body h5 {
  font-family: inherit;
  font-weight: 700;
  color: var(--text-primary);
  margin: 18px 0 8px;
  line-height: 1.3;
}

.message-bubble .md-body h1 { font-size: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); padding-bottom: 4px; }
.message-bubble .md-body h2 { font-size: 17px; color: #10b981; }
.message-bubble .md-body h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-secondary, #cbd5e1); }
.message-bubble .md-body h4 { font-size: 13px; color: var(--text-secondary, #cbd5e1); }

.message-bubble .md-body p { margin: 0 0 10px; }

.message-bubble .md-body ul,
.message-bubble .md-body ol {
  margin: 0 0 12px 22px;
  padding: 0;
}

.message-bubble .md-body li { margin-bottom: 4px; }

.message-bubble .md-body strong { color: inherit; font-weight: 700; }
.message-bubble .md-body em     { color: inherit; }

.message-bubble .md-body a {
  color: #10b981;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.message-bubble .md-body blockquote {
  margin: 12px 0;
  padding: 8px 14px;
  border-left: 3px solid #10b981;
  background: rgba(16, 185, 129, 0.08);
  color: inherit;
  font-style: italic;
  border-radius: 4px;
}

.message-bubble .md-body code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12.5px;
}

.message-bubble .md-body pre {
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 14px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.55;
  margin: 12px 0;
}
.message-bubble .md-body pre code { background: transparent; padding: 0; }

.message-bubble .md-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
}

.message-bubble .md-body thead {
  background: rgba(16, 185, 129, 0.18);
}

.message-bubble .md-body th,
.message-bubble .md-body td {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  vertical-align: top;
}

.message-bubble .md-body tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.03); }

.message-bubble .md-body hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 18px 0;
}

.message-time {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Sticky Input */
.sticky-input {
  position: sticky;
  bottom: 0;
  background: var(--bg-primary);
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border-light);
}

.sticky-input .input-wrapper {
  max-width: 1100px;
  margin: 0 auto;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--text-primary);
}

.toast.success {
  border-color: var(--success);
}

.toast.success i {
  color: var(--success);
}

.toast.error {
  border-color: var(--error);
}

.toast.error i {
  color: var(--error);
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  max-width: 420px;
  width: 100%;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h3 i {
  color: var(--accent-primary);
  font-size: 16px;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--error);
  color: white;
}

.modal-body {
  padding: 24px;
}

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

.share-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.share-btn i {
  width: 20px;
  color: var(--accent-primary);
  font-size: 18px;
}

/* ============================================
   Responsive Design
   ============================================ */
/* Mid-size screens: step down from 6-up to 4-up so cards stay readable. */
@media (max-width: 1440px) {
  .feature-track > .feature-card {
    flex: 0 0 calc((100% - 48px) / 4);
  }
}

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

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

  .sidebar-close {
    display: block;
  }

  .menu-btn {
    display: flex;
  }

  .feature-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-track > .feature-card {
    flex: 0 0 calc((100% - 16px) / 2);
  }
}

@media (max-width: 640px) {
  .feature-cards {
    grid-template-columns: 1fr;
  }

  .feature-track > .feature-card {
    flex: 0 0 100%;
  }

  .prompt-suggestions {
    grid-template-columns: 1fr;
  }

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

  .input-hints {
    display: none;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Sidebar scrollbar (dark) */
.app-sidebar ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.app-sidebar ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
