/* ─────────────────────────────────────────────────────────
   Prism — Minimal Agentic UI
   Inspired by Claude Code / Codex / Antigravity 2.0
   ───────────────────────────────────────────────────────── */

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

:root {
  --bg:          #f4f4f7;
  --bg-1:        #ffffff;
  --bg-2:        #fafafc;
  --bg-3:        #f0f0f5;
  --border:      #e2e2e9;
  --border-soft: #f0f0f4;
  --text:        #1e1e24;
  --text-2:      #5a5a66;
  --text-3:      #8a8a99;
  --muted:       #9a9aac;
  --accent:      #6366f1;
  --accent-glow: rgba(99,102,241,0.08);
  --accent-dim:  rgba(99,102,241,0.04);
  --green:       #059669;
  --blue:        #2563eb;
  --red:         #dc2626;
  --amber:       #d97706;
  --font:        'Inter', system-ui, sans-serif;
  --mono:        'JetBrains Mono', monospace;
  --radius:      8px;
  --radius-sm:   5px;
  --sidebar-w:   220px;
  --transition:  0.15s ease;
}

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

/* ── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── AUTH ───────────────────────────────────────────────── */
#auth-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  z-index: 1000;
  animation: fadeIn 0.4s ease;
}
.auth-box {
  width: 340px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.prism-mark { width: 44px; height: 44px; margin-bottom: 4px; }
.prism-mark svg { width: 100%; height: 100%; }
.auth-box h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }
.auth-box p { color: var(--text-2); font-size: 13px; margin-bottom: 8px; }
.auth-error { color: var(--red); font-size: 12px; text-align: center; }
.auth-box input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color var(--transition);
}
.auth-box input:focus { border-color: var(--accent); }
.auth-box button {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 10px;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity var(--transition);
}
.auth-box button:hover { opacity: 0.88; }

/* ── APP SHELL ──────────────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  width: 100vw;
}
#app.hidden, #auth-screen.hidden { display: none; }

/* ── SIDEBAR ────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-1);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 2px;
  overflow: hidden;
}
.sidebar-top { padding: 4px 4px 14px; }
#waffle-btn:hover { background: var(--bg-3) !important; color: var(--text) !important; }
.wordmark { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; letter-spacing: -0.2px; }
.wordmark svg { flex-shrink: 0; }

.section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 6px;
  margin-bottom: 4px;
}

/* Agent list */
.agent-list { display: flex; flex-direction: column; gap: 2px; }
.agent-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition);
}
.agent-btn:hover { background: var(--bg-3); color: var(--text); }
.agent-btn.active { background: var(--accent-dim); color: var(--text); }
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c, #555);
  flex-shrink: 0;
}

/* Nav */
nav { display: flex; flex-direction: column; gap: 2px; }
.nav-btn {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 13px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition);
}
.nav-btn:hover { background: var(--bg-3); color: var(--text); }
.nav-btn.active { background: var(--bg-2); color: var(--text); }
.nav-btn svg { opacity: 0.7; flex-shrink: 0; }
.nav-btn.active svg { opacity: 1; }

.flex-grow { flex: 1; }

/* Sidebar footer */
.sidebar-footer { padding: 8px 4px 0; border-top: 1px solid var(--border-soft); }
.status-row { display: flex; align-items: center; gap: 7px; padding: 2px 0; }
.status-pip {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.status-pip.online { background: var(--green); }
.status-pip.warn { background: var(--amber); }
.status-text { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signout-btn {
  margin-top: 10px;
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 12px;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.signout-btn:hover { border-color: var(--red); color: var(--red); }

/* ── MAIN ───────────────────────────────────────────────── */
#main { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; }

/* XO Launcher App Switcher */
.xo-launcher {
  position: absolute;
  top: 16px;
  right: 24px;
  z-index: 9999;
}
.xo-icon {
  width: 22px;
  height: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5px;
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0.8;
}
.xo-icon:hover {
  background: var(--bg-3);
  opacity: 1;
}
.xo-icon-cell {
  background: var(--text-2);
  border-radius: 1px;
  transition: all 0.2s;
}
.xo-icon:hover .xo-icon-cell {
  background: var(--accent);
}
.xo-popover {
  display: none;
  position: absolute;
  top: 32px;
  right: 0;
  width: 280px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  z-index: 99999;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 0 20px rgba(99,102,241,0.05);
  text-align: left;
}
.xo-popover.open {
  display: block;
  animation: xo-in 0.18s cubic-bezier(0.16,1,0.3,1);
}
@keyframes xo-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.xo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.xo-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text-2);
}
.xo-cell:hover {
  background: var(--bg-3);
  border-color: var(--border);
  color: var(--text);
}
.xo-cell.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.xo-cell.active:hover {
  background: var(--accent-glow);
  transform: scale(1.04);
}
.xo-cell-icon {
  font-size: 20px;
  line-height: 1;
}
.xo-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.xo-header {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

/* ── VIEWS ──────────────────────────────────────────────── */
.view { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.view.active { display: flex; }

/* View header (Log / Memory) */
.view-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.view-heading { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.view-desc { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.top-btn {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.top-btn:hover { color: var(--text); border-color: var(--accent); }

/* Empty state */
.empty-state {
  flex: 1; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  color: var(--muted);
  padding: 40px;
}
.empty-state p { font-size: 13px; }
.empty-icon {
  width: 52px; height: 52px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}

/* ── CHAT ───────────────────────────────────────────────── */
#view-chat { overflow: hidden; }
.chat-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  scroll-behavior: smooth;
}

/* Welcome */
#chat-welcome { animation: fadeIn 0.3s ease; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.suggestion-chip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.suggestion-chip:hover { border-color: var(--accent); color: var(--text); }

/* Messages */
.msg {
  display: flex;
  gap: 12px;
  padding: 6px 24px;
  max-width: 80%;
  width: auto;
  margin: 4px 0;
  animation: fadeUp 0.2s ease;
}
.msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
  margin-right: 24px;
}
.msg.assistant {
  align-self: flex-start;
  flex-direction: row;
  margin-left: 24px;
}
.msg-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  flex-shrink: 0;
  margin-top: 4px;
}
.msg.user .msg-avatar { background: var(--accent); color: #fff; }
.msg.assistant .msg-avatar { background: var(--bg-3); color: var(--text-2); border: 1px solid rgba(255, 255, 255, 0.08); }
.msg-body { display: flex; flex-direction: column; max-width: calc(100% - 40px); }
.msg.user .msg-body { align-items: flex-end; }
.msg.assistant .msg-body { align-items: flex-start; }
.msg-name { font-size: 10px; font-weight: 500; color: var(--text-3); margin-bottom: 2px; margin-left: 4px; margin-right: 4px; }
.msg-text {
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 1.5px 3px rgba(0,0,0,0.08);
}
.msg.user .msg-text {
  background: var(--accent-glow);
  border-top-right-radius: 2px;
  border: 1px solid rgba(139, 92, 246, 0.15);
}
.msg.assistant .msg-text {
  background: rgba(255, 255, 255, 0.04);
  border-top-left-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.msg-text strong { font-weight: 600; color: var(--text); }
.msg-text code { font-family: var(--mono); font-size: 12px; background: var(--bg-3); padding: 1px 5px; border-radius: 3px; color: var(--accent); }
.msg-time { font-size: 9px; color: var(--muted); margin-top: 3px; margin-left: 4px; margin-right: 4px; }

/* Thinking pulse */
.thinking-dot {
  display: inline-flex; gap: 4px; align-items: center; padding: 4px 0;
}
.thinking-dot span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); opacity: 0.3;
  animation: pulse 1.2s ease-in-out infinite;
}
.thinking-dot span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dot span:nth-child(3) { animation-delay: 0.4s; }

/* Transaction card */
.tx-card {
  margin-top: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
}
.tx-card-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tx-card-row:last-child { margin-bottom: 0; }
.tx-label { color: var(--text-2); font-size: 11px; }
.tx-value { font-family: var(--mono); font-size: 12px; }
.tx-amount { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--green); }
.tx-actions { display: flex; gap: 8px; margin-top: 12px; }
.tx-btn {
  flex: 1;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 12px;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.tx-btn:hover { border-color: var(--accent); color: var(--text); }
.tx-btn.approve:hover { border-color: var(--green); color: var(--green); }
.tx-btn.flag:hover { border-color: var(--red); color: var(--red); }

/* Risk badge */
.risk-badge {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 3px;
  font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.risk-low { background: rgba(16,185,129,0.12); color: var(--green); }
.risk-medium { background: rgba(245,158,11,0.12); color: var(--amber); }
.risk-high { background: rgba(244,63,94,0.12); color: var(--red); }

/* Insights */
.insights { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.insight-item { font-size: 12px; color: var(--text-2); padding: 4px 0; border-top: 1px solid var(--border-soft); }

/* Feedback */
.feedback-row { display: flex; gap: 6px; margin-top: 10px; }
.fb-btn {
  background: none; border: none;
  color: var(--muted); font-size: 16px; cursor: pointer;
  padding: 2px 4px; border-radius: 3px;
  transition: color var(--transition);
}
.fb-btn:hover { color: var(--text-2); }
.fb-btn.active { color: var(--accent); }

/* Chat footer */
.chat-footer {
  padding: 12px 24px 16px;
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.input-shell {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  transition: border-color var(--transition);
  max-width: 820px;
  margin: 0 auto;
}
.input-shell:focus-within { border-color: var(--accent); }
.input-shell.recording { border-color: var(--red); animation: borderPulse 1s ease infinite; }

#chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  max-height: 200px;
  overflow-y: auto;
}
#chat-input::placeholder { color: var(--muted); }

.icon-btn {
  background: none; border: none;
  color: var(--text-2); cursor: pointer;
  padding: 4px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--transition);
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); }
.icon-btn.active { color: var(--red); }
.send-btn {
  background: var(--accent);
  border: none; cursor: pointer;
  color: #fff; border-radius: 5px;
  padding: 5px 8px;
  display: flex; align-items: center; justify-content: center;
  transition: opacity var(--transition);
  flex-shrink: 0;
}
.send-btn:disabled { opacity: 0.3; cursor: default; }
.send-btn:not(:disabled):hover { opacity: 0.85; }

.input-meta {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 820px; margin: 6px auto 0;
  padding: 0 2px;
}
.agent-label { font-size: 11px; font-weight: 500; }
.hint { font-size: 11px; color: var(--muted); }

/* ── ACTION LOG ─────────────────────────────────────────── */
#log-table {
  flex: 1; overflow-y: auto; padding: 16px 32px;
  display: flex; flex-direction: column; gap: 8px;
}
.log-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 16px;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px 16px;
  animation: fadeUp 0.15s ease;
  cursor: pointer;
  transition: border-color var(--transition);
}
.log-row:hover { border-color: var(--border); }
.log-type {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; font-family: var(--mono);
  padding: 2px 7px; border-radius: 3px;
  background: var(--bg-3);
}
.log-type.sale { background: rgba(16,185,129,0.1); color: var(--green); }
.log-type.refund { background: rgba(244,63,94,0.1); color: var(--red); }
.log-type.lead { background: rgba(124,108,252,0.12); color: var(--accent); }
.log-type.quote { background: rgba(245,158,11,0.1); color: var(--amber); }
.log-customer { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-amount { font-family: var(--mono); font-size: 13px; font-weight: 600; white-space: nowrap; }
.log-status { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; font-family: var(--mono); }
.log-status.approved { color: var(--green); }
.log-status.flagged { color: var(--red); }
.log-status.pending { color: var(--amber); }
.log-time { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ── MEMORY ─────────────────────────────────────────────── */
.memory-grid {
  flex: 1; overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 20px 32px;
  align-content: start;
}
.memory-card {
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  animation: fadeUp 0.15s ease;
}
.memory-key { font-family: var(--mono); font-size: 11px; color: var(--accent); margin-bottom: 6px; }
.memory-val { font-size: 13px; color: var(--text-2); line-height: 1.5; word-break: break-word; }
.memory-ns { font-size: 10px; color: var(--muted); margin-top: 8px; font-family: var(--mono); }

/* ── MODAL ──────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  animation: fadeIn 0.15s ease;
}
.overlay.hidden { display: none; }
.modal {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 520px; max-width: 94vw;
  max-height: 80vh;
  display: flex; flex-direction: column;
  animation: slideUp 0.2s ease;
  overflow: hidden;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  font-weight: 600; font-size: 14px;
}
.modal-head button {
  background: none; border: none; color: var(--text-2); cursor: pointer;
  padding: 2px; border-radius: 3px; display: flex;
  transition: color var(--transition);
}
.modal-head button:hover { color: var(--text); }
.modal-content { flex: 1; overflow-y: auto; padding: 20px; }
.modal-field { margin-bottom: 14px; }
.modal-field-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 3px; }
.modal-field-value { font-size: 13px; color: var(--text); }
.modal-foot {
  display: flex; gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--border-soft);
}
.mfoot-btn {
  flex: 1; padding: 8px;
  background: none; border: 1px solid var(--border);
  color: var(--text-2); font-family: var(--font); font-size: 13px;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--transition);
}
.mfoot-btn.approve:hover { border-color: var(--green); color: var(--green); }
.mfoot-btn.flag:hover { border-color: var(--red); color: var(--red); }

/* ── TOASTS ─────────────────────────────────────────────── */
#toasts {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 999;
}
.toast {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  animation: slideInRight 0.2s ease;
  max-width: 300px;
}
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }
.toast.warn { border-color: var(--amber); }

/* ── KEYFRAMES ──────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 80%, 100% { opacity: 0.2; transform: scale(0.85); } 40% { opacity: 1; transform: scale(1); } }
@keyframes borderPulse { 0%, 100% { border-color: var(--red); } 50% { border-color: rgba(244,63,94,0.3); } }

/* ── ADMIN PANEL DASHBOARD ───────────────────────────────── */
#view-admin {
  height: 100%;
  display: none;
  flex-direction: column;
}
#view-admin.active {
  display: flex;
}
.admin-tab-btn {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.admin-tab-btn:hover {
  border-color: var(--border);
  color: var(--text);
  background: var(--bg-3);
}
.admin-tab-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text);
}
.admin-content-shell {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}
.admin-tab-content {
  display: none;
  animation: fadeIn 0.2s ease;
}
.admin-tab-content.active {
  display: block;
}

/* Tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th, .admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.admin-table tbody tr {
  transition: background var(--transition);
}
.admin-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.015);
}
.admin-table tbody tr:last-child td {
  border-bottom: none;
}

/* Grids & Cards */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.agent-card {
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color var(--transition);
}
.agent-card:hover {
  border-color: var(--border);
}
.agent-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.agent-card-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.agent-card-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 14px;
}
.agent-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 11px;
  color: var(--text-2);
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
}

/* Billing Grid */
.billing-grid, .super-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.billing-card, .super-card {
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
}
.billing-card:hover, .super-card:hover {
  border-color: var(--border);
}
.plan-badge {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.plan-price {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--green);
  margin: 10px 0;
}
.plan-price .period {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 400;
}
.stat-row {
  margin-bottom: 14px;
}
.stat-row:last-child {
  margin-bottom: 0;
}
.stat-progress-bar {
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.stat-progress-bar .bar {
  height: 100%;
  border-radius: 3px;
}

/* Impersonator Buttons */
.impersonate-btn {
  font-family: var(--font);
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all var(--transition);
}
.impersonate-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-dim);
}

.hidden {
  display: none !important;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --sidebar-w: 180px; }
  .msg { padding: 8px 16px; }
  .chat-footer { padding: 10px 12px 12px; }
  .view-top { padding: 20px 16px 14px; }
  #log-table, .memory-grid { padding: 12px 16px; }
}
\n
/* ── Premium SSO & Sandbox Login Styles ────────────────── */
.login-card {
  width: 380px !important;
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 40px 32px !important;
  border-radius: 16px !important;
}
.sso-login-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #1d4ed8) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-family: var(--font);
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 12px !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.sso-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  filter: brightness(1.1);
}
.login-divider {
  width: 100%;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 0.1em;
  margin: 20px 0;
}
.login-divider span {
  background: #ffffff;
  padding: 0 12px;
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.token-input-shell input {
  border-radius: 8px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  padding: 10px 14px !important;
}
.token-input-shell input:focus {
  border-color: var(--accent) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}
.token-input-shell button {
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}
.sandbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
}
.sandbox-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.sandbox-pill:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
  transform: translateY(-1px);
}


/* ── Promotional Landing Page Styles ────────────────────── */
.landing-container {
  display: flex;
  width: 1040px;
  max-width: 90vw;
  height: 620px;
  max-height: 85vh;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes scaleIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.landing-hero {
  flex: 1.1;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.landing-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.landing-brand {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  text-transform: uppercase;
}
.hero-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 14px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
  margin-bottom: 28px;
}
.cta-group {
  display: flex;
  gap: 12px;
  width: 100%;
}
.token-toggle-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 13px;
  padding: 0 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.token-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.hidden-height {
  max-height: 0 !important;
  opacity: 0 !important;
  margin-top: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.visible-height {
  max-height: 50px !important;
  opacity: 1 !important;
  margin-top: 12px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.landing-preview {
  flex: 0.9;
  padding: 36px;
  background: rgba(250, 250, 252, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.promo-chat-container {
  flex: 1;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 20px;
}
.promo-chat-header {
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.015);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.window-dots {
  display: flex;
  gap: 6px;
}
.window-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}
.window-dots span:nth-child(1) { background: #ef4444; }
.window-dots span:nth-child(2) { background: #eab308; }
.window-dots span:nth-child(3) { background: #22c55e; }
.promo-chat-title {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--green);
  font-weight: 500;
}
.status-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0 { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.promo-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 12.5px;
}
.promo-msg {
  display: flex;
  gap: 10px;
  max-width: 85%;
  animation: slideInUp 0.3s ease;
}
.promo-msg.system {
  align-self: flex-start;
}
.promo-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.promo-msg-body {
  padding: 10px 14px;
  border-radius: 10px;
  line-height: 1.4;
}
.promo-msg.system .promo-msg-body {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-2);
}
.promo-msg.user .promo-msg-body {
  background: var(--accent);
  color: #fff;
}
@keyframes slideInUp {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.promo-chat-footer {
  padding: 12px;
  background: rgba(255, 255, 255, 0.01);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.promo-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.promo-chip {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--accent-dim);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.promo-chip:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.landing-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: 10px;
  padding: 12px 16px;
  transition: background 0.2s ease;
}
.feature-card:hover {
  background: rgba(255, 255, 255, 0.8);
}
.feature-icon {
  font-size: 18px;
  font-weight: bold;
}
.feature-meta h4 {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}
.feature-meta p {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-3);
}

@media (max-width: 900px) {
  .landing-container {
    flex-direction: column;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
  }
  .landing-hero {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
  }
  .landing-preview {
    padding: 30px;
  }
}


/* ── Premium Marketing Layout Styles ────────────────────── */
.marketing-layout {
  width: 1140px !important;
  height: 680px !important;
  max-width: 95vw !important;
  max-height: 90vh !important;
}
.spec-item {
  transition: all 0.2s ease-in-out;
}
.spec-item:hover {
  transform: translateY(-1px);
  border-color: var(--accent) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.03);
}
.version-pill {
  border: 1px solid var(--border);
}

/* ── RESPONSIVE: Half-screen / Split View Fix ─────────── */
@media (max-width: 1000px) {
  :root { --sidebar-w: 56px; }
  #sidebar {
    padding: 12px 6px;
    overflow-y: auto;
    overflow-x: hidden;
  }
  #sidebar .section-label,
  #sidebar .sidebar-top .wordmark span,
  #sidebar .status-text,
  #sidebar .user-meta span:not(.user-avatar),
  #sidebar #user-role-text { 
    display: none; 
  }
  #sidebar .wordmark { justify-content: center; }
  #sidebar .wordmark svg { width: 24px; height: 24px; }
  #sidebar .nav-btn,
  #sidebar .agent-btn { 
    justify-content: center; 
    padding: 10px 0;
    font-size: 0;
  }
  #sidebar .nav-btn svg,
  #sidebar .agent-btn svg,
  #sidebar .nav-btn .nav-icon,
  #sidebar .agent-btn .agent-pip { 
    font-size: 14px; 
    margin: 0;
  }
  #sidebar .sidebar-footer { 
    padding: 6px 0; 
    border-top: 1px solid var(--border-soft); 
  }
  #sidebar #signout-btn {
    justify-content: center;
    padding: 8px 0;
    font-size: 0;
  }
  #sidebar #signout-btn svg { font-size: 14px; }
  .sidebar-top { padding: 4px 0 10px; }
  #user-text { font-size: 0; }
  #user-text::first-letter { font-size: 13px; }
}

@media (max-width: 480px) {
  :root { --sidebar-w: 0px; }
  #sidebar { display: none; }
}

.global-skill-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.wa-info-tooltip-wrapper:hover .wa-info-tooltip {
  visibility: visible !important;
  opacity: 1 !important;
}

/* ── Collapsible Thoughts / System Trace ────────────────────── */
.prism-thoughts-wrapper {
  margin: 10px 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  font-size: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.prism-thoughts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-3);
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: var(--text-2);
  transition: background var(--transition);
}

.prism-thoughts-header:hover {
  background: var(--border-soft);
}

.prism-thoughts-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prism-thoughts-title-area i {
  color: var(--accent);
  font-size: 13px;
}

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

.prism-thoughts-status-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: rgba(16, 185, 129, 0.08);
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 5px;
}

.prism-thoughts-pulse {
  width: 6px;
  height: 6px;
  background-color: var(--green);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  animation: thoughts-pulse 1.6s infinite;
}

@keyframes thoughts-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.prism-thoughts-toggle-icon {
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.prism-thoughts-wrapper.expanded .prism-thoughts-toggle-icon {
  transform: rotate(180deg);
}

.prism-thoughts-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.3s ease;
  background: var(--bg-2);
  padding: 0 12px;
}

.prism-thoughts-wrapper.expanded .prism-thoughts-body {
  max-height: 600px;
  opacity: 1;
  padding: 12px;
}

.prism-thoughts-section {
  margin-bottom: 12px;
}

.prism-thoughts-section:last-child {
  margin-bottom: 0;
}

.prism-thoughts-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-bottom: 6px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prism-intent-badge {
  display: inline-block;
  font-family: var(--mono);
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  font-weight: 600;
}

.prism-entities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.prism-entity-chip {
  background: var(--bg-3);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  transition: border-color var(--transition);
}

.prism-entity-chip:hover {
  border-color: var(--border);
}

.prism-entity-chip i {
  color: var(--text-3);
  font-size: 10px;
  width: 12px;
  text-align: center;
}

.prism-entity-meta-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.prism-entity-label {
  color: var(--text-3);
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.prism-entity-value {
  font-family: var(--mono);
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prism-orchestration-text {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  background: var(--bg-1);
  color: var(--text-2);
  padding: 10px 12px;
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
}

/* Trace Highlighting (Low-Contrast, Highly Legible Light Aesthetics) */
.trace-info { color: #0284c7; font-weight: 600; }
.trace-success { color: var(--green); font-weight: 600; }
.trace-warning { color: var(--amber); font-weight: 600; }
.trace-error { color: var(--red); font-weight: 600; }
.trace-crm { color: #7c3aed; font-weight: 600; }
.trace-llm { color: #db2777; font-weight: 600; }
.trace-whatsapp { color: #047857; font-weight: 600; }
.trace-intent { color: #e11d48; font-weight: 600; }

/* ── WhatsApp Sync Control Panel ── */
.whatsapp-sync-panel {
  border-bottom: 1px dashed var(--border-soft);
  padding-bottom: 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sync-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.05em;
}

.sync-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  transition: all var(--transition);
}

.sync-badge.idle {
  background: var(--bg-3);
  color: var(--text-3);
}

.sync-badge.syncing {
  background: rgba(5, 150, 105, 0.1);
  color: var(--green);
  animation: pulse-green 2s infinite ease-in-out;
}

.sync-badge.paused {
  background: rgba(217, 119, 6, 0.1);
  color: var(--amber);
}

.sync-badge.error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--red);
}

.sync-meta {
  font-size: 10px;
  color: var(--text-3);
  line-height: 1.4;
  font-family: var(--font);
}

.sync-meta span {
  font-weight: 500;
  color: var(--text-2);
}

.sync-btn {
  width: 100%;
  justify-content: center;
  height: 28px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  transition: all var(--transition);
}

.sync-btn:hover:not(:disabled) {
  background: var(--bg-3);
  border-color: var(--text-3);
  color: var(--text);
}

.sync-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.sync-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Micro-animations */
@keyframes pulse-green {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

@keyframes spin-bolt {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinning {
  animation: spin-bolt 1.2s infinite linear;
  color: var(--amber) !important;
}

/* ── RIGHT COLLAPSIBLE PANEL (PLUGIN CENTER) ────────────── */
#right-panel {
  width: 320px;
  background: var(--bg-1);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-left-color var(--transition);
  overflow: visible;
  height: 100vh;
}

#right-panel.collapsed {
  width: 0px;
  border-left: none;
}

#right-panel .panel-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 320px;
  overflow: hidden;
  transition: opacity 0.2s ease;
  opacity: 1;
}

#right-panel.collapsed .panel-content {
  opacity: 0;
  pointer-events: none;
}

#right-panel-toggle {
  position: absolute;
  top: 18px;
  left: -28px;
  width: 28px;
  height: 32px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  box-shadow: -4px 4px 12px rgba(0,0,0,0.05);
  z-index: 10;
  transition: color var(--transition), transform var(--transition);
  outline: none;
}

#right-panel-toggle:hover {
  color: var(--accent);
}

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

.panel-header span {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
  letter-spacing: -0.1px;
}

.plugin-badge {
  font-size: 8px;
  background: var(--accent-glow);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
}

.plugin-selector-row {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-2);
}

.plugin-select {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

/* Auditor report styling */
.validator-gauge {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  margin: 10px auto;
  border: 8px solid var(--border-soft);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.validator-gauge.perfect {
  border-color: rgba(5, 150, 105, 0.2);
  border-top-color: var(--green);
  color: var(--green);
  background: rgba(5, 150, 105, 0.03);
}

.validator-gauge.partial {
  border-color: rgba(217, 119, 6, 0.2);
  border-top-color: var(--amber);
  color: var(--amber);
  background: rgba(217, 119, 6, 0.03);
}

.validator-gauge.error {
  border-color: rgba(220, 38, 38, 0.2);
  border-top-color: var(--red);
  color: var(--red);
  background: rgba(220, 38, 38, 0.03);
}

.plugin-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.01);
}

.plugin-card h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 6px;
}

.plugin-card p {
  font-size: 11.5px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.45;
}

/* ── RESPONSIVE COMPACT VIEW OVERRIDES (PARALLEL SPLIT-WINDOWS & EXTENSIONS) ── */

/* 1. Prevent Right Panel from squeezing layout when viewport is narrow */
@media (max-width: 1100px) {
  #right-panel {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1000;
    height: 100%;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.25);
    background: var(--bg-1);
    /* Prevent shrinking main app elements */
    flex-shrink: 0;
  }
  
  #right-panel.collapsed {
    width: 0px !important;
    border-left: none;
    transform: translateX(100%);
  }
  
  #right-panel:not(.collapsed) {
    width: 320px !important;
    transform: translateX(0);
    border-left: 1px solid var(--border);
  }
  
  #right-panel-toggle {
    left: -28px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-right: none;
  }
  
  /* Ensure main panel container expands properly */
  #main {
    width: 100%;
  }
}

/* 2. Resilient Browser Extension & Mobile-Width Authentication/Landing Page */
@media (max-width: 650px) {
  #auth-screen {
    padding: 0 !important;
  }

  .landing-container {
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    flex-direction: column !important;
  }

  /* Hide the preview graphics entirely to save space */
  .landing-preview {
    display: none !important;
  }

  .landing-hero {
    flex: 1 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 24px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
  }

  .landing-header {
    margin-bottom: 20px !important;
  }

  .hero-title {
    font-size: 20px !important;
    margin-bottom: 12px !important;
    line-height: 1.35 !important;
  }

  .hero-subtitle {
    font-size: 12px !important;
    margin-bottom: 20px !important;
    line-height: 1.5 !important;
  }

  /* Spec grid gets squeezed: switch to a scrollable or single-column layout */
  .marketing-specs-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-bottom: 24px !important;
  }

  .spec-item {
    padding: 10px 12px !important;
  }

  .spec-value {
    font-size: 12px !important;
  }

  .spec-desc {
    font-size: 9.5px !important;
  }

  .cta-group {
    margin-top: auto !important;
    margin-bottom: 12px !important;
  }

  .sso-login-btn {
    padding: 12px !important;
    font-size: 13px !important;
  }
}

/* ── Dynamic Memory Console & Prompt Exporters ────────────────────────── */
.memory-console-card {
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.memory-console-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.06);
}

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

.console-card-title-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.console-card-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.console-card-title {
  font-size: 13.5px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.15px;
}

.console-card-subtitle {
  font-size: 10px;
  color: var(--text-3);
  display: block;
  margin-top: 2px;
  font-weight: 500;
}

.console-card-action-group {
  display: flex;
  gap: 6px;
}

.console-action-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.console-action-btn:hover {
  background: var(--border-soft);
  color: var(--text);
  border-color: var(--text-3);
}

.console-action-btn:active {
  transform: scale(0.96);
}

.console-search-bar-wrap {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 6px;
  gap: 8px;
}

.console-search-icon {
  font-size: 11px;
  color: var(--text-3);
}

.console-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 11.5px;
  color: var(--text);
  width: 100%;
  font-family: var(--font);
}

.console-select-input {
  background: var(--bg-1);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11.5px;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.console-select-input:hover {
  border-color: var(--text-3);
}

.console-viewport {
  height: 240px;
  overflow-y: auto;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.6;
  padding: 10px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.02);
}

/* Console Viewport Custom Scrollbar */
.console-viewport::-webkit-scrollbar {
  width: 6px;
}

.console-viewport::-webkit-scrollbar-track {
  background: transparent;
}

.console-viewport::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.console-viewport::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
}

/* Cognitive Viewport Details */
.chunk-item {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.15s ease;
}

.chunk-item:last-child {
  border-bottom: none;
}

.chunk-item:hover {
  background: rgba(99, 102, 241, 0.02);
}

.chunk-meta {
  display: flex;
  gap: 8px;
  font-size: 9px;
  color: var(--text-3);
  margin-top: 6px;
  text-transform: uppercase;
  font-weight: 700;
}

.chunk-cat {
  color: var(--accent);
}

.chunk-src {
  color: #10b981;
}

/* Container adjustments to enforce flex column layouts */
#wa-chat-pane-content,
#chat-history-viewport {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

/* Chat Log Details */
.msg-row {
  max-width: 80%;
  width: auto;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 2px;
  font-family: var(--font);
  box-shadow: 0 1.5px 3px rgba(0,0,0,0.08);
}

.msg-row:last-child {
  margin-bottom: 0;
}

.msg-row.user {
  align-self: flex-end;
  background: var(--accent-glow) !important;
  border: 1px solid rgba(139, 92, 246, 0.15) !important;
  border-top-right-radius: 2px !important;
}

.msg-row.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-top-left-radius: 2px !important;
}

/* Special color for WhatsApp Sync assistant chat bubbles */
#wa-chat-pane-content .msg-row.assistant {
  background: rgba(37, 211, 102, 0.04) !important;
  border: 1px solid rgba(37, 211, 102, 0.12) !important;
}

.msg-sender {
  font-weight: 700;
  font-size: 9px;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.msg-row.user .msg-sender {
  color: var(--accent) !important;
}

.msg-row.assistant .msg-sender {
  color: #6366f1 !important;
}

#wa-chat-pane-content .msg-row.assistant .msg-sender {
  color: #10b981 !important;
}

/* Business Insights Ledger Details */
.insight-audit-card {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s ease, border-left 0.15s ease, padding-left 0.15s ease;
}

.insight-audit-card:hover {
  background: rgba(99, 102, 241, 0.03);
}

.insight-audit-card.active {
  background: rgba(99, 102, 241, 0.08) !important;
  border-left: 3px solid var(--accent) !important;
  padding-left: 7px !important;
}

.insight-audit-card:last-child {
  border-bottom: none;
}

.insight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 12px;
}

.insight-name {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text);
  letter-spacing: -0.1px;
}

.insight-score-badge {
  font-family: var(--mono);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  border: 1px solid currentColor;
}

.insight-body {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-2);
  margin-bottom: 6px;
}

.insight-signals-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.insight-signal-pill {
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-3);
}

.insight-action-pill {
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: var(--accent);
}

/* Console Tab Buttons */
.console-tab-btn {
  padding: 7px 13px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text-2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.console-tab-btn:hover {
  background: var(--border-soft);
  color: var(--text);
  border-color: var(--text-3);
  transform: translateY(-0.5px);
}

.console-tab-btn.active {
  background: var(--accent);
  color: white !important;
  border-color: var(--accent);
  box-shadow: 0 3px 10px var(--accent-glow);
}

.console-tab-btn.active i {
  color: white !important;
}

/* ─────────────────────────────────────────────────────────
   Prism 2.0 Guest Page Overhaul (Marketing & Artist Styles)
   Curated warm light-gray background with radial spotlighting,
   premium glassmorphic panels, and Sandbox animations.
   ───────────────────────────────────────────────────────── */

.landing-screen {
  background-color: #f5f5f7 !important;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 10%, rgba(16, 185, 129, 0.04) 0%, transparent 35%) !important;
  background-size: cover;
  min-height: 100vh;
  width: 100vw;
  overflow-y: auto !important;
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--text);
  scroll-behavior: smooth;
}

.glass-navbar {
  background: rgba(245, 245, 247, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  transition: all 0.3s ease;
}

.landing-badge {
  background: linear-gradient(90deg, rgba(99,102,241,0.06) 0%, rgba(168,85,247,0.06) 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  animation: float 4s ease-in-out infinite;
}

.gradient-title {
  background: linear-gradient(135deg, #1e1e24 20%, #4338ca 60%, #6d28d9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-accent {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.premium-glass-card {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 24px;
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.02),
    0 1px 3px rgba(0, 0, 0, 0.02),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-glass-card:hover {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(99, 102, 241, 0.25) !important;
  box-shadow: 
    0 20px 40px rgba(99, 102, 241, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.01) !important;
  transform: translateY(-4px);
}

/* Sandbox Interactive Arena */
.sandbox-arena {
  width: 100%;
  max-width: 1040px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.04);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  height: 520px;
  margin-top: 20px;
  margin-bottom: 60px;
}

@media (max-width: 900px) {
  .sandbox-arena {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.sandbox-chat-pane {
  background: rgba(255, 255, 255, 0.7);
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sandbox-console-pane {
  background: #0f172a; /* Sleek dark-slate terminal */
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.sandbox-chat-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sandbox-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sandbox-chat-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.4);
}

.sandbox-input-wrapper {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
}

.sandbox-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
}

.sandbox-input-wrapper input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text);
}

.sandbox-send-btn {
  background: var(--accent);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s;
}

.sandbox-send-btn:hover {
  opacity: 0.9;
}

.sandbox-chip {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sandbox-chip:hover {
  background: white;
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.06);
}

.sandbox-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 1.5px 3px rgba(0,0,0,0.03);
  animation: fadeUp 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sandbox-bubble.user {
  align-self: flex-end;
  background: var(--accent-glow);
  color: var(--text);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-top-right-radius: 2px;
}

.sandbox-bubble.bot {
  align-self: flex-start;
  background: white;
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-top-left-radius: 2px;
}

.sandbox-bubble .time {
  font-size: 8px;
  color: var(--text-3);
  text-align: right;
  margin-top: 4px;
}

/* Console logs styling */
.console-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.console-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.console-line {
  animation: fadeIn 0.2s ease forwards;
}

.console-line.info { color: #38bdf8; }     /* sky blue */
.console-line.success { color: #4ade80; }  /* emerald green */
.console-line.warn { color: #fbbf24; }     /* amber */
.console-line.debug { color: #94a3b8; }    /* gray */
.console-line.rag { color: #c084fc; }      /* purple */

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
  animation: pulseGrad 2s infinite;
}

/* Premium SSO Button */
.sso-premium-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white !important;
  border: none !important;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.sso-premium-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.35);
  opacity: 0.95;
}

.sso-premium-btn:active {
  transform: translateY(0);
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulseGrad {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.text-shimmer {
  background: linear-gradient(90deg, #6366f1, #a855f7, #6366f1);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerAnim 4s linear infinite;
}

@keyframes shimmerAnim {
  to { background-position: 200% center; }
}








/* ── Live Insights Strip ────────────────────────────────────────── */
#live-insights-strip {
  display: flex;
  gap: 7px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
#live-insights-strip::-webkit-scrollbar { display: none; }
.insight-chip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 auto;
  max-width: 220px;
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}
.insight-chip:hover {
  background: rgba(99,102,241,0.1);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.15);
}
.insight-chip.hot { border-left-color: #ef4444; }
.insight-chip.warm { border-left-color: #f97316; }
.insight-chip.active { border-left-color: #10b981; }
.insight-chip-name {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.insight-chip-meta {
  display: flex;
  align-items: center;
  gap: 5px;
}
.insight-chip-score {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 1px 5px;
  border-radius: 20px;
}
.insight-chip-action {
  font-size: 9px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.live-insights-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  padding: 0 2px;
}

/* Graceful Stacking History Button */
.insight-stack-btn {
  background: rgba(99, 102, 241, 0.07) !important;
  border: 1px solid rgba(99, 102, 241, 0.22) !important;
  color: var(--accent) !important;
  padding: 3px 9px !important;
  border-radius: 12px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none !important;
}

.insight-stack-btn:hover {
  background: rgba(99, 102, 241, 0.18) !important;
  border-color: rgba(99, 102, 241, 0.45) !important;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.12) !important;
}

.insight-stack-btn:active {
  transform: translateY(0);
}

/* Premium UI/UX Polish Additions */
#login-submit-btn:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}
#login-submit-btn:active {
  transform: scale(0.98);
}