/* ============================================================
   商业出海 · Global Agent Hub
   A Fluent / M365 Copilot inspired design system.
   ============================================================ */

/* ---------- 1. tokens ---------- */
:root {
  --brand-gradient: linear-gradient(100deg, #0f6cbd 0%, #5b50e4 48%, #c239b3 100%);
  --brand-gradient-soft: linear-gradient(100deg, #e8f1fb 0%, #ece9fd 48%, #fbe9f6 100%);

  --bg: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #fafafb;
  --surface-3: #f0f1f4;
  --sidebar: #f7f7f9;

  --border: #e2e4e9;
  --border-strong: #ccd0d8;

  --text: #1a1a1e;
  --text-2: #4a4a52;
  --text-muted: #767680;

  --accent: #0f6cbd;
  --accent-hover: #0c5a9e;
  --accent-soft: #e8f1fb;
  --danger: #c4314b;
  --danger-soft: #fdeef1;
  --success: #107c41;
  --success-soft: #e7f5ec;
  --warn: #b7791f;
  --warn-soft: #fdf6e6;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 2px 8px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  --shadow-brand: 0 4px 14px rgba(91, 80, 228, .28);

  --topbar-h: 56px;
  --sidebar-w: 284px;
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.35; }
p { margin: 0 0 10px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Brand-gradient text, used for the product slogan. */
.grad {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
button { font-family: inherit; font-size: inherit; cursor: pointer; }
::selection { background: #d9e7fb; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #d4d7dd;
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #b8bcc6; background-clip: content-box; }

/* ---------- 2. app shell ---------- */
.app {
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  height: 100vh;
  /* Dynamic viewport height keeps the composer visible while mobile browser
     chrome (address bar) shows and hides. */
  height: 100dvh;
}

.app-body {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 0;
  transition: grid-template-columns .22s ease;
}

body.sidebar-collapsed .app-body { grid-template-columns: 0 1fr; }

.main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

.page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.page-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 32px 64px;
}

/* ---------- 3. topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 10px; margin-right: 6px; }

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--brand-gradient);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  box-shadow: var(--shadow-brand);
}

.brand-name { font-size: 15px; font-weight: 600; letter-spacing: .2px; }
.brand-sub { font-size: 11px; color: var(--text-muted); margin-left: 8px; font-weight: 400; }

.topbar-spacer { flex: 1; }

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-2);
  display: grid;
  place-items: center;
  transition: background .14s ease, color .14s ease;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

.model-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  max-width: 320px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color .14s ease, background .14s ease;
}
.model-pill:hover { background: var(--surface-3); border-color: var(--border-strong); }
.model-pill .dot {
  width: 7px; height: 7px; border-radius: 99px;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
  flex: none;
}
.model-pill.warn .dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.model-pill .label {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-pill svg { width: 14px; height: 14px; opacity: .65; flex: none; }

.avatar {
  width: 32px; height: 32px; border-radius: 99px;
  background: var(--brand-gradient);
  color: #fff; font-size: 12px; font-weight: 600;
  display: grid; place-items: center; flex: none;
}

/* ---------- 4. sidebar ---------- */
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  transition: opacity .18s ease;
}
body.sidebar-collapsed .sidebar { opacity: 0; pointer-events: none; }

/* Dimmed layer behind the mobile drawer; enabled only below 860px. */
.sidebar-backdrop { display: none; }

.sidebar-top { padding: 14px 14px 6px; }

.new-chat {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand-gradient);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-brand);
  transition: transform .12s ease, filter .14s ease;
}
.new-chat:hover { filter: brightness(1.06); }
.new-chat:active { transform: scale(.985); }
.new-chat svg { width: 16px; height: 16px; }

.sidebar-nav { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .14s ease, color .14s ease;
}
.nav-item:hover { background: #eceef2; color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.nav-item svg { width: 17px; height: 17px; flex: none; }
.nav-item .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface-3);
  border-radius: 99px;
  padding: 1px 7px;
  font-weight: 600;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .6px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.conv-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.conv-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  transition: background .14s ease;
}
.conv-item:hover { background: #eceef2; }
.conv-item.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.conv-item .emoji { flex: none; }
.conv-item .title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .del {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  border-radius: 5px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  flex: none;
  transition: opacity .14s ease, background .14s ease, color .14s ease;
}
.conv-item .del:hover { background: var(--danger-soft); color: var(--danger); }
.conv-item .del svg { width: 13px; height: 13px; }

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- 5. buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--surface-3);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: background .14s ease, border-color .14s ease, transform .1s ease, color .14s ease;
  white-space: nowrap;
}
.btn:hover { background: #e6e8ec; }
.btn:active { transform: scale(.98); }
.btn svg { width: 15px; height: 15px; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-brand { background: var(--brand-gradient); color: #fff; box-shadow: var(--shadow-brand); }
.btn-brand:hover { filter: brightness(1.07); }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

.btn-danger { background: transparent; border-color: transparent; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: var(--radius-sm); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- 6. generic surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 25px; margin-bottom: 6px; }
.page-head p { color: var(--text-muted); font-size: 13.5px; max-width: 720px; }
.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  transition: all .14s ease;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.chip.tag { height: 22px; padding: 0 9px; font-size: 11px; border-radius: 6px; background: var(--surface-3); border-color: transparent; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--text-muted);
}
.badge.preset { background: var(--accent-soft); color: var(--accent); }
.badge.custom { background: #efe9fd; color: #5b50e4; }
.badge.on { background: var(--success-soft); color: var(--success); }
.badge.off { background: var(--surface-3); color: var(--text-muted); }

/* ---------- 7. agent gallery ---------- */
.agent-grid {
  display: grid;
  /* min() lets the column shrink below 300px on narrow phones instead of
     overflowing the viewport. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

.agent-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.agent-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.agent-card.is-disabled { opacity: .6; }

.agent-card-top { display: flex; align-items: flex-start; gap: 12px; }

.agent-avatar {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: grid; place-items: center;
  font-size: 21px;
  color: #fff;
  flex: none;
  box-shadow: var(--shadow-sm);
}
.agent-avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 16px; }
.agent-avatar.xs { width: 24px; height: 24px; border-radius: 8px; font-size: 13px; }

.agent-card h3 { font-size: 15.5px; }
.agent-card .tagline { color: var(--text-muted); font-size: 12.5px; }
.agent-card .desc {
  font-size: 12.5px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}
.agent-card .caps { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.agent-card-actions .btn { flex: 1; }

/* ---------- 8. chat ---------- */
.chat-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; scroll-behavior: smooth; }

.chat-col {
  max-width: 860px;
  margin: 0 auto;
  padding: 26px 28px 20px;
}

/* hero / empty state */
.hero { padding: 34px 0 10px; }
.hero-mark {
  width: 58px; height: 58px;
  border-radius: 18px;
  background: var(--brand-gradient);
  display: grid; place-items: center;
  font-size: 28px; color: #fff;
  box-shadow: var(--shadow-brand);
  margin-bottom: 20px;
}
.hero h1 { font-size: 30px; letter-spacing: -.3px; }
.hero h1 .grad {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead { color: var(--text-muted); font-size: 14.5px; margin-top: 8px; max-width: 640px; }
.hero .lead p { margin: 0 0 8px; }
.hero .lead p:last-child { margin-bottom: 0; }
.hero .lead strong { color: var(--text-2); }

.hero-agents { display: flex; gap: 8px; overflow-x: auto; padding: 20px 2px 6px; scrollbar-width: none; }
.hero-agents::-webkit-scrollbar { height: 0; }
.hero-agent {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 9px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: all .14s ease;
}
.hero-agent:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); color: var(--text); }
.hero-agent.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.starter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
  margin-top: 22px;
}
.starter {
  text-align: left;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  transition: all .16s ease;
  box-shadow: var(--shadow-sm);
}
.starter:hover {
  border-color: #c7d8ef;
  background: linear-gradient(180deg, #fff, #f7fafe);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.starter .k { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 6px; color: var(--accent); font-size: 12px; }
.starter .k svg { width: 14px; height: 14px; }
.starter .q { color: var(--text-2); }

/* messages */
.msg { display: flex; gap: 14px; padding: 13px 0; }
.msg + .msg { border-top: 1px solid transparent; }
.msg-user { justify-content: flex-end; }
.msg-user .bubble {
  max-width: 76%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px 16px 4px 16px;
  padding: 11px 15px;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}
.msg-assistant .bubble { flex: 1; min-width: 0; }

.msg-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  font-size: 12px;
  color: var(--text-muted);
}
.msg-head strong { color: var(--text); font-size: 13.5px; font-weight: 600; }
.msg-head .sep { opacity: .4; }

.msg-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  transition: opacity .15s ease;
}
.msg-actions button {
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.msg-actions button:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.msg-actions button svg { width: 12px; height: 12px; }

.thinking { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.thinking i {
  width: 7px; height: 7px; border-radius: 99px; background: #b9b2ee;
  animation: bounce 1.15s infinite ease-in-out;
}
.thinking i:nth-child(2) { animation-delay: .16s; }
.thinking i:nth-child(3) { animation-delay: .32s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .5; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.cursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--accent);
  border-radius: 2px;
  vertical-align: -2px;
  margin-left: 3px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.error-box {
  margin-top: 8px;
  padding: 10px 13px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  border: 1px solid #f3ccd4;
  color: #8f2233;
  font-size: 12.5px;
}

.demo-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  border: 1px solid #f0dfb4;
  color: #7a5410;
  font-size: 12.5px;
}
.demo-note svg { width: 15px; height: 15px; flex: none; }

/* composer */
.composer-zone {
  flex: none;
  padding: 6px 28px 18px;
  background: linear-gradient(180deg, rgba(243, 244, 247, 0), var(--bg) 26%);
}
.composer {
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 10px 12px 8px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.composer:focus-within { border-color: #b9cbe4; box-shadow: 0 0 0 3px #e5eefb, var(--shadow); }
.composer textarea {
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: transparent;
  max-height: 190px;
  min-height: 26px;
  padding: 4px 6px;
}
.composer textarea::placeholder { color: #9a9aa5; }
.composer-bar { display: flex; align-items: center; gap: 8px; padding: 4px 2px 0; }
.composer-bar .spacer { flex: 1; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  max-width: 260px;
  transition: all .14s ease;
}
.pill-btn:hover { background: var(--surface-3); color: var(--text); }
.pill-btn.warn { background: var(--warn-soft); border-color: #f0dfb4; color: #7a5410; }
.pill-btn.warn:hover { background: #fbf0da; }
.pill-btn .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-btn svg { width: 13px; height: 13px; opacity: .7; flex: none; }

.send-btn {
  width: 36px; height: 36px;
  border: 0; border-radius: 99px;
  background: var(--brand-gradient);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow-brand);
  transition: filter .14s ease, transform .1s ease;
  flex: none;
}
.send-btn:hover { filter: brightness(1.08); }
.send-btn:active { transform: scale(.94); }
.send-btn[disabled] { background: #d8dae0; box-shadow: none; pointer-events: none; }
.send-btn svg { width: 16px; height: 16px; }
.send-btn.stop { background: #3a3a42; box-shadow: none; }

.composer-hint {
  max-width: 860px;
  margin: 8px auto 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* ---------- 9. markdown ---------- */
.md { font-size: 14px; line-height: 1.72; word-break: break-word; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md h1 { font-size: 20px; margin: 20px 0 10px; }
.md h2 { font-size: 17px; margin: 18px 0 9px; padding-bottom: 5px; border-bottom: 1px solid var(--border); }
.md h3 { font-size: 15px; margin: 16px 0 7px; }
.md h4 { font-size: 14px; margin: 14px 0 6px; color: var(--text-2); }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md li > ul, .md li > ol { margin: 3px 0 0; }
.md code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: #f0f1f4;
  border: 1px solid #e4e6ea;
  border-radius: 5px;
  padding: 1px 5px;
  color: #a8325c;
}
.md pre {
  background: #1f1f28;
  color: #e6e6ec;
  padding: 13px 15px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.6;
}
.md pre code { background: none; border: 0; color: inherit; padding: 0; font-size: 12.5px; }
.md blockquote {
  margin: 0 0 12px;
  padding: 8px 14px;
  border-left: 3px solid #c9d8ea;
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2);
}
.md table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 13px;
  font-size: 12.5px;
  display: block;
  overflow-x: auto;
}
.md th, .md td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--surface-3); font-weight: 600; white-space: nowrap; }
.md tr:nth-child(even) td { background: #fcfcfd; }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.md a { word-break: break-all; }
.md strong { font-weight: 650; }

/* ---------- 10. forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }

.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.field .hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; line-height: 1.5; }
.field .req { color: var(--danger); margin-left: 2px; }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  padding: 9px 11px;
  outline: 0;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: #9dc0e6;
  box-shadow: 0 0 0 3px #e8f1fb;
}
.textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.textarea.code { font-family: var(--mono); font-size: 12.5px; min-height: 260px; }
.textarea.tall { min-height: 130px; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23767680' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; padding-right: 30px; }

.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  width: 38px; height: 21px; border-radius: 99px; background: #cfd2d9;
  position: relative; transition: background .16s ease; flex: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 17px; height: 17px; border-radius: 99px; background: #fff;
  box-shadow: var(--shadow-sm); transition: transform .16s ease;
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(17px); }

.emoji-picker, .accent-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-opt, .accent-opt {
  width: 34px; height: 34px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; font-size: 17px;
  transition: all .14s ease;
}
.emoji-opt:hover, .accent-opt:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.emoji-opt.active, .accent-opt.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.accent-opt i { width: 18px; height: 18px; border-radius: 6px; display: block; }

.swatch { width: 18px; height: 18px; border-radius: 6px; display: block; }
.swatch-blue { background: linear-gradient(135deg, #0f6cbd, #4f9dd8); }
.swatch-violet { background: linear-gradient(135deg, #5b50e4, #a06bf0); }
.swatch-magenta { background: linear-gradient(135deg, #c239b3, #e86bd0); }
.swatch-teal { background: linear-gradient(135deg, #0d7d7d, #3fbfa6); }
.swatch-amber { background: linear-gradient(135deg, #c76a00, #e9a63a); }
.swatch-rose { background: linear-gradient(135deg, #c4314b, #ef7f9b); }
.swatch-green { background: linear-gradient(135deg, #107c41, #4dbd74); }
.swatch-slate { background: linear-gradient(135deg, #4b5563, #8c96a3); }

.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.range-row output {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  background: var(--surface-3); border-radius: 6px; padding: 2px 8px; min-width: 42px; text-align: center;
}

.side-panel {
  position: sticky;
  top: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 16px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
}
.form-actions .spacer { flex: 1; }

/* ---------- 11. models ---------- */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.model-card { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.model-card.is-default { border-color: #b9cbe4; box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm); }
.model-card-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.model-logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-size: 17px; font-weight: 700; color: #fff; flex: none;
}
.model-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }
.model-meta code {
  font-family: var(--mono); font-size: 11.5px; background: var(--surface-3);
  border-radius: 5px; padding: 1px 6px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.model-card-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border); }
.model-card-actions .btn { flex: 1; }

/* ---------- 12. modal ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 26, .38);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 24px;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } }

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pop .18s cubic-bezier(.2, .9, .3, 1.1);
}
.modal.wide { max-width: 720px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 15.5px; flex: 1; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.picker-list { display: flex; flex-direction: column; gap: 4px; }
.picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  width: 100%;
  transition: background .14s ease, border-color .14s ease;
}
.picker-item:hover { background: var(--surface-2); border-color: var(--border); }
.picker-item.active { background: var(--accent-soft); border-color: #b9d4ef; }
.picker-item .info { flex: 1; min-width: 0; }
.picker-item .info b { display: block; font-size: 13.5px; font-weight: 600; }
.picker-item .info span {
  display: block; font-size: 12px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.picker-item .check { color: var(--accent); flex: none; }
.picker-item .check svg { width: 16px; height: 16px; }

/* ---------- 13. toast ---------- */
.toasts {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 99px;
  background: #26262e;
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: toast-in .2s ease;
}
.toast.ok { background: #10492c; }
.toast.err { background: #7a1f31; }
.toast svg { width: 15px; height: 15px; flex: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- 14. empty / skeleton ---------- */
.empty {
  padding: 52px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty .icon {
  width: 58px; height: 58px; margin: 0 auto 16px;
  border-radius: 18px; background: var(--brand-gradient-soft);
  display: grid; place-items: center; font-size: 26px;
}
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 16px; }
.empty p { font-size: 13px; margin-bottom: 18px; }

.skeleton {
  height: 96px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #eceef2 25%, #f5f6f8 37%, #eceef2 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ============================================================
   15. responsive
   ============================================================ */

/* Touch devices have no hover, so the rules below are opt-in: the controls are
   visible by default and only fade out for real mouse users on wide screens.
   Anything hidden behind :hover would otherwise be unreachable on a phone. */
@media (hover: hover) and (min-width: 641px) {
  .msg-actions,
  .conv-item .del { opacity: 0; }
  .msg:hover .msg-actions,
  .msg:focus-within .msg-actions,
  .conv-item:hover .del,
  .conv-item:focus-within .del { opacity: 1; }
}

@media (hover: none) {
  .agent-card:hover { transform: none; }
}

@media (max-width: 1080px) {
  .form-grid { grid-template-columns: 1fr; }
  .side-panel { position: static; }
}

/* ---------- tablet / phone: sidebar becomes an overlay drawer ---------- */
@media (max-width: 860px) {
  :root { --sidebar-w: min(280px, 82vw); }

  /* The sidebar is taken out of flow, so the content area is always a single
     full-width column - opening the drawer must not reflow the page. */
  .app-body { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    bottom: 0;
    left: 0;
    width: var(--sidebar-w);
    z-index: 40;
    box-shadow: var(--shadow-lg);
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-100%);
    transition: transform .22s ease;
    /* Notch / rounded-corner safe area on landscape phones. */
    padding-left: env(safe-area-inset-left);
  }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-collapsed .sidebar { opacity: 1; pointer-events: auto; }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    z-index: 35;
    background: rgba(20, 20, 26, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }

  /* Topbar gets crowded: keep the logo mark, drop the wordmark and the
     user's display name, and let the model pill shrink with an ellipsis. */
  .topbar { gap: 8px; padding-left: max(10px, env(safe-area-inset-left));
            padding-right: max(10px, env(safe-area-inset-right)); }
  .brand { margin-right: 0; }
  .brand-name, .brand-sub { display: none; }
  .model-pill { max-width: 34vw; padding: 0 8px 0 10px; }
  .user-btn { padding: 0 6px 0 3px; }
  .user-btn .name { display: none; }
  .user-btn > svg:last-child { display: none; }

  /* iOS zooms the page when a field smaller than 16px receives focus. */
  .input, .select, .textarea, .composer textarea { font-size: 16px; }

  /* Comfortable touch targets (Apple/Google guidance is ~44px). */
  .btn { height: 40px; padding: 0 16px; }
  .btn-sm { height: 32px; padding: 0 12px; }
  .icon-btn { width: 42px; height: 42px; }
  .chip { height: 34px; padding: 0 14px; }
  .nav-item { height: 44px; font-size: 14px; }
  .conv-item { padding: 11px 10px; }
  .menu-item { padding: 12px 10px; }
  .emoji-opt, .accent-opt { width: 42px; height: 42px; }
  .msg-actions button { height: 32px; padding: 0 12px; font-size: 12.5px; }
  .share-row .revoke { width: 34px; height: 34px; }
  .new-chat { height: 44px; }
  .send-btn { width: 42px; height: 42px; }
}

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .page-inner { padding: 18px 14px 64px; }
  .chat-col { padding: 16px 14px 12px; }
  .composer-zone {
    padding: 6px 12px max(12px, env(safe-area-inset-bottom));
  }
  .composer { border-radius: var(--radius-lg); padding: 8px 10px 6px; }
  .composer textarea { max-height: 132px; }

  /* Composer toolbar: let the two pills shrink instead of overflowing. */
  .composer-bar { gap: 6px; }
  .pill-btn { max-width: 118px; padding: 0 9px; font-size: 12px; }
  .pill-btn .txt { max-width: 74px; }

  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 21px; }
  .page-head p { font-size: 13px; }
  .page-head-row { align-items: stretch; }
  .page-head-row > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
  .page-head-row > div:last-child > .btn { flex: 1; }

  .hero { padding: 16px 0 4px; }
  .hero-mark { width: 48px; height: 48px; border-radius: 15px; font-size: 23px; margin-bottom: 14px; }
  .hero h1 { font-size: 23px; }
  .hero .lead { font-size: 13.5px; }
  .hero-agents { padding: 14px 2px 4px; }
  .starter { padding: 13px 14px; }

  .msg { gap: 10px; padding: 10px 0; }
  .msg-user .bubble { max-width: 88%; }
  .agent-card { padding: 15px; }

  /* Tabs scroll horizontally rather than wrapping into a ragged block. */
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { height: 0; }
  .tab { white-space: nowrap; padding: 11px 12px; }

  .toolbar { gap: 6px; }
  .toolbar > div:first-child { max-width: none; }
  .toolbar .switch { margin-left: 0; }

  /* Modals become bottom sheets. */
  .overlay { padding: 0; align-items: flex-end; }
  .modal, .modal.wide {
    max-width: none;
    max-height: 92dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: sheet-up .22s cubic-bezier(.2, .9, .3, 1);
  }
  @keyframes sheet-up { from { opacity: 0; transform: translateY(24px); } }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .modal-foot { padding-bottom: max(13px, env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; justify-content: center; }

  .auth-shell { padding: 26px 16px; gap: 18px; }
  .auth-slogan { font-size: 22px; }
  .auth-card { padding: 24px 20px 20px; border-radius: var(--radius-lg); }
  .auth-title { font-size: 19px; }
  .row { flex-direction: column; gap: 0; }
}

@media print { .sidebar, .topbar, .composer-zone, .sidebar-backdrop { display: none; } }

/* ============================================================
   16. authentication screens
   ============================================================ */
.auth-body {
  overflow: auto;
  background:
    radial-gradient(1100px 520px at 12% -10%, #e6eefb 0%, transparent 60%),
    radial-gradient(900px 480px at 92% 8%, #f6e9f7 0%, transparent 58%),
    var(--bg);
}

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px 20px;
}

.auth-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark.lg { width: 40px; height: 40px; border-radius: 13px; font-size: 20px; }
.auth-brand-name { font-size: 17px; font-weight: 650; letter-spacing: .2px; }
.auth-brand-sub { font-size: 11.5px; color: var(--text-muted); letter-spacing: .4px; }

.auth-slogan {
  margin: 0;
  text-align: center;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.4px;
  line-height: 1.35;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 30px 30px 26px;
}

.auth-title { font-size: 21px; margin-bottom: 6px; }
.auth-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; line-height: 1.65; }
.auth-form .field { margin-bottom: 15px; }
.auth-submit { width: 100%; height: 40px; font-size: 14px; margin-top: 6px; }

.auth-alt {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

.auth-foot { font-size: 11.5px; color: var(--text-muted); }

.auth-flash { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.flash {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 12.5px;
  line-height: 1.55;
}
.flash-icon { display: flex; margin-top: 1px; flex: none; }
.flash-icon svg { width: 15px; height: 15px; }
.flash-error { background: var(--danger-soft); border: 1px solid #f3ccd4; color: #8f2233; }
.flash-success { background: var(--success-soft); border: 1px solid #c7e4d2; color: #0d5b31; }

/* ============================================================
   17. user menu
   ============================================================ */
.user-menu { position: relative; }

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 4px;
  border: 1px solid transparent;
  border-radius: 99px;
  background: transparent;
  color: var(--text);
  transition: background .14s ease, border-color .14s ease;
}
.user-btn:hover, .user-btn.open { background: var(--surface-3); border-color: var(--border); }
.user-btn svg { width: 14px; height: 14px; opacity: .6; }
.user-btn .name {
  font-size: 13px;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-chip {
  width: 30px; height: 30px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
  letter-spacing: .3px;
}
.avatar-chip.sm { width: 26px; height: 26px; font-size: 11px; }

.menu-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 248px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 60;
}
.menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.menu-head b { display: block; font-size: 13.5px; }
.menu-head span { display: block; font-size: 11.5px; color: var(--text-muted); word-break: break-all; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
}
.menu-item:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger-soft); }
.menu-item svg { width: 16px; height: 16px; flex: none; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* ============================================================
   18. tabs + sharing
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: -1px;
  transition: color .14s ease, border-color .14s ease;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab .count {
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-3);
  border-radius: 99px;
  padding: 1px 7px;
  color: var(--text-muted);
}
.tab.active .count { background: var(--accent-soft); color: var(--accent); }

.share-list { display: flex; flex-direction: column; gap: 4px; }
.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.share-row .info { flex: 1; min-width: 0; }
.share-row .info b { display: block; font-size: 13px; }
.share-row .info span {
  display: block; font-size: 11.5px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.share-row .revoke {
  border: 0; background: transparent; color: var(--text-muted);
  border-radius: 6px; width: 26px; height: 26px;
  display: grid; place-items: center; flex: none;
}
.share-row .revoke:hover { background: var(--danger-soft); color: var(--danger); }
.share-row .revoke svg { width: 14px; height: 14px; }

.visibility-box {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.visibility-box.public { border-color: #b9cbe4; background: var(--accent-soft); }

.readonly-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  border: 1px solid #f0dfb4;
  color: #7a5410;
  font-size: 12.5px;
}
.readonly-banner svg { width: 16px; height: 16px; flex: none; }

.side-panel + .side-panel { margin-top: 16px; }
.panel-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.user-hit {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
}
.user-hit:hover { background: var(--surface-2); border-color: var(--border); }
.user-hit .info { flex: 1; min-width: 0; }
.user-hit .info b { display: block; font-size: 13px; }
.user-hit .info span {
  display: block; font-size: 11.5px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
