/* ============================================
   CSS Reset & Variables
   ============================================ */
:root {
  --bg: #0a0f1e;
  --bg-card: #111827;
  --bg-hover: #1a2235;
  --border: #1e293b;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --blue: #3b82f6;
  --blue-glow: rgba(59,130,246,0.25);
  --gold: #d4a843;
  --gold-dim: rgba(212,168,67,0.15);
  --amber: #f59e0b;
  --green: #10b981;
  --red: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
img { max-width: 100%; height: auto; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }

/* ============================================
   Header
   ============================================ */
.header {
  background: linear-gradient(180deg, #0d1428 0%, #0d1222 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.logo-img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.logo span { background: linear-gradient(135deg, var(--gold), #e8c96a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.logo:hover { opacity: 0.9; }

.nav { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-link:hover { background: var(--bg-hover); color: var(--text); }
.nav-link.active { background: var(--blue); color: #fff; }

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

.lang-switch { display: flex; gap: 2px; background: rgba(255,255,255,0.05); border-radius: var(--radius-pill); padding: 2px; }
.lang-btn {
  padding: 4px 12px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--gold); color: #111; }

.btn-signin {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-signin:hover { border-color: var(--blue); background: var(--bg-hover); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-pill);
  transition: background 0.2s;
  position: relative;
}
.user-chip:hover { background: var(--bg-hover); }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #8b5cf6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}
.user-name-chip { font-size: 0.85rem; color: var(--text-dim); }

.dropdown {
  position: absolute;
  top: 56px;
  right: 24px;
  width: 220px;
  background: #111827;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
  z-index: 200;
}
.dropdown-info { margin-bottom: 8px; }
.dropdown-name { font-weight: 600; font-size: 0.9rem; }
.dropdown-email { font-size: 0.8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 6px;
  background: rgba(245,158,11,0.15);
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.25);
}
.badge.approved { background: rgba(16,185,129,0.15); color: var(--green); border-color: rgba(16,185,129,0.25); }
.badge.rejected { background: rgba(239,68,68,0.15); color: var(--red); border-color: rgba(239,68,68,0.25); }
.dropdown-hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.dropdown-action {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  padding: 8px 4px;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 4px;
}
.dropdown-action:hover { background: var(--bg-hover); }

.pending-bar {
  background: linear-gradient(90deg, rgba(245,158,11,0.9), rgba(217,119,6,0.9));
  color: #fff;
  text-align: center;
  padding: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ============================================
   Main & Pages
   ============================================ */
.main { flex: 1; }
.page { padding: 40px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 800px; }
.page-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.page-subtitle { color: var(--text-dim); margin-bottom: 32px; }

/* ============================================
   Sign-In Page
   ============================================ */
.signin-box {
  max-width: 440px;
  margin: 60px auto;
  text-align: center;
  background: linear-gradient(135deg, rgba(17,24,39,0.95) 0%, rgba(15,20,35,0.98) 100%);
  border: 1px solid rgba(212,168,67,0.2);
  border-radius: var(--radius);
  padding: 60px 40px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 60px rgba(212,168,67,0.05);
}
.signin-logo { width: 120px; height: 120px; max-width: 120px; border-radius: 50%; margin: 0 auto 20px; display: block; object-fit: cover; box-shadow: 0 4px 20px rgba(212,168,67,0.2); }
.signin-box h1 { font-size: 1.8rem; margin-bottom: 12px; background: linear-gradient(135deg, var(--gold), #e8c96a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.signin-tagline { font-size: 1.2rem; color: var(--text); margin-bottom: 8px; }
.signin-desc { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 32px; }
.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: #fff;
  color: #333;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.2s;
}
.btn-google:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.3); transform: translateY(-1px); }
.signin-footer { margin-top: 40px; font-size: 0.75rem; color: var(--text-muted); }

/* ============================================
   Expert Grid
   ============================================ */
.expert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.expert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
}
.expert-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212,168,67,0.15);
}
.expert-card .avatar { margin-bottom: 12px; }
.expert-card-name { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.expert-card-desc { font-size: 0.85rem; color: var(--text-dim); line-height: 1.5; }
.expert-card-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(59,130,246,0.1);
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 500;
}

/* ============================================
   Cards & Form Elements
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.table-card { padding: 0; overflow-x: auto; }
.full-width { grid-column: 1 / -1; }
.input-textarea {
  width: 100%;
  min-height: 100px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
}
.input-textarea:focus { border-color: var(--blue); }
.input-search {
  width: 100%;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  margin-bottom: 20px;
}
.input-search:focus { border-color: var(--blue); }
.label { font-size: 0.85rem; color: var(--text-dim); margin: 16px 0 12px; font-weight: 600; }

.controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin: 16px 0;
  padding: 12px 16px;
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-sm);
}
.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.toggle input { display: none; }
.toggle-slider {
  width: 34px; height: 18px;
  background: rgba(255,255,255,0.1);
  border-radius: 18px;
  position: relative;
  transition: background 0.2s;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--blue); }
.toggle input:checked + .toggle-slider::after { transform: translateX(16px); }
.select-sm {
  background: rgba(0,0,0,0.2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary:hover { background: #2563eb; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 20px;
}
.btn-outline:hover { border-color: var(--blue); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.full { width: 100%; margin-top: 8px; }

/* ============================================
   Mini Expert Grid (Council)
   ============================================ */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.mini-card {
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.mini-card:hover { border-color: var(--text-muted); }
.mini-card.selected { border-color: var(--blue); background: rgba(59,130,246,0.1); }
.mini-card .avatar { width: 28px; height: 28px; font-size: 0.65rem; margin: 0 auto 6px; }
.mini-card.selected .avatar { background: var(--blue); }
.mini-card-name { font-size: 0.72rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================
   Loading & Results
   ============================================ */
.loading-box { text-align: center; padding: 40px 0; }
.spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-box p { color: var(--text-dim); }

.statement-card {
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
}
.statement-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.statement-head .name { font-weight: 600; }
.synthesis-box {
  background: rgba(245,158,11,0.05);
  border: 1px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-top: 24px;
}
.synthesis-box h3 { color: var(--amber); margin-bottom: 16px; }

.answer-body { margin-top: 16px; line-height: 1.7; }
.answer-body p { margin-bottom: 12px; }
.answer-body h1,.answer-body h2,.answer-body h3 { margin: 20px 0 10px; }
.answer-body strong { color: var(--text); }
.answer-body ul,.answer-body ol { padding-left: 20px; margin-bottom: 12px; }
.answer-body li { margin-bottom: 4px; }
.answer-body code { background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }
.answer-body pre { background: rgba(0,0,0,0.3); padding: 16px; border-radius: var(--radius-sm); overflow-x: auto; margin: 12px 0; }

.result-badge {
  display: inline-block;
  background: rgba(245,158,11,0.15);
  color: var(--amber);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.token-info { text-align: right; font-size: 0.75rem; color: var(--text-muted); margin-top: 16px; font-family: monospace; }
details { margin-top: 16px; }
details summary {
  cursor: pointer;
  padding: 10px 14px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}
.detail-body { padding: 12px; font-size: 0.85rem; color: var(--text-muted); max-height: 200px; overflow-y: auto; }

/* ============================================
   Modal Overlay
   ============================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-x {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
}
.modal-x:hover { color: var(--text); }
.modal-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}
.modal-avatar { width: 48px; height: 48px; font-size: 1rem; }
.modal-name { font-size: 1.1rem; font-weight: 600; }
.modal-sub { font-size: 0.8rem; color: var(--text-muted); }
.modal-body { padding: 24px; }

/* ============================================
   Chart Grid
   ============================================ */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

/* ============================================
   Admin Table
   ============================================ */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }
.admin-table tr:hover { background: rgba(255,255,255,0.02); }

/* ============================================
   Toast
   ============================================ */
.toast-box { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
}
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ============================================
   Footer
   ============================================ */
.footer {
  background: #0d1222;
  padding: 20px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.footer strong { color: var(--blue); }

/* ============================================
   Admin Sub-Tabs
   ============================================ */
.sub-tabs { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.sub-tab {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.sub-tab:hover { border-color: var(--text-muted); color: var(--text); }
.sub-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.admin-section { margin-top: 8px; }
.section-heading { font-size: 1.1rem; margin-bottom: 8px; }
.text-dim { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 16px; }

/* ============================================
   Whitelist
   ============================================ */
.whitelist-add { display: flex; gap: 12px; margin-bottom: 20px; align-items: center; }
.whitelist-list { display: flex; flex-direction: column; gap: 8px; }
.whitelist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.whitelist-item .email { font-weight: 500; }
.whitelist-item .added { font-size: 0.75rem; color: var(--text-muted); }
.whitelist-item .remove-btn {
  background: none;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  cursor: pointer;
}
.whitelist-item .remove-btn:hover { background: rgba(239,68,68,0.1); }

/* ============================================
   Usage Stats
   ============================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--blue); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.model-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.model-row:last-child { border-bottom: none; }
.model-name { font-weight: 600; font-size: 0.9rem; }
.model-stats { font-size: 0.8rem; color: var(--text-dim); }

/* ============================================
   Architecture Diagrams
   ============================================ */
.arch-flow { margin-bottom: 32px; }
.flow-diagram {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.flow-step {
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  min-width: 100px;
  line-height: 1.4;
}
.flow-step small { font-weight: 400; color: var(--text-muted); }
.flow-step.accent { background: rgba(59,130,246,0.1); border-color: var(--blue); color: var(--blue); }
.flow-step.green { background: rgba(16,185,129,0.1); border-color: var(--green); color: var(--green); }
.flow-arrow { color: var(--text-muted); font-size: 1.2rem; }
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.tech-item {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.5;
}
.tech-item strong { color: var(--blue); display: block; margin-bottom: 4px; }

/* ============================================
   Help Page
   ============================================ */
.help-section { margin-bottom: 32px; }
.help-heading { font-size: 1.2rem; margin-bottom: 12px; }
.help-card { padding: 24px; }
.help-steps { padding-left: 20px; }
.help-steps li { margin-bottom: 12px; line-height: 1.6; }
.help-steps li ul { margin-top: 8px; padding-left: 20px; }
.help-steps li ul li { margin-bottom: 6px; }
.expert-profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.expert-profile-item {
  padding: 16px;
  background: rgba(0,0,0,0.15);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.expert-profile-item .name { font-weight: 600; margin-bottom: 4px; }
.expert-profile-item .desc { font-size: 0.8rem; color: var(--text-dim); line-height: 1.4; }

/* ============================================
   FAQ
   ============================================ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  background: none;
  border-radius: 0;
}
.faq-item summary:hover { background: rgba(255,255,255,0.02); }
.faq-body { padding: 0 20px 16px; color: var(--text-dim); line-height: 1.7; font-size: 0.9rem; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; }
  .nav { gap: 2px; }
  .nav-link { padding: 6px 12px; font-size: 0.8rem; }
  .user-name-chip { display: none; }
  .expert-grid { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .signin-box { margin: 40px 16px; padding: 40px 24px; }
  .modal { margin: 16px; }
  .container { padding: 0 16px; }
  .flow-diagram { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .whitelist-add { flex-direction: column; }
  .sub-tabs { gap: 4px; }
  .stats-grid { grid-template-columns: 1fr; }
}

/* LLM Config */
.config-row { margin-bottom: 8px; }
.config-label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.config-value { font-size: 18px; font-weight: 700; color: var(--accent-gold, #d4a855); padding: 10px 16px; background: rgba(212,168,85,0.1); border: 1px solid rgba(212,168,85,0.3); border-radius: 8px; }
.select-lg { width: 100%; padding: 10px 14px; background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; font-size: 15px; cursor: pointer; }
.select-lg:focus { border-color: var(--accent-gold, #d4a855); outline: none; }

/* Code Editor */
.code-editor { width: 100%; padding: 16px; background: #0d1117; color: #c9d1d9; border: 1px solid var(--border); border-radius: 8px; font-family: 'Menlo', 'Monaco', 'Courier New', monospace; font-size: 13px; line-height: 1.6; resize: vertical; tab-size: 2; white-space: pre; overflow-x: auto; margin-top: 8px; }
.code-editor:focus { border-color: var(--accent-gold, #d4a855); outline: none; box-shadow: 0 0 0 2px rgba(212,168,85,0.2); }

/* Expert Management List */
.expert-mgmt-list { display: flex; flex-direction: column; gap: 12px; }
.expert-mgmt-item { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; transition: border-color 0.2s; }
.expert-mgmt-item:hover { border-color: var(--accent-gold, #d4a855); }
.expert-mgmt-info { flex: 1; }
.expert-mgmt-name { font-weight: 600; font-size: 15px; color: var(--text); }
.expert-mgmt-id { font-size: 12px; color: var(--text-dim); font-family: monospace; margin-top: 2px; }
.expert-mgmt-desc { font-size: 13px; color: var(--text-dim); margin-top: 4px; max-width: 500px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expert-mgmt-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-edit, .btn-delete { padding: 6px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; border: 1px solid var(--border); background: transparent; transition: all 0.2s; }
.btn-edit { color: var(--accent-gold, #d4a855); border-color: rgba(212,168,85,0.3); }
.btn-edit:hover { background: rgba(212,168,85,0.15); }
.btn-delete { color: #f87171; border-color: rgba(248,113,113,0.3); }
.btn-delete:hover { background: rgba(248,113,113,0.15); }

/* Pre-Login Chatbot — Inline Layout */
.signin-layout { display: flex; align-items: stretch; gap: 32px; justify-content: center; width: 100%; max-width: 900px; margin: 0 auto; min-height: 480px; }
.signin-layout .signin-box { flex: 0 0 380px; }

.intro-chat-inline { flex: 1; max-width: 440px; min-width: 320px; background: var(--bg-card, #111827); border: 1px solid var(--border, #1e293b); border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.intro-chat-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: linear-gradient(135deg, var(--gold, #d4a843), #b8860b); color: #fff; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.intro-chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.chat-msg { padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; max-width: 90%; word-wrap: break-word; }
.chat-msg.bot { background: rgba(212,168,67,0.12); color: var(--text, #e2e8f0); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: rgba(99,102,241,0.2); color: var(--text, #e2e8f0); align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-msg.typing { color: var(--text-dim, #94a3b8); font-style: italic; }
.intro-chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; border-top: 1px solid var(--border, #1e293b); flex-shrink: 0; }
.quick-btn { padding: 5px 10px; border-radius: 14px; border: 1px solid rgba(212,168,67,0.3); background: transparent; color: var(--gold, #d4a843); font-size: 11px; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.quick-btn:hover { background: rgba(212,168,67,0.15); }
.intro-chat-input { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border, #1e293b); flex-shrink: 0; }
.intro-chat-input input { flex: 1; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border, #1e293b); background: var(--bg, #0a0f1e); color: var(--text, #e2e8f0); font-size: 13px; }
.intro-chat-input input:focus { border-color: var(--gold, #d4a843); outline: none; }
.intro-chat-input button { padding: 8px 14px; border-radius: 8px; border: none; background: var(--gold, #d4a843); color: #000; font-size: 14px; cursor: pointer; font-weight: 600; }

@media (max-width: 768px) {
  .signin-layout { flex-direction: column; align-items: center; gap: 20px; padding: 16px; }
  .signin-layout .signin-box { flex: none; width: 100%; max-width: 400px; }
  .intro-chat-inline { width: 100%; max-width: 400px; min-height: 300px; }
}

/* LLM Routing Badge */
.routing-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; margin-top: 8px; }
.routing-badge.gemini { background: rgba(74,222,128,0.12); color: #4ade80; border: 1px solid rgba(74,222,128,0.25); }
.routing-badge.hermes { background: rgba(245,158,11,0.12); color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
.routing-badge.kimi { background: rgba(129,140,248,0.12); color: #818cf8; border: 1px solid rgba(129,140,248,0.25); }
