/* ============================================================
   Siri AI — ChatGPT-style UI
   Inter font, dark theme, sidebar left, bubbles left/right
============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base:       #0a0a0f;
  --bg-sidebar:    #111118;
  --bg-card:       #16161f;
  --bg-hover:      #1e1e2a;
  --bg-user:       #2563eb;
  --bg-siri:       #1a1a26;
  --border:        rgba(255,255,255,0.07);
  --text-primary:  #f0f0f6;
  --text-muted:    #8b8b9e;
  --text-dim:      #55556a;
  --accent:        #6366f1;
  --accent-glow:   rgba(99,102,241,0.25);
  --danger:        #ef4444;
  --success:       #22c55e;
  --font:          'Inter', system-ui, -apple-system, sans-serif;
  --sidebar-w:     260px;
  --topbar-h:      52px;
  --radius-msg:    18px;
  --radius-ui:     10px;
}

html, body { height: 100%; overflow: hidden; background: var(--bg-base); color: var(--text-primary); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }

/* ═══════ LAYOUT ═══════ */
.layout { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

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

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

.brand { display: flex; align-items: center; gap: 9px; }

.brand-orb {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  box-shadow: 0 0 12px var(--accent-glow);
  flex: none;
  animation: orbPulse 3s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% { box-shadow: 0 0 12px var(--accent-glow); }
  50%       { box-shadow: 0 0 22px rgba(99,102,241,.5); }
}

.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.3px; }

.brand-badge {
  font-size: 10px; font-weight: 600;
  background: rgba(99,102,241,.18); color: #a5b4fc;
  border: 1px solid rgba(99,102,241,.3);
  padding: 2px 7px; border-radius: 20px; letter-spacing: .3px;
}

.btn-new {
  width: 32px; height: 32px; border-radius: var(--radius-ui);
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-new:hover { background: var(--bg-hover); color: var(--text-primary); border-color: rgba(255,255,255,.15); }

/* Sidebar search */
.sidebar-search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  flex: none;
}
.sidebar-search svg { color: var(--text-dim); flex: none; }
.sidebar-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-primary); font-family: var(--font); font-size: 13px;
}
.sidebar-search input::placeholder { color: var(--text-dim); }

/* Chat list */
.chat-list {
  flex: 1; overflow-y: auto; padding: 8px 6px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}

.chat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-ui);
  cursor: pointer; transition: background .12s;
  color: var(--text-muted); font-size: 13px;
  border: 1px solid transparent;
}
.chat-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.chat-item.active { background: var(--bg-hover); color: var(--text-primary); border-color: rgba(99,102,241,.25); }
.chat-item-icon { font-size: 15px; flex: none; }
.chat-item-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-del {
  opacity: 0; width: 20px; height: 20px; border-radius: 6px;
  background: transparent; border: none; color: var(--text-dim);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all .15s; flex: none;
}
.chat-item:hover .chat-item-del { opacity: 1; }
.chat-item-del:hover { background: rgba(239,68,68,.15); color: var(--danger); }

.chat-list-label {
  padding: 12px 10px 4px;
  font-size: 11px; font-weight: 600;
  color: var(--text-dim); letter-spacing: .5px; text-transform: uppercase;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex: none;
}
.sidebar-link { font-size: 12px; color: var(--text-dim); text-decoration: none; transition: color .15s; }
.sidebar-link:hover { color: var(--text-muted); }
.build-tag { font-size: 11px; color: var(--text-dim); }

/* Character picker */
.char-section {
  padding: 10px 10px 12px;
  border-top: 1px solid var(--border);
  flex: none;
}
.char-label {
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  letter-spacing: .5px; text-transform: uppercase;
  padding: 0 2px 8px;
}
.char-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.char-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 8px 6px;
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: all .15s;
  color: var(--text-muted); font-family: var(--font);
}
.char-btn:hover { background: var(--bg-hover); border-color: rgba(255,255,255,.15); color: var(--text-primary); }
.char-btn.active { border-color: var(--accent); background: rgba(99,102,241,.12); color: var(--text-primary); }
.char-btn .char-emoji { font-size: 20px; line-height: 1; }
.char-btn .char-name  { font-size: 11px; font-weight: 600; text-align: center; }
.char-btn .char-hint  { font-size: 10px; color: var(--text-dim); text-align: center; line-height: 1.3; }
.char-btn.active .char-hint { color: #a5b4fc; }

/* Model picker */
.model-list { display: flex; flex-direction: column; gap: 4px; }
.model-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; transition: all .15s;
  color: var(--text-muted); font-family: var(--font); font-size: 12px; font-weight: 500;
  text-align: left; width: 100%;
}
.model-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: rgba(255,255,255,.15); }
.model-btn.active { border-color: var(--accent); background: rgba(99,102,241,.12); color: var(--text-primary); }
.model-btn .model-tag {
  font-size: 10px; padding: 1px 6px; border-radius: 10px;
  background: rgba(99,102,241,.15); color: #a5b4fc; font-weight: 600;
}
.model-btn.active .model-tag { background: var(--accent); color: #fff; }

/* ═══════ MAIN ═══════ */
.main {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  height: 100vh; background: var(--bg-base); position: relative;
}

/* ═══════ TOPBAR ═══════ */
.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,.85); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-weight: 600; font-size: 15px; }
.topbar-right { display: flex; align-items: center; gap: 4px; }

/* Auth Button */
.btn-auth {
  display: flex; align-items: center; gap: 6px;
  background: rgba(99,102,241,0.15); color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.3); padding: 5px 12px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.btn-auth:hover { background: rgba(99,102,241,0.25); color: #fff; }

/* Auth Modal */
.auth-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px); display: flex; align-items: center;
  justify-content: center; z-index: 1000; padding: 20px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.auth-modal-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; width: 100%; max-width: 400px; padding: 28px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6); position: relative;
  display: flex; flex-direction: column; gap: 14px;
}
.auth-modal-close {
  position: absolute; top: 16px; right: 16px; background: transparent;
  border: none; color: var(--text-dim); font-size: 18px; cursor: pointer;
  padding: 4px; border-radius: 6px; transition: color .15s;
}
.auth-modal-close:hover { color: var(--text-primary); }

.auth-modal-logo {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  box-shadow: 0 0 20px var(--accent-glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 4px;
}
.auth-modal-card h2 { text-align: center; font-size: 19px; font-weight: 700; }

.auth-tabs { display: flex; gap: 4px; background: var(--bg-base); padding: 4px; border-radius: 12px; margin-bottom: 2px; }
.auth-tab { flex: 1; background: transparent; border: none; color: var(--text-dim); padding: 8px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; text-align: center; }
.auth-tab.active { background: var(--bg-hover); color: var(--text-primary); }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.auth-field input {
  width: 100%; background: var(--bg-base); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px; color: var(--text-primary);
  font-size: 14px; outline: none; font-family: var(--font);
}
.auth-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }

.otp-box {
  background: rgba(99,102,241,0.12); border: 1px dashed rgba(99,102,241,0.4);
  padding: 12px; border-radius: 12px; text-align: center; font-size: 13px; color: #a5b4fc;
}
.otp-dev-hint {
  margin-top: 8px; padding: 8px; background: rgba(99,102,241,0.25);
  border-radius: 8px; font-weight: 700; color: #fff; cursor: pointer;
  transition: background .15s;
}
.otp-dev-hint:hover { background: var(--accent); }
.otp-input { letter-spacing: 8px; font-size: 22px!important; text-align: center; font-weight: 700; color: #a5b4fc!important; }

.btn-auth-submit {
  background: var(--accent); border: none; color: #fff; font-weight: 600;
  font-size: 14.5px; padding: 12px; border-radius: 12px; cursor: pointer;
  transition: all .15s; margin-top: 4px; box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-auth-submit:hover { background: #4f52e0; transform: translateY(-1px); }
.btn-auth-resend {
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  font-size: 12px; padding: 9px; border-radius: 10px; cursor: pointer; transition: all .15s;
}
.btn-auth-resend:hover { background: var(--bg-hover); color: var(--text-primary); }

.auth-error { color: var(--danger); font-size: 12px; text-align: center; }

.btn-icon {
  width: 36px; height: 36px; border-radius: var(--radius-ui);
  background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s; position: relative;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-icon[aria-pressed="true"] { color: var(--accent); }

.talk-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-dim); border: 1.5px solid var(--bg-base);
  transition: background .2s;
}
.btn-icon[aria-pressed="true"] .talk-dot { background: var(--success); }

/* ═══════ VOICE PANEL ═══════ */
.voice-panel {
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 14px 20px; flex: none;
}
.voice-panel-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; max-width: 700px; }
.vp-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.vp-row select, .vp-row input[type=range] { accent-color: var(--accent); background: var(--bg-base); border: 1px solid var(--border); color: var(--text-primary); border-radius: 6px; padding: 4px 8px; font-size: 12px; }
.vp-row output { font-size: 12px; color: var(--text-dim); min-width: 32px; }
.vp-actions { display: flex; gap: 8px; }
.btn-chip {
  background: var(--bg-hover); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; padding: 5px 12px;
  border-radius: 20px; cursor: pointer; transition: all .15s;
}
.btn-chip:hover { border-color: var(--accent); color: var(--accent); }

/* ═══════ MESSAGES ═══════ */
.messages {
  flex: 1; overflow-y: auto; padding: 24px 0;
  display: flex; flex-direction: column;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}

/* ── Welcome screen ── */
.welcome {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; padding: 40px 20px; text-align: center;
}
.welcome-orb {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #818cf8, #c084fc);
  box-shadow: 0 0 40px var(--accent-glow);
  animation: orbPulse 3s ease-in-out infinite;
}
.welcome h1 { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.welcome p { font-size: 15px; color: var(--text-muted); max-width: 380px; }

/* Welcome chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.chip {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px; padding: 7px 14px;
  border-radius: 20px; cursor: pointer; transition: all .15s;
  font-family: var(--font);
}
.chip:hover { border-color: var(--accent); color: var(--text-primary); background: var(--bg-hover); }

/* ── Message rows ── */
.msg-row {
  display: flex; padding: 4px 20px;
  animation: msgIn .2s ease;
  max-width: 100%;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.msg-row.user { justify-content: flex-end; }
.msg-row.siri { justify-content: flex-start; }

.msg-wrap { display: flex; flex-direction: column; max-width: min(72%, 680px); gap: 4px; }
.msg-row.user .msg-wrap { align-items: flex-end; }
.msg-row.siri .msg-wrap { align-items: flex-start; }

/* Avatar */
.msg-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; margin-top: 4px;
}
.msg-row.siri { gap: 10px; }
.msg-row.user { gap: 10px; }

.avatar-siri {
  background: linear-gradient(135deg, var(--accent), #818cf8);
  box-shadow: 0 0 8px var(--accent-glow);
  font-size: 13px; color: white; font-weight: 700;
}
.avatar-user {
  background: var(--bg-user);
  font-size: 13px; color: white; font-weight: 700;
}

/* Attachment Bar & Buttons */
.attach-preview-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 12px 12px 0 0; margin-bottom: -1px;
}
.attach-preview-bar[hidden] { display: none !important; }
.attach-thumb { max-width: 40px; max-height: 40px; border-radius: 6px; overflow: hidden; display: flex; }
.attach-thumb img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.attach-name { font-size: 12px; color: var(--text-primary); font-weight: 500; }
.btn-attach-remove { background: transparent; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; }
.btn-attach-remove:hover { color: var(--danger); }

.btn-attach {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 18px; cursor: pointer; padding: 6px 8px; border-radius: 8px;
  transition: all .15s; flex: none;
}
.btn-attach:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Code Blocks & Scripts */
.code-block-wrap {
  margin: 10px 0; background: #0f0f16; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; font-family: monospace;
}
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.05); padding: 6px 12px; border-bottom: 1px solid var(--border);
  font-size: 11px; color: var(--text-dim); font-weight: 600;
}
.code-actions { display: flex; gap: 6px; }
.btn-code-action {
  background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.3);
  color: #c7d2fe; padding: 3px 8px; border-radius: 6px; font-size: 11px;
  cursor: pointer; transition: all .15s; font-family: var(--font);
}
.btn-code-action:hover { background: var(--accent); color: #fff; }
.code-body {
  padding: 12px; margin: 0; overflow-x: auto; font-size: 13px;
  line-height: 1.5; color: #e2e8f0; white-space: pre-wrap;
}

/* User Uploaded Images/Files in Chat */
.chat-file-attachment {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08); padding: 8px 12px;
  border-radius: 10px; margin-bottom: 6px; text-decoration: none; color: #fff;
  font-size: 13px; font-weight: 500; border: 1px solid rgba(255,255,255,0.1);
}
.chat-image-preview {
  max-width: 280px; max-height: 200px; border-radius: 12px;
  margin-bottom: 6px; cursor: pointer; border: 1px solid var(--border);
  transition: transform .15s;
}
.chat-image-preview:hover { transform: scale(1.02); }

/* Generated AI Images & Videos */
.generated-media-card {
  margin-top: 8px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; max-width: 420px; display: flex;
  flex-direction: column; gap: 8px; padding: 10px; box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}
.gen-image-item, .gen-video-item {
  width: 100%; height: auto; border-radius: 10px; display: block;
  object-fit: cover; border: 1px solid rgba(255,255,255,0.1);
}
.gen-media-actions { display: flex; gap: 8px; justify-content: flex-end; }
.btn-gen-action {
  background: linear-gradient(135deg, var(--accent), #818cf8);
  color: #fff; text-decoration: none; font-size: 12px; font-weight: 600;
  padding: 8px 14px; border-radius: 20px; transition: all .15s;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.btn-gen-action:hover { opacity: 0.9; transform: translateY(-1px); }

/* Live Code Preview & Virtual Console Modal */
.code-preview-card {
  width: min(92%, 850px) !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 20px !important;
}
.code-preview-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 12px;
}
.code-preview-content {
  flex: 1; min-height: 380px; display: flex; flex-direction: column; overflow: hidden;
  background: #0d0d14; border-radius: 12px; border: 1px solid var(--border);
}
.preview-iframe {
  width: 100%; height: 420px; border: none; background: #ffffff; border-radius: 12px;
}
.virtual-console-box {
  background: #09090e; color: #4ade80; font-family: 'Courier New', Courier, monospace;
  padding: 16px; height: 380px; overflow-y: auto; font-size: 13.5px; line-height: 1.6;
  border-radius: 12px; white-space: pre-wrap; word-break: break-word;
}
.virtual-console-line { margin-bottom: 4px; }
.virtual-console-line.err { color: #f87171; }
.virtual-console-line.info { color: #60a5fa; }

/* Bubble */
.bubble {
  padding: 10px 15px;
  border-radius: var(--radius-msg);
  font-size: 14.5px; line-height: 1.6;
  word-break: break-word;
}
.msg-row.user .bubble {
  background: var(--bg-user);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 12px rgba(37,99,235,.3);
}
.msg-row.siri .bubble {
  background: var(--bg-siri);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg-row.siri .bubble a { color: #818cf8; }

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

/* Time & meta */
.msg-meta { font-size: 11px; color: var(--text-dim); padding: 0 2px; display: flex; gap: 8px; align-items: center; }

/* Sources */
.sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.source-chip {
  font-size: 11px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 3px 8px; text-decoration: none; transition: all .15s;
}
.source-chip:hover { border-color: var(--accent); color: var(--accent); }

/* ═══════ COMPOSER ═══════ */
.composer-wrap {
  flex: none; padding: 12px 20px 16px;
  background: var(--bg-base);
  border-top: 1px solid var(--border);
}

.composer {
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 8px 8px 8px 14px;
  transition: border-color .2s, box-shadow .2s;
  max-width: 800px; margin: 0 auto;
}
.composer:focus-within {
  border-color: rgba(99,102,241,.5);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.composer-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-primary); font-family: var(--font); font-size: 14.5px;
  line-height: 1.5; resize: none; max-height: 200px;
  overflow-y: auto; padding: 4px 0;
}
.composer-input::placeholder { color: var(--text-dim); }

.btn-mic {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-mic:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-mic.active { background: rgba(239,68,68,.15); border-color: var(--danger); color: var(--danger); animation: micPulse 1s ease infinite; }
@keyframes micPulse { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 0 4px rgba(239,68,68,.15); } }

.btn-send {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: var(--accent); border: none;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-send:hover { background: #4f52e0; transform: translateY(-1px); }
.btn-send:disabled { background: var(--bg-hover); color: var(--text-dim); box-shadow: none; cursor: default; transform: none; }

/* ── Quick settings bar (char + model) ── */
.quick-bar {
  display: flex; flex-direction: column; gap: 5px;
  max-width: 800px; margin: 8px auto 0;
}

.quick-group {
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; padding: 1px 0;
  scrollbar-width: none;
}
.quick-group::-webkit-scrollbar { display: none; }

.quick-label { font-size: 13px; flex-shrink: 0; }

.quick-pills { display: flex; gap: 4px; flex-wrap: nowrap; }

.quick-pill {
  padding: 4px 10px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-dim); font-family: var(--font);
  font-size: 12px; font-weight: 500; cursor: pointer;
  white-space: nowrap; transition: all .15s; flex-shrink: 0;
}
.quick-pill:hover { background: var(--bg-hover); color: var(--text-primary); border-color: rgba(255,255,255,.15); }
.quick-pill.active {
  background: rgba(99,102,241,.18); border-color: var(--accent);
  color: #c7d2fe; font-weight: 600;
}

.quick-sep { display: none; }

.composer-footnote { font-size: 11.5px; color: var(--text-dim); text-align: center; margin-top: 8px; max-width: 800px; margin-left: auto; margin-right: auto; }



/* ═══════ SIDEBAR OVERLAY (mobile) ═══════ */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6); z-index: 90;
  backdrop-filter: blur(2px);
}

/* ═══════ SCROLLBAR ═══════ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* ═══════ MOBILE ═══════ */
@media (max-width: 700px) {
  :root { --sidebar-w: 80vw; }

  .sidebar {
    position: fixed; left: 0; top: 0; height: 100vh;
    transform: translateX(-100%);
    box-shadow: 4px 0 30px rgba(0,0,0,.5);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open { display: block; }

  .main { width: 100vw; }

  .composer-wrap { padding: 8px 12px 20px; }
  .msg-row { padding: 3px 12px; }
  .msg-wrap { max-width: 88%; }
  .bubble { font-size: 14px; padding: 9px 13px; }
}

/* ═══════ DESKTOP — sidebar always visible ═══════ */
@media (min-width: 701px) {
  #sidebarToggle { display: none; }
}
