/* ============================================================
   style.css  –  AI Chat App
   Fonts: Syne (headings/logo), Inter (body), JetBrains Mono (code)
   ============================================================ */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --font-ui:   'Inter', sans-serif;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Dark theme (default) */
  --bg-base:       #0d0d0f;
  --bg-surface:    #131316;
  --bg-elevated:   #1c1c21;
  --bg-hover:      #25252c;
  --bg-active:     #2e2e38;
  --border:        #2a2a35;
  --border-light:  #323240;

  --text-primary:  #f0f0f5;
  --text-secondary:#9898b0;
  --text-muted:    #5c5c78;

  --accent:        #7c6aff;
  --accent-dim:    #4a3faa;
  --accent-glow:   rgba(124, 106, 255, 0.18);
  --accent-hover:  #9080ff;

  --user-bubble:   #1e1b40;
  --user-border:   #4a3faa;
  --ai-bubble:     #141418;
  --ai-border:     #2a2a35;

  --danger:        #ff4f4f;
  --danger-dim:    rgba(255, 79, 79, 0.15);
  --success:       #34d399;

  --shadow-sm:     0 1px 3px rgba(0,0,0,.4);
  --shadow-md:     0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.6);

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     18px;
  --radius-xl:     24px;

  --sidebar-w:     260px;
  --topbar-h:      56px;
  --inputbar-h:    80px;

  --transition:    0.18s ease;
}

[data-theme="light"] {
  --bg-base:       #f5f5f8;
  --bg-surface:    #ffffff;
  --bg-elevated:   #ebebf2;
  --bg-hover:      #e4e4ef;
  --bg-active:     #dcdcea;
  --border:        #dcdce8;
  --border-light:  #c8c8d8;

  --text-primary:  #1a1a2e;
  --text-secondary:#5a5a78;
  --text-muted:    #9898b0;

  --accent:        #6b58f0;
  --accent-dim:    #d4cfff;
  --accent-glow:   rgba(107, 88, 240, 0.12);
  --accent-hover:  #5546d0;

  --user-bubble:   #ede9ff;
  --user-border:   #b8afff;
  --ai-bubble:     #ffffff;
  --ai-border:     #dcdce8;

  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.1);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.12);
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg-base);
  color: var(--text-primary);
  height: 100dvh;
  display: flex;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Buttons & Inputs ───────────────────────────────────────── */
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* Icon button */
.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Icon + text button */
.icon-text-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .82rem;
  width: 100%;
  transition: background var(--transition), color var(--transition);
}
.icon-text-btn:hover { background: var(--bg-hover); color: var(--danger); }
.icon-text-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  z-index: 200;
  position: relative;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1;
}

.sidebar-close { display: none; }

/* New Chat button */
.new-chat-btn {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-md);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .01em;
  transition: background var(--transition), transform 0.12s ease, box-shadow var(--transition);
  box-shadow: 0 2px 12px var(--accent-glow);
}
.new-chat-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.new-chat-btn:active { transform: translateY(0); }
.new-chat-btn svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }

/* Chat list */
.chat-list-label {
  padding: 8px 16px 4px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
  group: true;
}
.chat-item:hover { background: var(--bg-hover); }
.chat-item.active { background: var(--bg-active); }
.chat-item.active .chat-item-title { color: var(--text-primary); }

.chat-item-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}
.chat-item-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.chat-item-title {
  flex: 1;
  font-size: .84rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.chat-item-actions {
  display: none;
  gap: 2px;
  flex-shrink: 0;
}
.chat-item:hover .chat-item-actions,
.chat-item.active .chat-item-actions { display: flex; }

.chat-action-btn {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.chat-action-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.chat-action-btn.delete:hover { color: var(--danger); }
.chat-action-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.chat-list-empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--text-muted);
  font-size: .82rem;
}

/* Sidebar footer */
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 8px;
  flex-shrink: 0;
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 199;
  backdrop-filter: blur(2px);
}

/* ══════════════════════════════════════════════════════════════
   MAIN
   ══════════════════════════════════════════════════════════════ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  min-width: 0;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
  z-index: 10;
}

.hamburger { display: none; }

/* Model switcher */
.model-switcher-wrap { position: relative; }

.model-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .84rem;
  transition: background var(--transition), border-color var(--transition);
}
.model-btn:hover { background: var(--bg-hover); border-color: var(--border-light); }

.model-btn .chevron {
  width: 14px; height: 14px;
  fill: none; stroke: var(--text-muted); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--transition);
}
.model-btn.open .chevron { transform: rotate(180deg); }

.model-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 100;
  animation: dropIn 0.15s ease;
}
.model-dropdown.open { display: block; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.model-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  width: 100%;
  color: var(--text-secondary);
  font-size: .86rem;
  transition: background var(--transition), color var(--transition);
}
.model-option:hover { background: var(--bg-hover); color: var(--text-primary); }
.model-option.selected { color: var(--accent); background: var(--accent-glow); }

.model-badge {
  font-size: .68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-base);
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: .04em;
}

.topbar-actions { margin-left: auto; display: flex; gap: 4px; }

/* Theme toggle */
[data-theme="dark"]  .icon-sun  { display: none; }
[data-theme="dark"]  .icon-moon { display: block; }
[data-theme="light"] .icon-sun  { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ── Chat Window ────────────────────────────────────────────── */
.chat-window {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Welcome screen */
.welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  animation: fadeUp 0.5s ease;
}

.welcome-icon {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 20px;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.welcome-title {
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -.02em;
}

.welcome-sub {
  color: var(--text-secondary);
  font-size: .95rem;
  margin-bottom: 32px;
  max-width: 380px;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 560px;
}

.suggestion-chip {
  padding: 10px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text-secondary);
  font-size: .83rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform 0.12s ease;
}
.suggestion-chip:hover {
  background: var(--bg-hover);
  border-color: var(--accent-dim);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Messages */
.messages {
  padding: 24px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Message row */
.msg-row {
  display: flex;
  padding: 6px 20px;
  gap: 14px;
  animation: fadeUp 0.25s ease;
  position: relative;
}
.msg-row:hover .msg-actions { opacity: 1; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* Avatar */
.msg-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.msg-row.user   .msg-avatar { background: var(--accent); color: #fff; }
.msg-row.ai     .msg-avatar { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--accent); font-size: 1rem; }

/* Bubble */
.msg-content { max-width: 72%; display: flex; flex-direction: column; gap: 4px; }

.msg-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: .72rem;
  color: var(--text-muted);
  padding: 0 4px;
}
.msg-row.user .msg-meta { flex-direction: row-reverse; }

.msg-name { font-weight: 600; color: var(--text-secondary); }

.msg-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: .9rem;
  line-height: 1.65;
  word-break: break-word;
}
.msg-row.user .msg-bubble {
  background: var(--user-bubble);
  border: 1px solid var(--user-border);
  border-radius: var(--radius-lg) var(--radius-sm) var(--radius-lg) var(--radius-lg);
  color: var(--text-primary);
}
.msg-row.ai .msg-bubble {
  background: var(--ai-bubble);
  border: 1px solid var(--ai-border);
  border-radius: var(--radius-sm) var(--radius-lg) var(--radius-lg) var(--radius-lg);
}

/* Markdown inside AI bubble */
.msg-bubble h1,.msg-bubble h2,.msg-bubble h3 {
  font-family: var(--font-head);
  margin: 1em 0 .4em;
  font-weight: 700;
  color: var(--text-primary);
}
.msg-bubble h1 { font-size: 1.2em; }
.msg-bubble h2 { font-size: 1.05em; }
.msg-bubble h3 { font-size: .95em; }
.msg-bubble p  { margin: .5em 0; }
.msg-bubble ul,.msg-bubble ol { padding-left: 20px; margin: .5em 0; }
.msg-bubble li { margin: .3em 0; }
.msg-bubble a  { color: var(--accent); text-decoration: none; }
.msg-bubble a:hover { text-decoration: underline; }
.msg-bubble strong { font-weight: 600; color: var(--text-primary); }
.msg-bubble em { font-style: italic; color: var(--text-secondary); }
.msg-bubble blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 12px;
  margin: .6em 0;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.msg-bubble hr { border: none; border-top: 1px solid var(--border); margin: 1em 0; }

/* Inline code */
.msg-bubble :not(pre) > code {
  font-family: var(--font-mono);
  font-size: .82em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-hover);
}

/* Code blocks */
.msg-bubble pre {
  background: #0e0e14;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: .8em 0;
  overflow: hidden;
}
[data-theme="light"] .msg-bubble pre { background: #1e1e2e; }

.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid var(--border);
}
.code-lang {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: lowercase;
}
.copy-code-btn {
  display: flex; align-items: center; gap: 5px;
  font-size: .74rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.copy-code-btn:hover { color: var(--text-primary); }
.copy-code-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.msg-bubble pre code {
  display: block;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: .82em;
  line-height: 1.7;
  overflow-x: auto;
  background: transparent !important;
}

/* Message actions */
.msg-actions {
  display: flex; gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
  padding: 0 4px;
}
.msg-action-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: .72rem;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.msg-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.msg-action-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* Typing indicator */
.typing-indicator .msg-bubble {
  display: flex; align-items: center; gap: 5px;
  padding: 14px 18px;
}
.dot {
  width: 7px; height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: bounce 1.2s ease-in-out infinite;
}
.dot:nth-child(2) { animation-delay: .2s; }
.dot:nth-child(3) { animation-delay: .4s; }
@keyframes bounce {
  0%,80%,100% { transform: translateY(0); opacity: .5; }
  40%          { transform: translateY(-6px); opacity: 1; }
}

/* Error bubble */
.error-bubble {
  background: var(--danger-dim) !important;
  border-color: rgba(255,79,79,.3) !important;
  color: #ff8080 !important;
}

/* ── Input Bar ──────────────────────────────────────────────── */
.input-bar-wrap {
  padding: 12px 20px 14px;
  background: var(--bg-base);
  flex-shrink: 0;
}

.input-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 8px 10px 8px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-bar:focus-within {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.voice-btn { color: var(--text-muted); }
.voice-btn.recording { color: var(--danger); animation: recordPulse 1s ease infinite; }
@keyframes recordPulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

.message-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: .92rem;
  line-height: 1.5;
  resize: none;
  max-height: 200px;
  min-height: 24px;
  padding: 4px 0;
}
.message-input::placeholder { color: var(--text-muted); }

.send-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  transition: background var(--transition), transform 0.12s ease, opacity var(--transition);
  flex-shrink: 0;
  opacity: .45;
}
.send-btn:not(:disabled) { opacity: 1; }
.send-btn:not(:disabled):hover { background: var(--accent-hover); transform: scale(1.08); }
.send-btn:not(:disabled):active { transform: scale(.96); }
.send-btn svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.input-disclaimer {
  text-align: center;
  font-size: .71rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ── Toast ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius-xl);
  font-size: .85rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Modals ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: min(360px, 90vw);
  box-shadow: var(--shadow-lg);
  transform: scale(.95);
  transition: transform 0.2s ease;
}
.modal-overlay.open .modal { transform: scale(1); }

.modal-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.modal-text {
  color: var(--text-secondary);
  font-size: .88rem;
  margin-bottom: 20px;
}

.modal-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: .9rem;
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}
.modal-input:focus { border-color: var(--accent-dim); }

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.modal-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: .86rem;
  font-weight: 600;
  transition: background var(--transition), transform 0.1s ease;
}
.modal-btn:active { transform: scale(.97); }
.modal-btn.cancel  { background: var(--bg-hover); color: var(--text-secondary); }
.modal-btn.cancel:hover  { background: var(--bg-active); color: var(--text-primary); }
.modal-btn.confirm { background: var(--accent); color: #fff; }
.modal-btn.confirm:hover { background: var(--accent-hover); }
.modal-btn.danger  { background: var(--danger); color: #fff; }
.modal-btn.danger:hover  { background: #e03f3f; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE – Mobile
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .sidebar-close { display: flex; }
  .hamburger { display: flex; }

  .topbar { gap: 6px; }
  .model-btn { padding: 5px 10px; font-size: .8rem; }

  .msg-row { padding: 6px 12px; }
  .msg-content { max-width: 88%; }
  .msg-avatar { width: 28px; height: 28px; font-size: .75rem; }

  .welcome-title { font-size: 1.5rem; }
  .suggestions { flex-direction: column; align-items: stretch; }
  .suggestion-chip { text-align: left; }

  .input-bar-wrap { padding: 10px 12px 12px; }
  .messages { padding: 16px 0 10px; }
}

@media (max-width: 420px) {
  .model-label { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions .icon-btn:not(#themeToggle) { display: none; }
}

/* ── Utility ────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* hljs override */
.hljs { background: transparent !important; padding: 0 !important; }
