@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ==========================================================================
1. Tokens & Base Reset
   ========================================================================== */

:root {
  --bg: #09090e;
  --bg-elevated: #0f0f17;
  --panel: #13121c;
  --panel-hover: #1a1926;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f3fc;
  --text-soft: #a4a0b5;
  --muted: #6e6a7e;
  --accent: #a78bfa;
  --accent-bright: #c4b0ff;
  --accent-glow: rgba(139, 92, 246, 0.22);

  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  max-width: 100%;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(ellipse 65% 35% at 50% -5%, rgba(124, 92, 245, 0.16), transparent 70%),
    var(--bg);
}

img,
svg,
video,
picture {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.nav-icon img,
.nav-icon svg,
.brand-mark img,
.brand-mark svg,
.model-orb img,
.model-orb svg,
.badge-orb img,
.badge-orb svg,
.suggestion-icon img,
.suggestion-icon svg,
.user-avatar img,
.user-avatar svg,
.assistant-avatar img,
.assistant-avatar svg,
.icon-button img,
.icon-button svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

button,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.75);
  outline-offset: 2px;
}

/* Subtle custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ==========================================================================
2. App Shell & Sidebar
   ========================================================================== */

.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
}

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: rgba(12, 12, 18, 0.92);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  transition: width 0.22s ease, padding 0.22s ease, opacity 0.2s ease, border-color 0.2s ease;
  z-index: 20;
}

.sidebar.collapsed {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
  border-right-color: transparent;
  opacity: 0;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 20px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  flex-shrink: 0;
  border-radius: 11px;
  border: 1px solid rgba(182, 156, 255, 0.35);
  background: linear-gradient(145deg, #2d2248, #14121e);
  display: grid;
  place-items: center;
  color: var(--accent-bright);
  font-size: 15px;
  box-shadow: 0 0 24px rgba(124, 92, 245, 0.2);
  overflow: hidden;
  padding: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18);
  display: block;
}

.brand-word {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 5px;
  line-height: 1;
}

.brand-word strong,
.brand-word span,
.brand-word small {
  white-space: nowrap;
}

.brand-word strong {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1.8px;
}

.brand-word span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
}

.brand-word small {
  grid-column: 1 / -1;
  font-size: 8px;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-top: 4px;
}

.icon-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  max-width: 34px;
  max-height: 34px;
  flex-shrink: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  border-radius: 9px;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-button:hover {
  background: var(--panel-hover);
  border-color: var(--line);
  color: var(--text);
}

.new-chat-button,
.sidebar-search {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  font-size: 13px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.new-chat-button {
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 500;
}

.new-chat-button:hover {
  background: var(--panel-hover);
  border-color: rgba(167, 139, 250, 0.38);
}

.new-chat-button kbd {
  margin-left: auto;
  font-family: inherit;
  font-size: 10px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
}

.sidebar-search {
  margin-top: 6px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-soft);
}

.sidebar-search:hover {
  background: var(--panel);
  color: var(--text);
}

.nav-label {
  margin: 22px 10px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--muted);
  text-transform: uppercase;
}

.tool-nav {
  display: grid;
  gap: 2px;
}

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  text-align: left;
  font-size: 13px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-item:hover {
  background: var(--panel);
  color: var(--text);
}

.nav-item.selected {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.2);
  color: var(--text);
  font-weight: 500;
}

.nav-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  max-width: 24px;
  max-height: 24px;
  flex-shrink: 0;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.nav-item.selected .nav-icon {
  background: rgba(167, 139, 250, 0.2);
  color: var(--accent-bright);
}

.nav-icon.violet { color: #b29aff; }
.nav-icon.pink   { color: #eb9fc9; }
.nav-icon.blue   { color: #8ab2ff; }
.nav-icon.green  { color: #86d8ae; }
.nav-icon.amber  { color: #eab97d; }
.nav-icon.cyan   { color: #7ad7de; }

.history-list {
  overflow-y: auto;
  max-height: 180px;
}

.history-empty {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  padding: 8px 10px;
}

.history-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.history-item:hover {
  background: var(--panel);
  color: var(--text);
}

.history-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 12px;
}

.side-bottom-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12px;
  text-align: left;
}

.side-bottom-item:hover {
  background: var(--panel);
  color: var(--text);
}

.profile-card {
  margin-top: 10px;
  padding: 12px 6px 2px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #624d96, #2d2345);
  color: #ebe2ff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-text strong {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-text small {
  font-size: 11px;
  color: var(--muted);
}

.profile-more {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

/* ==========================================================================
3. Main Area & Topbar
   ========================================================================== */

.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: clip;
}

.topbar {
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.model-selector-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-selector {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 9px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.model-selector:hover {
  background: var(--panel);
  border-color: var(--line);
}

.model-orb {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  max-width: 24px;
  max-height: 24px;
  flex-shrink: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #3c2c66, #1e1830);
  color: var(--accent-bright);
  font-size: 12px;
  overflow: hidden;
  padding: 0;
}

.model-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  display: block;
}

.badge-logo-img,
.composer-logo-img,
.card-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  display: block;
}

.model-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 244px;
  background: #171622;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  z-index: 30;
}

.model-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.model-menu button:hover {
  background: var(--panel-hover);
}

.model-menu small {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 400;
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 999px;
  padding: 5px 11px;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.upgrade-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(167, 139, 250, 0.32);
  background: linear-gradient(120deg, rgba(124, 92, 245, 0.18), rgba(167, 139, 250, 0.08));
  color: var(--accent-bright);
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.upgrade-button:hover {
  background: rgba(124, 92, 245, 0.26);
  border-color: rgba(167, 139, 250, 0.5);
}

/* ==========================================================================
4. Welcome View, Composer & Suggestions
   ========================================================================== */

.content-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 28px;
  min-width: 0;
  overflow-x: clip;
}

.welcome-view {
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-bright);
  background: rgba(124, 92, 245, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 20px;
}

.badge-orb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  max-width: 15px;
  max-height: 15px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.welcome-view h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(38px, 5.5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.welcome-view h1 span {
  background: linear-gradient(105deg, #ffffff 10%, #c4b0ff 48%, #9575f5 78%, #7ca6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.welcome-sub {
  max-width: 520px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.7;
  margin: 16px 0 28px;
}

/* Composer Card */
.prompt-composer {
  width: 100%;
  max-width: 680px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(23, 22, 33, 0.95), rgba(15, 14, 22, 0.98));
  border-radius: 16px;
  padding: 14px 16px 12px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.prompt-composer:focus-within {
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow:
    0 0 0 3px rgba(124, 92, 245, 0.14),
    0 22px 55px rgba(0, 0, 0, 0.5);
}

.composer-tool-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-bright);
  padding-bottom: 8px;
}

.composer-label-muted {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.prompt-composer textarea {
  width: 100%;
  resize: none;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  min-height: 64px;
  padding: 2px 0 10px;
}

.prompt-composer textarea::placeholder {
  color: var(--muted);
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.composer-actions,
.composer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.composer-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.composer-action:hover {
  background: var(--panel-hover);
  border-color: var(--line-strong);
  color: var(--text);
}

.mode-button {
  background: transparent;
  border-color: transparent;
}

.composer-logo-img {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  flex-shrink: 0;
}

.mic-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  max-width: 34px;
  max-height: 34px;
  flex-shrink: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  border-radius: 9px;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mic-button:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.send-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  max-width: 34px;
  max-height: 34px;
  flex-shrink: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  border-radius: 9px;
  display: grid;
  place-items: center;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.send-button.ready {
  background: linear-gradient(135deg, #b69cff, #7c5cf5);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--accent-glow);
}

.send-button.ready:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Suggestion Cards */
.suggestion-grid {
  width: 100%;
  max-width: 680px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.suggestion-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(17, 16, 25, 0.72);
  border-radius: 12px;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  overflow: hidden;
  min-width: 0;
}

.suggestion-card:hover {
  background: var(--panel-hover);
  border-color: rgba(167, 139, 250, 0.3);
  transform: translateY(-1px);
}

.suggestion-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 13px;
  overflow: hidden;
  padding: 0;
}

.card-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 5px;
}

.si-0 { color: #b69eff; background: rgba(167, 139, 250, 0.14); }
.si-1 { color: #8cb8ff; background: rgba(100, 155, 255, 0.14); }
.si-2 { color: #f0c27b; background: rgba(240, 194, 123, 0.14); }
.si-3 { color: #eb9fc9; background: rgba(235, 159, 201, 0.14); }

.suggestion-card strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.suggestion-card small {
  display: block;
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 2px;
}

.suggestion-arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.suggestion-card:hover .suggestion-arrow {
  color: var(--accent-bright);
  transform: translateX(2px);
}

/* Capabilities Footer Row */
.capabilities-row {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.capabilities-row > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--muted);
}

.capabilities-row > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  color: var(--text-soft);
  font-size: 11px;
}

.capabilities-row > div span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

/* ==========================================================================
5. Conversation View (Messenger-style: Your messages RIGHT, AI replies LEFT)
   ========================================================================== */

.conversation-view {
  width: 100%;
  max-width: 780px;
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.conversation-thread {
  flex: 1;
  overflow-y: auto;
  padding: 12px 6px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* User message on the RIGHT */
.user-message {
  display: flex;
  flex-direction: row-reverse;
  gap: 10px;
  align-items: flex-end;
  align-self: flex-end;
  max-width: min(78%, 560px);
  margin: 8px 0 12px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, #624d96);
  border: 1px solid rgba(196, 176, 255, 0.35);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.user-message-text {
  padding: 10px 14px;
  border-radius: 18px 18px 4px 18px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(109, 74, 214, 0.2));
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* AI reply on the LEFT */
.assistant-message {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: flex-start;
  align-self: flex-start;
  width: 100%;
  max-width: min(86%, 660px);
  margin: 8px 0 18px;
}

.assistant-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #37275c, #1a1529);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: var(--accent-bright);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.assistant-response {
  flex: 1;
  min-width: 0;
  padding: 11px 15px;
  border-radius: 18px 18px 18px 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.65;
}

.assistant-response h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 2px 0 8px;
}

.assistant-response p {
  margin: 0 0 10px;
}

.assistant-response p:last-child {
  margin-bottom: 0;
}

.assistant-response pre,
.assistant-response code {
  max-width: 100%;
}

.assistant-response pre,
.code-block {
  margin: 10px 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(9, 9, 14, 0.85);
  border: 1px solid var(--line);
  overflow-x: auto;
  max-width: 100%;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text);
}

/* Hide the "Vyron Smart · Chat" callout badge */
.response-callout {
  display: none !important;
}

.response-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.response-tools button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
}

.response-tools button:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.typing-wrap {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  font-size: 12px;
  padding-top: 2px;
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
}

.typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.1s infinite ease-in-out;
}

.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.conversation-composer {
  max-width: 100%;
  padding: 12px 14px 10px;
}

.conversation-composer textarea {
  min-height: 42px;
  padding-bottom: 8px;
}

.conversation-disclaimer {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  padding: 10px 0 4px;
}

/* ==========================================================================
6. Footer & Toast
   ========================================================================== */

.app-footer {
  height: 44px;
  padding: 0 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  background: rgba(9, 9, 14, 0.75);
}

.app-footer > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0.9px;
  font-weight: 600;
  color: var(--text-soft);
}

.footer-glow {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.app-footer b {
  font-weight: 600;
  color: var(--text);
}

.toast {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  background: #1b1829;
  color: var(--accent-bright);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  z-index: 50;
  animation: toastIn 0.18s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
7. Responsive Breakpoints
   ========================================================================== */

@media (max-width: 900px) {
  .sidebar {
    width: 236px;
  }

  .topbar {
    padding: 0 16px;
  }

  .content-stage {
    padding: 24px 18px;
  }
}

@media (max-width: 680px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.75);
  }

  .sidebar.collapsed {
    width: 0;
  }

  .topbar {
    height: 58px;
    padding: 0 12px;
  }

  .status-pill {
    display: none;
  }

  .composer-label-muted {
    display: none;
  }

  .suggestion-grid {
    grid-template-columns: 1fr;
  }

  .user-message {
    max-width: 88%;
  }

  .assistant-message {
    max-width: 94%;
  }

  .app-footer {
    padding: 0 14px;
    font-size: 10px;
  }

  .app-footer > span:nth-child(2) {
    display: none;
  }
}