/* Q101 Ops Desk — dark theme (Q101.ai brand: #0a0e1a / #00abd6) */
:root {
  --bg: #0a0e1a;
  --panel: #0d1525;
  --panel-2: #131c33;
  --border: rgba(194, 239, 250, 0.10);
  --border-strong: rgba(194, 239, 250, 0.18);
  --accent: #00abd6;
  --accent-soft: #c2effa;
  --accent-dim: rgba(0, 171, 214, 0.14);
  --text: #e6eaf3;
  --text-2: #9aa6bd;
  --text-3: #5c6880;
  --user-bubble: #0f3a4a;
  --danger: #ff6b6b;
  --radius: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
#app { display: flex; height: 100vh; overflow: hidden; }

/* ── left rail ─────────────────────────────────────────── */
#rail {
  width: 288px; flex: none;
  display: flex; flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 14px 10px 10px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.brand-mark {
  width: 40px; height: 40px; flex: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #00abd6, #007a99);
  color: #0a0e1a; font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -0.5px;
}
.brand-copy { min-width: 0; }
.brand-copy h1 { margin: 0; font-size: 13.5px; font-weight: 700; letter-spacing: 0.1px; line-height: 1.25; }
.brand-copy .tagline { margin: 0; font-size: 11.5px; color: var(--accent); font-weight: 600; }

#agent-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.group-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-3); margin: 13px 6px 5px; font-weight: 600;
}
.agent {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  cursor: pointer; border: 1px solid transparent;
  transition: background 0.12s ease;
}
.agent:hover { background: rgba(194, 239, 250, 0.06); }
.agent.active { background: var(--accent-dim); border-color: var(--border-strong); }
.agent.active::before {
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 3px; border-radius: 2px; background: var(--accent);
}
.agent .avatar {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.agent.active .avatar { border-color: var(--accent); }
.agent .meta { min-width: 0; }
.agent .name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent .role { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent .model-tag { font-size: 9.5px; color: var(--accent); opacity: 0.75; }

.rail-foot {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 8px 2px; font-size: 11px; color: var(--text-2);
  border-top: 1px solid var(--border); margin-top: 8px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #2fd67b; box-shadow: 0 0 8px #2fd67b; }

/* ── main column ───────────────────────────────────────── */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 21, 37, 0.6);
  backdrop-filter: blur(6px);
}
#chat-head .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.head-copy h2 { margin: 0; font-size: 15.5px; font-weight: 700; }
.head-copy p { margin: 1px 0 0; font-size: 12px; color: var(--text-2); }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chip-btn {
  background: transparent; color: var(--text-2); transition: all 0.15s ease;
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 6px 13px; font-size: 12.5px; font-family: inherit; cursor: pointer;
  transition: all 0.12s ease;
}
.chip-btn:hover { color: var(--accent-soft); border-color: var(--accent); background: var(--accent-dim); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0, 171, 214, 0.18); }

/* ── thread ────────────────────────────────────────────── */
#thread { flex: 1; overflow-y: auto; padding: 22px 22px 8px; scroll-behavior: smooth; }
.welcome { max-width: 640px; margin: 8vh auto 0; text-align: center; }
.welcome .big { font-size: 26px; font-weight: 800; letter-spacing: -0.4px; }
.welcome .sub { color: var(--text-2); font-size: 14px; margin-top: 6px; }

.msg { display: flex; gap: 10px; margin: 0 auto 18px; max-width: 820px; }
.msg .avatar {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  margin-top: 2px;
}
.msg.user { flex-direction: row-reverse; }
.msg.user .avatar { display: none; }
.bubble {
  padding: 12px 16px; border-radius: var(--radius);
  background: var(--panel-2); border: 1px solid rgba(194, 239, 250, 0.16);
  max-width: min(680px, 88%);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.bubble ul li::marker { color: var(--accent); }
.bubble ol li::marker { color: var(--accent); }
.msg.user .bubble { background: var(--user-bubble); border-color: rgba(0, 171, 214, 0.35); }
.msg .who { font-size: 11px; color: var(--text-3); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.msg.user .who { justify-content: flex-end; }
.msg.streaming .who::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }
.caret { display: inline-block; width: 7px; height: 15px; background: var(--accent); vertical-align: -2px; margin-left: 2px; animation: blink 0.8s steps(2) infinite; border-radius: 1px; }
@keyframes blink { 50% { opacity: 0; } }

/* light markdown bits */
.bubble h1, .bubble h2, .bubble h3 { margin: 10px 0 6px; font-size: 15px; }
.bubble h1 { font-size: 16px; }
.bubble ul, .bubble ol { margin: 6px 0; padding-left: 20px; }
.bubble li { margin: 3px 0; }
.bubble strong { color: var(--accent-soft); }
.bubble code { background: rgba(0, 171, 214, 0.12); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.bubble pre { background: #060a14; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; overflow-x: auto; }
.bubble pre code { background: none; padding: 0; }
.bubble hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.bubble blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--accent); color: var(--text-2); }

/* ── suggestions & composer ────────────────────────────── */
.composer { padding: 6px 22px 16px; background: linear-gradient(transparent, var(--bg) 22%); }
.suggest-wrap { max-width: 820px; margin: 0 auto 12px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.suggest {
  background: transparent; color: var(--text); font-weight: 600;
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 8px 15px; font-size: 13px; font-family: inherit; cursor: pointer;
  transition: all 0.12s ease;
}
.suggest:hover { border-color: var(--accent); color: var(--accent-soft); background: var(--accent-dim); }
.composer-box {
  max-width: 820px; margin: 0 auto;
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--border-strong);
  border-radius: 18px; padding: 8px 8px 8px 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.composer-box:focus-within { border-color: var(--accent); }
#input {
  flex: 1; resize: none; border: none; outline: none; background: transparent;
  color: var(--text); font-family: inherit; font-size: 15px; line-height: 1.5;
  max-height: 180px; padding: 6px 0;
}
#input::placeholder { color: #8b97ad; }
.send-btn {
  width: 38px; height: 38px; flex: none; border: none; border-radius: 12px;
  background: var(--accent); color: #06121d; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: filter 0.12s ease;
}
.send-btn:hover { filter: brightness(1.12); }
.send-btn.stop { background: var(--danger); }
.composer-hint { max-width: 820px; margin: 9px auto 0; font-size: 12px; color: var(--text-2); text-align: center; }

/* scrollbars */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-thumb { background: rgba(194, 239, 250, 0.14); border-radius: 9px; }
::-webkit-scrollbar-thumb:hover { background: rgba(194, 239, 250, 0.24); }
::-webkit-scrollbar-track { background: transparent; }

/* responsive */
@media (max-width: 760px) {
  #rail { position: fixed; z-index: 20; height: 100%; transform: translateX(-100%); transition: transform 0.2s ease; }
  body.rail-open #rail { transform: none; }
  #chat-head { padding: 10px 12px; }
  #thread { padding: 16px 12px 4px; }
  .composer { padding: 6px 12px 12px; }
}

/* ── polish additions ─────────────────────────────────── */
#main { position: relative; }
.msg { animation: msgIn 0.18s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.welcome .kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); font-weight: 700; margin-bottom: 12px; }
.welcome .sub2 { color: var(--text-3); font-size: 12.5px; margin-top: 12px; }

.head-copy .head-role { margin: 0; font-size: 12px; color: var(--text-2); }
.head-copy .head-status { margin: 2px 0 0; font-size: 11px; color: var(--accent); font-weight: 600; }
.head-copy .head-status.busy { animation: pulse 1.2s ease-in-out infinite; }

.who { align-items: baseline; }
.who-right { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.msg .who .t { font-size: 10px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.copy-btn {
  font-size: 10px; color: var(--text-3); background: none; border: none; cursor: pointer;
  padding: 0 2px; font-family: inherit; opacity: 0; transition: opacity 0.15s ease, color 0.15s ease;
}
.msg.bot .bubble:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--accent-soft); }

.bubble table { border-collapse: collapse; margin: 8px 0; width: 100%; font-size: 13px; }
.bubble th, .bubble td { border: 1px solid var(--border); padding: 5px 10px; text-align: left; }
.bubble th { background: var(--accent-dim); color: var(--accent-soft); font-weight: 600; }

.scroll-pill {
  position: absolute; right: 34px; bottom: 118px; z-index: 6;
  border: 1px solid var(--border-strong); background: var(--panel-2); color: var(--text-2);
  border-radius: 999px; padding: 7px 14px; font-size: 12px; font-family: inherit; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.scroll-pill:hover { color: var(--accent-soft); border-color: var(--accent); }
.scroll-pill[hidden] { display: none; }

.send-btn:disabled { opacity: 0.45; cursor: default; }
.send-btn:disabled:hover { filter: none; }
.chip-btn.danger { border-color: var(--danger); color: var(--danger); }
.chip-btn.danger:hover { background: rgba(255, 107, 107, 0.12); transform: none; box-shadow: none; }

/* ── rail collapse & toggle ───────────────────────────── */
.rail-toggle {
  flex: none; width: 24px; height: 24px; margin-left: auto;
  border-radius: 7px; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-2); font-size: 15px; line-height: 1;
  cursor: pointer; font-family: inherit; padding: 0;
}
.rail-toggle:hover { color: var(--accent-soft); border-color: var(--accent); background: var(--accent-dim); }
#rail { transition: width 0.22s ease; }
body.rail-collapsed #rail { width: 76px; padding: 14px 8px 10px; }
body.rail-collapsed .brand { flex-direction: column; justify-content: center; gap: 8px; padding: 6px 0 12px; }
body.rail-collapsed .brand-copy,
body.rail-collapsed .group-label,
body.rail-collapsed .agent .meta,
body.rail-collapsed #rail-status { display: none; }
body.rail-collapsed .rail-toggle { margin: 0 auto; }
body.rail-collapsed .agent { justify-content: center; padding: 8px 0; }
body.rail-collapsed .agent .avatar { width: 36px; height: 36px; }
body.rail-collapsed .rail-foot { justify-content: center; }

/* ── context/work indicators ──────────────────────────── */
.saved { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--border); font-size: 11px; }
.saved a { color: var(--accent-soft); text-decoration: none; font-weight: 600; }
.saved a:hover { color: var(--accent-soft); }

/* ── artifacts drawer ─────────────────────────────────── */
.drawer-mask { position: fixed; inset: 0; background: rgba(4, 8, 16, 0.55); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 92vw;
  background: var(--panel); border-left: 1px solid var(--border-strong);
  display: flex; flex-direction: column; z-index: 41;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  animation: drawerIn 0.18s ease;
}
@keyframes drawerIn { from { transform: translateX(24px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.drawer-title { min-width: 0; }
.drawer-title h3 { margin: 0; font-size: 16px; font-weight: 750; }
.drawer-sub { margin: 2px 0 0; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-close {
  margin-left: auto; width: 30px; height: 30px; flex: none; border-radius: 9px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text-2);
  cursor: pointer; font-size: 13px; font-family: inherit;
}
.drawer-close:hover { color: var(--accent-soft); border-color: var(--accent); }
.drawer-tabs { display: flex; gap: 4px; padding: 0 14px 8px; border-bottom: 1px solid var(--border); }
.drawer-tabs .tab {
  border: none; background: transparent; color: var(--text-2); font-family: inherit;
  font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 9px; cursor: pointer;
}
.drawer-tabs .tab.active { background: var(--accent-dim); color: var(--accent-soft); }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px; }
.drawer-foot { flex: none; border-top: 1px solid var(--border); padding: 9px 16px; font-size: 11px; color: var(--text-3); }
.frow { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.frow:hover { background: rgba(194, 239, 250, 0.06); }
.frow .fico { font-size: 15px; }
.frow .fmeta { min-width: 0; flex: 1; }
.frow .fname { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow .fsub { font-size: 11px; color: var(--text-3); }
.frow .fopen { font-size: 11px; color: var(--accent); opacity: 0; transition: opacity 0.15s; }
.frow:hover .fopen { opacity: 1; }
.drawer-empty { color: var(--text-3); font-size: 13px; padding: 18px 10px; text-align: center; }
.preview-head { display: flex; align-items: center; gap: 8px; padding: 4px 2px 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.preview-head .back { border: none; background: none; color: var(--accent-soft); cursor: pointer; font-size: 12.5px; font-family: inherit; padding: 4px 6px; border-radius: 7px; }
.preview-head .back:hover { background: var(--accent-dim); }
.preview-head .pname { font-size: 12.5px; font-weight: 700; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-head .popen { margin-left: auto; font-size: 11.5px; color: var(--accent); text-decoration: none; }
.preview { font-size: 13px; line-height: 1.6; color: var(--text); white-space: normal; }
.preview table { border-collapse: collapse; width: 100%; font-size: 12px; margin: 6px 0; }
.preview th, .preview td { border: 1px solid var(--border); padding: 4px 8px; text-align: left; }
.preview th { background: var(--accent-dim); color: var(--accent-soft); }
.preview code { background: rgba(0, 171, 214, 0.12); padding: 0 4px; border-radius: 4px; font-size: 12px; }
.preview pre { background: #060a14; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; overflow-x: auto; }

/* ── admin console ────────────────────────────────────── */
.admin-body { display: flex; flex-direction: column; min-height: 100vh; }
.admin-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-bottom: 1px solid var(--border); }
.admin-main { flex: 1; padding: 18px 22px 40px; max-width: 1280px; width: 100%; margin: 0 auto; }
.admin-agents { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.agent-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); border-radius: 999px; padding: 6px 14px 6px 6px; font-family: inherit; font-size: 13px; cursor: pointer; }
.agent-chip .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--panel-2); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.agent-chip.active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent-soft); }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .admin-cols { grid-template-columns: 1fr; } }
.admin-pane { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.admin-pane-head h2 { margin: 0 0 4px; font-size: 15px; }
.admin-pane-head p { margin: 0 0 12px; font-size: 12px; color: var(--text-2); }
.upload-zone { border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 18px 12px; text-align: center; cursor: pointer; margin-bottom: 8px; transition: border-color 0.15s; }
.upload-zone:hover, .upload-zone.drag { border-color: var(--accent); background: var(--accent-dim); }
.upload-title { font-weight: 700; font-size: 13.5px; }
.upload-sub { font-size: 11.5px; color: var(--text-2); margin-top: 3px; }
.overwrite-toggle { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; margin: 2px 0 10px; cursor: pointer; }
.upload-status { font-size: 12.5px; padding: 6px 10px; border-radius: 8px; margin-bottom: 8px; }
.upload-status[data-ok="1"] { background: rgba(47, 214, 123, 0.12); color: #7fe0a8; }
.upload-status[data-ok="0"] { background: rgba(255, 107, 107, 0.12); color: #ff9d9d; }
.admin-files { min-height: 60px; }
.mini-btn { border: 1px solid var(--border-strong); background: transparent; color: var(--text-2); border-radius: 7px; padding: 3px 9px; font-size: 11px; font-family: inherit; cursor: pointer; }
.mini-btn.danger { color: #ff9d9d; }
.mini-btn.danger:hover { border-color: var(--danger); background: rgba(255, 107, 107, 0.1); }
.admin-preview { margin-top: 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; }
.admin-preview .md { white-space: pre-wrap; font-family: inherit; font-size: 13px; line-height: 1.6; color: var(--text); }

/* ── drawer: resize, collapse, reopen, search ─────────── */
.drawer { width: 440px; }
.drawer-handle { position: absolute; left: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; touch-action: none; z-index: 3; }
.drawer-handle:hover { background: var(--accent); opacity: 0.35; }
.drawer-search { padding: 8px 14px 4px; }
.drawer-search input {
  width: 100%; box-sizing: border-box; height: 34px;
  background: var(--panel-2); border: 1px solid var(--border-strong); border-radius: 10px;
  color: var(--text); font-family: inherit; font-size: 13px; padding: 0 12px; outline: none;
}
.drawer-search input:focus { border-color: var(--accent); }
.search-group { margin-bottom: 6px; }
.search-group-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); font-weight: 700; padding: 10px 8px 4px;
}

/* ── file viewer modal ────────────────────────────────── */
.file-mask { position: fixed; inset: 0; background: rgba(4, 8, 16, 0.62); z-index: 50; }
.file-modal {
  position: fixed; top: 6vh; bottom: 6vh; left: 50%; transform: translateX(-50%);
  width: min(820px, 92vw); background: var(--panel); border: 1px solid var(--border-strong);
  border-radius: 16px; display: flex; flex-direction: column; z-index: 51;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6); animation: drawerIn 0.16s ease;
}
.file-modal-head {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.file-modal-head .back { border: none; background: none; color: var(--accent-soft); cursor: pointer; font-size: 12.5px; font-family: inherit; padding: 4px 8px; border-radius: 7px; }
.file-modal-head .back:hover { background: var(--accent-dim); }
.file-modal-head .pname { font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.file-modal-head .popen { margin-left: auto; font-size: 12px; color: var(--accent); text-decoration: none; }
.file-modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px; }
.file-modal-body .preview { font-size: 13.5px; }
.file-modal[hidden], .file-mask[hidden] { display: none; }

/* ── hard hidden-override fix (author display:flex was beating [hidden]) ── */
[hidden] { display: none !important; }

/* ── hover role tooltip (custom: native title can't do bullets) ── */
.tip {
  position: fixed; z-index: 60; pointer-events: none;
  max-width: 290px; min-width: 210px;
  background: var(--panel-2); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 11px 13px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
  animation: tipIn 0.12s ease;
}
@keyframes tipIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.tip .tip-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.tip .tip-ico { font-size: 15px; }
.tip .tip-name { font-size: 13.5px; font-weight: 750; color: var(--accent-soft); }
.tip .tip-role { font-size: 11px; color: var(--text-2); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tip ul { margin: 0; padding-left: 16px; }
.tip li { font-size: 12px; line-height: 1.5; color: var(--text); margin: 3px 0; }
.tip li::marker { color: var(--accent); }
.tip[hidden] { display: none; }

/* ── history: transcript, load action, toast ──────────── */
.transcript-meta { font-size: 11px; color: var(--text-2); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.transcript .tmsg { margin-bottom: 12px; }
.transcript .tlabel { font-size: 10.5px; font-weight: 700; color: var(--accent); margin-bottom: 3px; }
.transcript .tmsg.you .tlabel { color: var(--text-3); text-align: right; }
.transcript .tbody { font-size: 13px; line-height: 1.6; color: var(--text); }
.transcript .tmsg.you .tbody { text-align: right; color: var(--text-2); }
.modal-action {
  flex: none; margin-left: 8px; padding: 6px 14px; border: none; cursor: pointer;
  background: var(--accent); color: #06121d; font-family: inherit; font-size: 12.5px; font-weight: 700;
  border-radius: 9px;
}
.modal-action:hover { filter: brightness(1.12); }
.modal-action[hidden] { display: none; }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 70;
  padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--panel-2); border: 1px solid var(--border-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); max-width: 80vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast[data-ok="1"] { color: #7fe0a8; border-color: rgba(47, 214, 123, 0.4); }
.toast[data-ok="0"] { color: #ff9d9d; border-color: rgba(255, 107, 107, 0.4); }
.toast[hidden] { display: none; }
