/* ==========================================================================
   BUILD REAL HOME DASHBOARD — LEVEL 1 & LEVEL 2 STYLING
   Spacious, clean, conversational aesthetic inspired by modern AI apps (ChatGPT)
   with Build Real brand accents, crisp cards, and responsive sidebar.
   ========================================================================== */

.home-app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: #ffffff;
  color: #0f172a;
  font-family: var(--font-sans);
}

/* --------------------------------------------------------------------------
   HOME SIDEBAR (Left Navigation)
   -------------------------------------------------------------------------- */
.home-sidebar {
  width: 280px;
  background-color: #f8fafc;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-sidebar-header {
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.home-brand-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.home-brand-title {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #1e0935;
  display: flex;
  align-items: center;
}

.home-brand-real {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 2px;
}

.home-brand-tag {
  font-size: 9.5px;
  font-weight: 800;
  background: #ede9fe;
  color: #6d28d9;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  letter-spacing: 0.04em;
}

/* + New Chat Button */
.home-new-chat-wrapper {
  padding: 8px 16px 14px;
}

.btn-home-new-chat {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.18s ease;
}

.btn-home-new-chat:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
}

.btn-home-new-chat-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.new-chat-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #7c3aed;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

/* Navigation Scrollable Body */
.home-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-menu-section-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  text-transform: uppercase;
  padding: 4px 8px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  list-style: none;
}

/* Chat History Items */
.home-chat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
  position: relative;
}

.home-chat-item:hover {
  background: #edf2f7;
  color: #0f172a;
}

.home-chat-item.active {
  background: #ede9fe;
  color: #5b21b6;
  font-weight: 700;
}

.home-chat-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.home-chat-item-icon {
  font-size: 14px;
  opacity: 0.75;
  flex-shrink: 0;
}

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

.home-chat-item-actions {
  display: none;
  align-items: center;
  gap: 4px;
}

.home-chat-item:hover .home-chat-item-actions,
.home-chat-item.active .home-chat-item-actions {
  display: flex;
}

.btn-chat-action {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-chat-action:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

/* Project Items in Sidebar */
.home-project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
}

.home-project-item:hover {
  background: #edf2f7;
  color: #0f172a;
}

.home-project-item.active {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
}

.home-project-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.home-project-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.home-project-files-badge {
  font-size: 10px;
  font-weight: 750;
  background: rgba(0, 0, 0, 0.06);
  color: #475569;
  padding: 1px 6px;
  border-radius: 9999px;
  flex-shrink: 0;
}

/* Sidebar Nav Buttons (Import, Settings, All Projects) */
.home-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  color: #334155;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.home-nav-btn:hover {
  background: #edf2f7;
  color: #0f172a;
}

.home-nav-btn.active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 750;
}

.home-nav-btn-icon {
  font-size: 15px;
  width: 20px;
  display: grid;
  place-items: center;
}

/* Sidebar Footer */
.home-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}

.home-user-info {
  display: flex;
  flex-direction: column;
}

.home-user-name {
  font-size: 12px;
  font-weight: 750;
  color: #0f172a;
}

.home-user-status {
  font-size: 10px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --------------------------------------------------------------------------
   HOME MAIN WORKSPACE (ChatGPT-like conversational canvas)
   -------------------------------------------------------------------------- */
.home-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: #ffffff;
  position: relative;
}

/* Top App Header inside Home */
.home-top-header {
  height: 52px;
  padding: 0 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

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

.home-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
}

.home-active-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

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

.home-engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
}

.home-engine-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

/* --------------------------------------------------------------------------
   VIEW 1: CHAT VIEW (Conversational UI)
   -------------------------------------------------------------------------- */
.home-view-container {
  flex: 1;
  display: none;
  flex-direction: column;
  height: calc(100vh - 52px);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.home-view-container.active {
  display: flex;
}

/* Faint Architectural Web Development & Deployment Background Drawings */
.home-dev-bg-drawings {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  color: #64748b;
  opacity: 0.16;
  transition: opacity 0.3s ease;
}

.home-view-container:not(.empty-chat) .home-dev-bg-drawings {
  opacity: 0.07;
}

.bg-drawing {
  position: absolute;
  transition: transform 0.5s ease;
}

.bg-drawing-top-left {
  top: 20px;
  left: 24px;
  animation: floatSubtle1 14s ease-in-out infinite alternate;
}

.bg-drawing-top-right {
  top: 16px;
  right: 24px;
  animation: floatSubtle2 16s ease-in-out infinite alternate;
}

.bg-drawing-bottom-left {
  bottom: 24px;
  left: 28px;
  animation: floatSubtle2 18s ease-in-out infinite alternate;
}

.bg-drawing-bottom-right {
  bottom: 24px;
  right: 28px;
  animation: floatSubtle1 15s ease-in-out infinite alternate;
}

@keyframes floatSubtle1 {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  100% {
    transform: translateY(-8px) rotate(0.4deg);
  }
}

@keyframes floatSubtle2 {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  100% {
    transform: translateY(7px) rotate(-0.4deg);
  }
}

/* Empty State: Centered in the middle on Desktop */
.home-view-container.empty-chat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 52px);
  padding: 0 16px;
}

.home-view-container.empty-chat .home-chat-scroll {
  flex: 0 0 auto;
  overflow: visible;
  padding: 0 0 14px 0;
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.home-view-container.empty-chat .home-chat-welcome {
  margin: 0 auto;
  padding: 0 12px;
}

.home-view-container.empty-chat .home-chat-input-area {
  flex: 0 0 auto;
  width: 100%;
  max-width: 800px;
  padding: 0;
  background: transparent;
  position: relative;
  z-index: 2;
}

/* Chat Messages Scroll Container (Active Chat State) */
.home-chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.home-chat-thread {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  z-index: 2;
}

/* Empty State / Welcome Screen */
.home-chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 16px 20px;
  max-width: 700px;
  margin: auto auto 24px;
}

.home-welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 14px;
}

.home-welcome-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #0f172a;
  margin-bottom: 8px;
}

.home-welcome-sub {
  font-size: 14.5px;
  color: #64748b;
  line-height: 1.55;
  max-width: 520px;
  margin-bottom: 12px;
}

/* Chat Message Bubbles */
.chat-message-row {
  display: flex;
  gap: 14px;
  width: 100%;
}

.chat-message-row.user {
  justify-content: flex-end;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.chat-avatar.ai {
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  color: #ffffff;
}

.chat-avatar.user {
  background: #1e0935;
  color: #ffffff;
}

.chat-bubble {
  max-width: 82%;
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
}

.chat-message-row.user .chat-bubble {
  background: #24073d;
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(36, 7, 61, 0.15);
}

.chat-message-row.ai .chat-bubble {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-top-left-radius: 4px;
}

/* Structured AI Builder Prompt Box */
.structured-prompt-box {
  background: #ffffff;
  border: 1.5px solid #c084fc;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0 10px;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.1);
}

.prompt-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3e8ff;
}

.prompt-box-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #6b21a8;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-copy-prompt {
  background: #7c3aed;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s ease;
}

.btn-copy-prompt:hover {
  background: #6d28d9;
}

.prompt-box-content {
  font-family: var(--font-mono);
  font-size: 12px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 8px;
  padding: 10px 12px;
  color: #4c1d95;
  white-space: pre-wrap;
  max-height: 280px;
  overflow-y: auto;
  line-height: 1.55;
}

.prompt-box-footer {
  margin-top: 10px;
  font-size: 11.5px;
  color: #7e22ce;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   CHAT INPUT AREA WITH ANIMATED MULTI-COLOR NEON BORDER
   -------------------------------------------------------------------------- */
.home-chat-input-area {
  padding: 12px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  width: 100%;
  position: relative;
  z-index: 10;
}

/* Animated Multi-Color Neon Border Chat Box (Refined, Tiny, Delicate Border) */
.neon-chat-wrapper {
  width: 100%;
  max-width: 800px;
  position: relative;
  border-radius: 18px;
  padding: 1.25px; /* Extremely tiny, subtle neon border */
  background: linear-gradient(120deg, rgba(255, 0, 122, 0.75), rgba(121, 40, 202, 0.8), rgba(0, 112, 243, 0.8), rgba(0, 223, 216, 0.75), rgba(16, 185, 129, 0.75), rgba(245, 158, 11, 0.75), rgba(255, 0, 122, 0.75));
  background-size: 300% 300%;
  animation: neonFlow 8s ease-in-out infinite alternate;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 10px rgba(121, 40, 202, 0.1), 0 4px 16px -4px rgba(0, 112, 243, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.neon-chat-wrapper:hover,
.neon-chat-wrapper:focus-within {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 14px rgba(121, 40, 202, 0.15), 0 0 18px rgba(0, 112, 243, 0.12), 0 6px 20px -4px rgba(0, 0, 0, 0.06);
  animation-duration: 5s;
}

@keyframes neonFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.neon-chat-inner {
  background: #ffffff;
  border-radius: 16.75px;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 12px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.95);
}

.home-chat-textarea {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  color: #0f172a;
  resize: none;
  min-height: 48px;
  max-height: 180px;
  padding: 2px 4px 6px;
}

.home-chat-textarea::placeholder {
  color: #94a3b8;
  font-size: 14.5px;
}

/* Bottom Controls inside Neon Chat */
.neon-chat-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  gap: 12px;
}

.neon-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Beautiful Minimalist Plus Button */
.btn-chat-plus {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  user-select: none;
}

.btn-chat-plus .plus-icon {
  font-size: 20px;
  font-weight: 350;
  line-height: 1;
  margin-top: -1px;
}

.btn-chat-plus:hover {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #7c3aed;
  transform: scale(1.08) rotate(90deg);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.18);
}

.btn-chat-plus.attached {
  background: #ede9fe;
  border-color: #a855f7;
  color: #7c3aed;
}

.attached-context-label {
  font-size: 11.5px;
  font-weight: 700;
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  border-radius: 9999px;
  padding: 3px 10px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.btn-chat-voice {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-chat-voice:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Beautiful Dynamic Send Arrow Button */
.btn-neon-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
  /* Hidden by default until user types */
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  visibility: hidden;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When typing / has-text */
.neon-chat-wrapper.has-text .btn-neon-send,
.btn-neon-send.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  visibility: visible;
}

.btn-neon-send:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.55);
}

.btn-neon-send:active {
  transform: scale(0.95);
}

.send-arrow-icon {
  transition: transform 0.15s ease;
}

.btn-neon-send:hover .send-arrow-icon {
  transform: translateY(-2px);
}

/* Minimalist Starter Suggestion Chips (Desktop: 1 Row, Mobile: 2x2 Grid) */
.home-suggestions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  max-width: 800px;
  width: 100%;
}

.home-sug-chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 650;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.home-sug-chip:hover {
  border-color: #c084fc;
  background: #faf5ff;
  color: #6b21a8;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(124, 58, 237, 0.08);
}

.home-sug-chip .chip-emoji {
  font-size: 13px;
  line-height: 1;
}

.home-sug-chip .chip-text {
  font-size: 12px;
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   VIEW 2: PROJECTS VIEW (List / Grid of User Projects)
   -------------------------------------------------------------------------- */
.home-projects-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-projects-inner {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.home-section-title-group h2 {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.home-section-title-group p {
  font-size: 13px;
  color: #64748b;
  margin-top: 3px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.project-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  border-color: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.08);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.project-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.project-card-source {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
  letter-spacing: 0.04em;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
}

.project-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   VIEW 3: LEVEL 2 PROJECT OVERVIEW (Detail before Studio)
   -------------------------------------------------------------------------- */
.home-project-overview-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-project-overview-inner {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 750;
  color: #475569;
  cursor: pointer;
  align-self: flex-start;
  transition: all 0.15s ease;
}

.btn-back-home:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.po-banner-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.po-banner-left h1 {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.po-banner-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  margin-top: 6px;
}

/* Primary Action Buttons Grid */
.po-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.po-action-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.po-action-card:hover {
  border-color: #7c3aed;
  background: #faf5ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.08);
}

.po-action-card.highlight {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #ffffff;
  border: none;
}

.po-action-card.highlight .po-card-desc {
  color: #fdf4ff;
}

.po-action-card.highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.25);
}

.po-card-icon {
  font-size: 24px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f1f5f9;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.po-action-card.highlight .po-card-icon {
  background: rgba(255, 255, 255, 0.2);
}

.po-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.po-card-title {
  font-size: 14px;
  font-weight: 800;
}

.po-card-desc {
  font-size: 12px;
  color: #64748b;
}

/* --------------------------------------------------------------------------
   VIEW 4: GITHUB IMPORT WORKFLOW (Step-by-step explicit action)
   -------------------------------------------------------------------------- */
.import-flow-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.import-step-box {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --------------------------------------------------------------------------
   VIEW 5: FILE IMPORT WORKFLOW (Drag & Drop + 5-step animation)
   -------------------------------------------------------------------------- */
.dropzone-box {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  background: #fafbfc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone-box:hover,
.dropzone-box.dragover {
  border-color: #7c3aed;
  background: #faf5ff;
}

.import-progress-container {
  margin-top: 24px;
  display: none;
  flex-direction: column;
  gap: 14px;
}

.import-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: #64748b;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8fafc;
}

.import-step-item.active {
  color: #7c3aed;
  font-weight: 750;
  background: #f5f3ff;
}

.import-step-item.completed {
  color: #166534;
  background: #f0fdf4;
  font-weight: 700;
}

.import-step-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  background: #e2e8f0;
  color: #475569;
}

.import-step-item.active .import-step-icon {
  background: #7c3aed;
  color: #ffffff;
  animation: spinStep 1s linear infinite;
}

@keyframes spinStep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.import-step-item.completed .import-step-icon {
  background: #22c55e;
  color: #ffffff;
}

/* Success Card after Import */
.import-success-card {
  display: none;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN (Mobile & Tablet Fitting)
   -------------------------------------------------------------------------- */
.home-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.home-sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 820px) {
  .home-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 50;
    transform: translateX(-100%);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    background: #ffffff;
  }

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

  .home-mobile-toggle {
    display: inline-flex;
  }

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

  .po-actions-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Screens (<= 640px) */
@media (max-width: 640px) {
  .home-top-header {
    height: 48px;
    padding: 0 12px;
  }

  .home-view-container {
    height: calc(100vh - 48px);
  }

  .home-active-title {
    font-size: 13.5px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-engine-pill {
    padding: 3px 8px;
    font-size: 10.5px;
  }

  /* Empty Chat on Mobile: centered with safe spacing */
  .home-view-container.empty-chat {
    padding: 0 10px;
    justify-content: center;
  }

  .home-view-container.empty-chat .home-chat-scroll {
    padding: 0 0 10px 0;
  }

  .home-chat-welcome {
    padding: 12px 6px 10px;
    margin: 0 auto 10px;
  }

  .home-welcome-badge {
    padding: 3px 10px;
    font-size: 10.5px;
    margin-bottom: 8px;
  }

  .home-welcome-title {
    font-size: 22px;
    line-height: 1.25;
    margin-bottom: 6px;
  }

  .home-welcome-sub {
    font-size: 12.5px;
    line-height: 1.45;
    margin-bottom: 8px;
  }

  /* Chat Messages Thread on Mobile */
  .home-chat-scroll {
    padding: 16px 10px;
  }

  .chat-message-row {
    gap: 8px;
  }

  .chat-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .chat-bubble {
    max-width: 88%;
    padding: 11px 13px;
    font-size: 13px;
    line-height: 1.55;
    border-radius: 14px;
  }

  .structured-prompt-box {
    padding: 10px 12px;
    margin: 10px 0 8px;
    border-radius: 10px;
  }

  .prompt-box-content {
    font-size: 11px;
    padding: 10px 12px;
    max-height: 240px;
  }

  /* Neon Chat Box on Mobile (Tiny, Delicate Neon Border) */
  .home-chat-input-area {
    padding: 6px 10px 14px;
  }

  .neon-chat-wrapper {
    border-radius: 15px;
    padding: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 8px rgba(121, 40, 202, 0.08), 0 3px 12px -3px rgba(0, 112, 243, 0.06);
  }

  .neon-chat-inner {
    border-radius: 14px;
    padding: 10px 12px 8px;
  }

  .home-chat-textarea {
    font-size: 13.5px;
    min-height: 38px;
    padding: 0 2px 4px;
  }

  .home-chat-textarea::placeholder {
    font-size: 13px;
  }

  .btn-chat-plus {
    width: 28px;
    height: 28px;
  }

  .btn-chat-plus .plus-icon {
    font-size: 18px;
  }

  .btn-chat-voice {
    width: 28px;
    height: 28px;
  }

  .btn-neon-send {
    width: 30px;
    height: 30px;
  }

  .attached-context-label {
    max-width: 130px;
    font-size: 10.5px;
    padding: 2px 7px;
  }

  /* Suggestion Chips: 2x2 Grid with Small, Crisp Typography */
  .home-suggestions-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 6px 6px !important;
    margin-top: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .home-sug-chip {
    width: 100% !important;
    min-width: 0 !important;
    padding: 7px 6px !important;
    font-size: 11px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  }

  .home-sug-chip .chip-emoji {
    font-size: 12px !important;
    flex-shrink: 0 !important;
  }

  .home-sug-chip .chip-text {
    font-size: 10.5px !important;
    font-weight: 650 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Projects View on Mobile */
  .home-projects-container {
    padding: 16px 12px !important;
  }

  .home-projects-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Project Overview (Level 2) on Mobile */
  .project-overview-clean-container {
    padding: 16px 14px 40px !important;
    gap: 20px !important;
  }

  .po-identity-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .po-identity-actions {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .po-identity-actions button {
    flex: 1 1 auto !important;
  }

  .po-actions-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .po-action-card {
    padding: 14px !important;
  }

  /* Background Drawings on Mobile */
  .home-dev-bg-drawings {
    opacity: 0.10 !important;
  }

  .bg-drawing svg {
    transform: scale(0.65);
    transform-origin: top left;
  }

  .bg-drawing-top-right svg {
    transform-origin: top right;
  }

  .bg-drawing-bottom-left,
  .bg-drawing-bottom-right {
    display: none !important;
  }

  /* Import Views on Mobile */
  .import-flow-card {
    padding: 18px 14px !important;
    border-radius: 12px !important;
    margin: 10px !important;
  }

  .dropzone-box {
    padding: 24px 12px !important;
  }
}

/* ==========================================================================
   DARK THEME COMPLIANCE (Phone / System Dark Mode & Explicit Theme Toggle)
   Applies exclusively to Build Real Studio
   ========================================================================== */

:root[data-theme="dark"],
html.dark,
html[data-theme="dark"] {
  color-scheme: dark;
}

:root[data-theme="dark"] .home-app-shell,
html.dark .home-app-shell,
html[data-theme="dark"] .home-app-shell,
body[data-theme="dark"] .home-app-shell {
  background-color: #090d16;
  color: #f1f5f9;
}

:root[data-theme="dark"] .home-sidebar,
html.dark .home-sidebar,
html[data-theme="dark"] .home-sidebar {
  background-color: #0d131f;
  border-color: #1e293b;
}

:root[data-theme="dark"] .home-brand-title,
html.dark .home-brand-title,
html[data-theme="dark"] .home-brand-title {
  color: #f8fafc;
}

:root[data-theme="dark"] .btn-home-new-chat,
html.dark .btn-home-new-chat,
html[data-theme="dark"] .btn-home-new-chat {
  background: #151d2e;
  border-color: #27354f;
  color: #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .btn-home-new-chat:hover,
html.dark .btn-home-new-chat:hover,
html[data-theme="dark"] .btn-home-new-chat:hover {
  background: #1c273e;
  border-color: #384b6f;
}

:root[data-theme="dark"] .home-menu-section-label,
html.dark .home-menu-section-label,
html[data-theme="dark"] .home-menu-section-label {
  color: #64748b;
}

:root[data-theme="dark"] .home-chat-item,
html.dark .home-chat-item,
html[data-theme="dark"] .home-chat-item {
  color: #cbd5e1;
}

:root[data-theme="dark"] .home-chat-item:hover,
html.dark .home-chat-item:hover,
html[data-theme="dark"] .home-chat-item:hover {
  background: #172033;
  color: #f8fafc;
}

:root[data-theme="dark"] .home-chat-item.active,
html.dark .home-chat-item.active,
html[data-theme="dark"] .home-chat-item.active {
  background: #27174a;
  color: #d8b4fe;
}

:root[data-theme="dark"] .btn-chat-item-menu,
html.dark .btn-chat-item-menu,
html[data-theme="dark"] .btn-chat-item-menu {
  color: #64748b;
}

:root[data-theme="dark"] .btn-chat-item-menu:hover,
html.dark .btn-chat-item-menu:hover,
html[data-theme="dark"] .btn-chat-item-menu:hover {
  color: #f8fafc;
}

:root[data-theme="dark"] .home-nav-btn,
html.dark .home-nav-btn,
html[data-theme="dark"] .home-nav-btn {
  color: #cbd5e1;
}

:root[data-theme="dark"] .home-nav-btn:hover,
html.dark .home-nav-btn:hover,
html[data-theme="dark"] .home-nav-btn:hover {
  background: #172033;
  color: #f8fafc;
}

:root[data-theme="dark"] .home-nav-btn.active,
html.dark .home-nav-btn.active,
html[data-theme="dark"] .home-nav-btn.active {
  background: #1e293b;
  color: #ffffff;
}

:root[data-theme="dark"] .home-sidebar-footer,
html.dark .home-sidebar-footer,
html[data-theme="dark"] .home-sidebar-footer {
  background: #090d16;
  border-color: #1e293b;
}

:root[data-theme="dark"] .home-user-badge,
html.dark .home-user-badge,
html[data-theme="dark"] .home-user-badge {
  background: #151d2e;
  border-color: #27354f;
}

:root[data-theme="dark"] .home-user-name,
html.dark .home-user-name,
html[data-theme="dark"] .home-user-name {
  color: #f8fafc;
}

:root[data-theme="dark"] .home-user-status,
html.dark .home-user-status,
html[data-theme="dark"] .home-user-status {
  color: #94a3b8;
}

:root[data-theme="dark"] .home-top-header,
html.dark .home-top-header,
html[data-theme="dark"] .home-top-header {
  background: #0d131f;
  border-color: #1e293b;
}

:root[data-theme="dark"] .home-active-title,
html.dark .home-active-title,
html[data-theme="dark"] .home-active-title {
  color: #f8fafc;
}

:root[data-theme="dark"] .home-mobile-toggle,
html.dark .home-mobile-toggle,
html[data-theme="dark"] .home-mobile-toggle {
  background: #151d2e;
  border-color: #27354f;
  color: #f8fafc;
}

:root[data-theme="dark"] .home-engine-pill,
html.dark .home-engine-pill,
html[data-theme="dark"] .home-engine-pill {
  background: #151d2e;
  border-color: #27354f;
  color: #cbd5e1;
}

:root[data-theme="dark"] .home-welcome-badge,
html.dark .home-welcome-badge,
html[data-theme="dark"] .home-welcome-badge {
  background: #1e1b4b;
  border-color: #3730a3;
  color: #a78bfa;
}

:root[data-theme="dark"] .home-welcome-title,
html.dark .home-welcome-title,
html[data-theme="dark"] .home-welcome-title {
  color: #f8fafc;
}

:root[data-theme="dark"] .home-welcome-sub,
html.dark .home-welcome-sub,
html[data-theme="dark"] .home-welcome-sub {
  color: #94a3b8;
}

:root[data-theme="dark"] .home-dev-bg-drawings,
html.dark .home-dev-bg-drawings,
html[data-theme="dark"] .home-dev-bg-drawings {
  color: #94a3b8;
  opacity: 0.22;
}

:root[data-theme="dark"] .neon-chat-inner,
html.dark .neon-chat-inner,
html[data-theme="dark"] .neon-chat-inner {
  background: #0d131f;
  box-shadow: none;
}

:root[data-theme="dark"] .home-chat-textarea,
html.dark .home-chat-textarea,
html[data-theme="dark"] .home-chat-textarea {
  color: #f8fafc;
}

:root[data-theme="dark"] .home-chat-textarea::placeholder,
html.dark .home-chat-textarea::placeholder,
html[data-theme="dark"] .home-chat-textarea::placeholder {
  color: #64748b;
}

:root[data-theme="dark"] .btn-chat-plus,
:root[data-theme="dark"] .btn-chat-voice,
html.dark .btn-chat-plus,
html.dark .btn-chat-voice,
html[data-theme="dark"] .btn-chat-plus,
html[data-theme="dark"] .btn-chat-voice {
  background: #151d2e;
  color: #cbd5e1;
}

:root[data-theme="dark"] .btn-chat-plus:hover,
:root[data-theme="dark"] .btn-chat-voice:hover,
html.dark .btn-chat-plus:hover,
html.dark .btn-chat-voice:hover,
html[data-theme="dark"] .btn-chat-plus:hover,
html[data-theme="dark"] .btn-chat-voice:hover {
  background: #1e293b;
  color: #ffffff;
}

:root[data-theme="dark"] .home-sug-chip,
html.dark .home-sug-chip,
html[data-theme="dark"] .home-sug-chip {
  background: #0d131f;
  border-color: #1e293b;
  color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .home-sug-chip:hover,
html.dark .home-sug-chip:hover,
html[data-theme="dark"] .home-sug-chip:hover {
  background: #172033;
  border-color: #3b82f6;
  color: #f8fafc;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.2);
}

:root[data-theme="dark"] .chat-bubble.assistant,
html.dark .chat-bubble.assistant,
html[data-theme="dark"] .chat-bubble.assistant {
  background: #0d131f;
  border-color: #1e293b;
  color: #e2e8f0;
}

:root[data-theme="dark"] .chat-bubble.assistant strong,
html.dark .chat-bubble.assistant strong,
html[data-theme="dark"] .chat-bubble.assistant strong {
  color: #ffffff;
}

:root[data-theme="dark"] .chat-bubble.assistant h1,
:root[data-theme="dark"] .chat-bubble.assistant h2,
:root[data-theme="dark"] .chat-bubble.assistant h3,
:root[data-theme="dark"] .chat-bubble.assistant h4,
html.dark .chat-bubble.assistant h1,
html.dark .chat-bubble.assistant h2,
html.dark .chat-bubble.assistant h3,
html.dark .chat-bubble.assistant h4,
html[data-theme="dark"] .chat-bubble.assistant h1,
html[data-theme="dark"] .chat-bubble.assistant h2,
html[data-theme="dark"] .chat-bubble.assistant h3,
html[data-theme="dark"] .chat-bubble.assistant h4 {
  color: #f8fafc !important;
}

:root[data-theme="dark"] .chat-avatar.assistant-avatar,
html.dark .chat-avatar.assistant-avatar,
html[data-theme="dark"] .chat-avatar.assistant-avatar {
  background: #1e1b4b;
  border-color: #3730a3;
  color: #a78bfa;
}

:root[data-theme="dark"] .structured-prompt-box,
html.dark .structured-prompt-box,
html[data-theme="dark"] .structured-prompt-box {
  background: #070a12;
  border-color: #1e293b;
}

:root[data-theme="dark"] .prompt-box-header,
html.dark .prompt-box-header,
html[data-theme="dark"] .prompt-box-header {
  background: #0d131f;
  border-color: #1e293b;
  color: #f8fafc;
}

:root[data-theme="dark"] .prompt-box-content,
html.dark .prompt-box-content,
html[data-theme="dark"] .prompt-box-content {
  background: #04060a;
  border-color: #1e293b;
  color: #cbd5e1;
}

:root[data-theme="dark"] .btn-copy-prompt,
:root[data-theme="dark"] .chat-action-btn,
html.dark .btn-copy-prompt,
html.dark .chat-action-btn,
html[data-theme="dark"] .btn-copy-prompt,
html[data-theme="dark"] .chat-action-btn {
  background: #151d2e;
  border-color: #27354f;
  color: #cbd5e1;
}

:root[data-theme="dark"] .btn-copy-prompt:hover,
:root[data-theme="dark"] .chat-action-btn:hover,
html.dark .btn-copy-prompt:hover,
html.dark .chat-action-btn:hover,
html[data-theme="dark"] .btn-copy-prompt:hover,
html[data-theme="dark"] .chat-action-btn:hover {
  background: #1e293b;
  color: #ffffff;
}

:root[data-theme="dark"] .project-card,
html.dark .project-card,
html[data-theme="dark"] .project-card {
  background: #0d131f;
  border-color: #1e293b;
}

:root[data-theme="dark"] .project-card:hover,
html.dark .project-card:hover,
html[data-theme="dark"] .project-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .project-card-title,
html.dark .project-card-title,
html[data-theme="dark"] .project-card-title {
  color: #f8fafc;
}

:root[data-theme="dark"] .project-card-desc,
html.dark .project-card-desc,
html[data-theme="dark"] .project-card-desc {
  color: #94a3b8;
}

:root[data-theme="dark"] .project-tech-tag,
html.dark .project-tech-tag,
html[data-theme="dark"] .project-tech-tag {
  background: #151d2e;
  border-color: #27354f;
  color: #cbd5e1;
}

:root[data-theme="dark"] .home-projects-empty,
html.dark .home-projects-empty,
html[data-theme="dark"] .home-projects-empty {
  background: #0d131f !important;
  border-color: #27354f !important;
}

:root[data-theme="dark"] .home-projects-empty h3,
html.dark .home-projects-empty h3,
html[data-theme="dark"] .home-projects-empty h3 {
  color: #f8fafc !important;
}

:root[data-theme="dark"] .project-overview-clean-container,
html.dark .project-overview-clean-container,
html[data-theme="dark"] .project-overview-clean-container {
  background: #090d16;
}

:root[data-theme="dark"] .po-identity-bar,
:root[data-theme="dark"] .po-action-card,
:root[data-theme="dark"] .po-metric-card,
html.dark .po-identity-bar,
html.dark .po-action-card,
html.dark .po-metric-card,
html[data-theme="dark"] .po-identity-bar,
html[data-theme="dark"] .po-action-card,
html[data-theme="dark"] .po-metric-card {
  background: #0d131f;
  border-color: #1e293b;
}

:root[data-theme="dark"] .po-identity-title,
:root[data-theme="dark"] .po-metric-value,
:root[data-theme="dark"] .po-action-card-title,
html.dark .po-identity-title,
html.dark .po-metric-value,
html.dark .po-action-card-title,
html[data-theme="dark"] .po-identity-title,
html[data-theme="dark"] .po-metric-value,
html[data-theme="dark"] .po-action-card-title {
  color: #f8fafc;
}

:root[data-theme="dark"] .po-identity-meta,
:root[data-theme="dark"] .po-metric-label,
:root[data-theme="dark"] .po-action-card-desc,
html.dark .po-identity-meta,
html.dark .po-metric-label,
html.dark .po-action-card-desc,
html[data-theme="dark"] .po-identity-meta,
html[data-theme="dark"] .po-metric-label,
html[data-theme="dark"] .po-action-card-desc {
  color: #94a3b8;
}

:root[data-theme="dark"] .po-code-preview-box,
html.dark .po-code-preview-box,
html[data-theme="dark"] .po-code-preview-box {
  background: #04060a;
  border-color: #1e293b;
  color: #cbd5e1;
}

:root[data-theme="dark"] .po-file-item,
html.dark .po-file-item,
html[data-theme="dark"] .po-file-item {
  color: #cbd5e1;
}

:root[data-theme="dark"] .po-file-item:hover,
html.dark .po-file-item:hover,
html[data-theme="dark"] .po-file-item:hover {
  background: #172033;
  color: #f8fafc;
}

:root[data-theme="dark"] .import-flow-card,
html.dark .import-flow-card,
html[data-theme="dark"] .import-flow-card {
  background: #0d131f;
  border-color: #1e293b;
}

:root[data-theme="dark"] .import-flow-card h2,
html.dark .import-flow-card h2,
html[data-theme="dark"] .import-flow-card h2 {
  color: #f8fafc;
}

:root[data-theme="dark"] .dropzone-box,
html.dark .dropzone-box,
html[data-theme="dark"] .dropzone-box {
  background: #070a12;
  border-color: #27354f;
  color: #cbd5e1;
}

:root[data-theme="dark"] .dropzone-box:hover,
:root[data-theme="dark"] .dropzone-box.dragover,
html.dark .dropzone-box:hover,
html.dark .dropzone-box.dragover,
html[data-theme="dark"] .dropzone-box:hover,
html[data-theme="dark"] .dropzone-box.dragover {
  background: #0d131f;
  border-color: #3b82f6;
}

:root[data-theme="dark"] .import-step-item,
html.dark .import-step-item,
html[data-theme="dark"] .import-step-item {
  background: #070a12;
  border-color: #1e293b;
  color: #cbd5e1;
}

:root[data-theme="dark"] .settings-theme-card,
:root[data-theme="dark"] #home-view-settings .import-flow-card > div > div,
html.dark .settings-theme-card,
html.dark #home-view-settings .import-flow-card > div > div,
html[data-theme="dark"] .settings-theme-card,
html[data-theme="dark"] #home-view-settings .import-flow-card > div > div {
  background: #0d131f !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

:root[data-theme="dark"] .theme-option-label,
html.dark .theme-option-label,
html[data-theme="dark"] .theme-option-label {
  background: #151d2e !important;
  border-color: #27354f !important;
  color: #f8fafc !important;
}

:root[data-theme="dark"] .settings-theme-pill,
html.dark .settings-theme-pill,
html[data-theme="dark"] .settings-theme-pill {
  background: #1e1b4b !important;
  border-color: #3730a3 !important;
  color: #a78bfa !important;
}

/* Fallback pure CSS media query for Phone Dark Mode when no explicit override */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-app-shell {
    background-color: #090d16;
    color: #f1f5f9;
  }
  :root:not([data-theme="light"]) .home-sidebar {
    background-color: #0d131f;
    border-color: #1e293b;
  }
  :root:not([data-theme="light"]) .home-brand-title {
    color: #f8fafc;
  }
  :root:not([data-theme="light"]) .btn-home-new-chat {
    background: #151d2e;
    border-color: #27354f;
    color: #f8fafc;
  }
  :root:not([data-theme="light"]) .home-chat-item {
    color: #cbd5e1;
  }
  :root:not([data-theme="light"]) .home-chat-item:hover {
    background: #172033;
    color: #f8fafc;
  }
  :root:not([data-theme="light"]) .home-chat-item.active {
    background: #27174a;
    color: #d8b4fe;
  }
  :root:not([data-theme="light"]) .home-nav-btn {
    color: #cbd5e1;
  }
  :root:not([data-theme="light"]) .home-nav-btn:hover {
    background: #172033;
    color: #f8fafc;
  }
  :root:not([data-theme="light"]) .home-nav-btn.active {
    background: #1e293b;
    color: #ffffff;
  }
  :root:not([data-theme="light"]) .home-sidebar-footer {
    background: #090d16;
    border-color: #1e293b;
  }
  :root:not([data-theme="light"]) .home-user-badge {
    background: #151d2e;
    border-color: #27354f;
  }
  :root:not([data-theme="light"]) .home-user-name {
    color: #f8fafc;
  }
  :root:not([data-theme="light"]) .home-top-header {
    background: #0d131f;
    border-color: #1e293b;
  }
  :root:not([data-theme="light"]) .home-active-title {
    color: #f8fafc;
  }
  :root:not([data-theme="light"]) .home-engine-pill {
    background: #151d2e;
    border-color: #27354f;
    color: #cbd5e1;
  }
  :root:not([data-theme="light"]) .home-welcome-title {
    color: #f8fafc;
  }
  :root:not([data-theme="light"]) .neon-chat-inner {
    background: #0d131f;
  }
  :root:not([data-theme="light"]) .home-chat-textarea {
    color: #f8fafc;
  }
  :root:not([data-theme="light"]) .home-sug-chip {
    background: #0d131f;
    border-color: #1e293b;
    color: #cbd5e1;
  }
  :root:not([data-theme="light"]) .chat-bubble.assistant {
    background: #0d131f;
    border-color: #1e293b;
    color: #e2e8f0;
  }
  :root:not([data-theme="light"]) .project-card,
  :root:not([data-theme="light"]) .po-identity-bar,
  :root:not([data-theme="light"]) .po-action-card,
  :root:not([data-theme="light"]) .po-metric-card,
  :root:not([data-theme="light"]) .import-flow-card {
    background: #0d131f;
    border-color: #1e293b;
  }
  :root:not([data-theme="light"]) .settings-theme-card,
  :root:not([data-theme="light"]) #home-view-settings .import-flow-card > div > div {
    background: #0d131f !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
  }
  :root:not([data-theme="light"]) .theme-option-label {
    background: #151d2e !important;
    border-color: #27354f !important;
    color: #f8fafc !important;
  }
}

