/* ===================================================================
   webterm — chat UI
   =================================================================== */

/* ---------- Theme tokens ---------- */
:root {
  /* Light theme defaults */
  --bg:            #ffffff;
  --bg-subtle:     #f7f7f8;
  --bg-sidebar:    #f9f9f9;
  --bg-elevated:   #ffffff;
  --bg-hover:      rgba(0,0,0,0.04);
  --bg-active:     rgba(0,0,0,0.07);
  --bg-bubble:     #f4f4f4;
  --border:        #e5e5e5;
  --border-strong: #d1d1d1;
  --text:          #0d0d0d;
  --text-muted:    #6b6b6b;
  --text-faint:    #9b9b9b;
  --accent:        #0d0d0d;
  --accent-fg:     #ffffff;
  --danger:        #e24c4c;
  --warn-bg:       #fff6e6;
  --warn-border:   #f0d8a8;
  --warn-text:     #9a5b00;
  --tool-bg:       #eef2ff;
  --tool-border:   #d9e1ff;
  --tool-text:     #3b4a8f;
  --code-bg:       #f5f5f5;
  --code-border:   #e5e5e5;
  --link:          #1e6fd9;
  --focus-ring:    rgba(13,13,13,0.2);
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 8px 24px rgba(0,0,0,0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  color-scheme: light;
}

/* Auto dark when OS requests it AND user hasn't forced light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #212121;
    --bg-subtle:     #2f2f2f;
    --bg-sidebar:    #171717;
    --bg-elevated:   #2a2a2a;
    --bg-hover:      rgba(255,255,255,0.06);
    --bg-active:     rgba(255,255,255,0.09);
    --bg-bubble:     #303030;
    --border:        #3d3d3d;
    --border-strong: #4a4a4a;
    --text:          #ececec;
    --text-muted:    #b4b4b4;
    --text-faint:    #8a8a8a;
    --accent:        #ececec;
    --accent-fg:     #0d0d0d;
    --danger:        #ef6b6b;
    --warn-bg:       #3a2a10;
    --warn-border:   #5a4318;
    --warn-text:     #f7c98a;
    --tool-bg:       #1e253d;
    --tool-border:   #2e3855;
    --tool-text:     #b4c2ff;
    --code-bg:       #2a2a2a;
    --code-border:   #3d3d3d;
    --link:          #7cb1ff;
    --focus-ring:    rgba(236,236,236,0.28);
    --shadow-sm:     0 1px 2px rgba(0,0,0,0.3);
    --shadow-md:     0 10px 40px rgba(0,0,0,0.5);

    color-scheme: dark;
  }
}

/* Manual override */
:root[data-theme="dark"] {
  --bg:            #212121;
  --bg-subtle:     #2f2f2f;
  --bg-sidebar:    #171717;
  --bg-elevated:   #2a2a2a;
  --bg-hover:      rgba(255,255,255,0.06);
  --bg-active:     rgba(255,255,255,0.09);
  --bg-bubble:     #303030;
  --border:        #3d3d3d;
  --border-strong: #4a4a4a;
  --text:          #ececec;
  --text-muted:    #b4b4b4;
  --text-faint:    #8a8a8a;
  --accent:        #ececec;
  --accent-fg:     #0d0d0d;
  --danger:        #ef6b6b;
  --warn-bg:       #3a2a10;
  --warn-border:   #5a4318;
  --warn-text:     #f7c98a;
  --tool-bg:       #1e253d;
  --tool-border:   #2e3855;
  --tool-text:     #b4c2ff;
  --code-bg:       #2a2a2a;
  --code-border:   #3d3d3d;
  --link:          #7cb1ff;
  --focus-ring:    rgba(236,236,236,0.28);
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:     0 10px 40px rgba(0,0,0,0.5);

  color-scheme: dark;
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--text); color: var(--bg); }

button { font-family: inherit; }

/* ---------- Login ---------- */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
.login-card {
  background: var(--bg-elevated);
  padding: 32px;
  border-radius: var(--radius-lg);
  width: 360px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.login-card h1 {
  margin: 0 0 4px;
  font-size: 22px; font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.login-card .sub { margin: 0 0 22px; color: var(--text-muted); font-size: 14px; }
.login-card label {
  display: block; margin-bottom: 14px;
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em;
}
.login-card input {
  display: block; width: 100%; margin-top: 6px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  border-radius: var(--radius-md);
  font-size: 15px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.login-card button {
  width: 100%; margin-top: 10px;
  padding: 11px;
  background: var(--accent); color: var(--accent-fg);
  border: 0; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .06s;
}
.login-card button:hover:not(:disabled) { opacity: 0.9; }
.login-card button:active:not(:disabled) { transform: scale(0.99); }
.login-card button:disabled { opacity: .55; cursor: wait; }
.msg { color: var(--danger); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ---------- Chat shell ---------- */
.chat-body { display: flex; flex-direction: row; height: 100vh; overflow: hidden; }
.main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 260px;
  flex: 0 0 260px;
  display: flex; flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  overflow: hidden;
  transition: width .2s ease, flex-basis .2s ease;
}
.sidebar.collapsed { width: 0; flex-basis: 0; border-right-width: 0; }

.chat-new-group { display: flex; flex-direction: column; gap: 6px; padding: 4px 6px 8px; }
.sidebar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  min-width: 0;
}
.sidebar-user .who {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text);
  font-weight: 500;
}
.sidebar-user svg { flex: 0 0 auto; opacity: 0.7; }

.sidebar-bottom {
  padding: 10px;
  display: flex; gap: 8px; align-items: center;
}
.sidebar-bottom .ghost { flex: 1; }

.new-chat {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px; font-weight: 500;
  transition: background .15s, border-color .15s;
}
.new-chat:hover { background: var(--bg-hover); }
.new-chat svg { color: var(--text-muted); }
.new-chat-caret { margin-left: auto; transition: transform .15s; }
.new-chat[aria-expanded="true"] .new-chat-caret { transform: rotate(180deg); }

.new-chat-menu {
  display: flex; flex-direction: column; gap: 2px;
  padding: 4px;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}
.new-chat-menu[hidden] { display: none; }
.new-chat-opt {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: transparent; border: 0;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.new-chat-opt:hover { background: var(--bg-hover); }

.chat-cli-badge {
  display: inline-block;
  font-size: 10px; font-weight: 600;
  line-height: 1;
  padding: 2px 4px;
  margin-right: 6px;
  border-radius: 3px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
  vertical-align: 1px;
}
.chat-cli-badge.cli-gemini { background: #4e7bff22; color: #4e7bff; border-color: #4e7bff55; }
.chat-cli-badge.cli-claude { background: #d97a3b22; color: #d97a3b; border-color: #d97a3b55; }

.sidebar-section { padding: 6px 6px 2px; }
.sidebar-heading {
  font-size: 11px; letter-spacing: .04em;
  color: var(--text-faint);
  padding: 10px 12px 4px;
  text-transform: uppercase;
  font-weight: 600;
}
.sidebar-link {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: transparent; border: 0;
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  font: inherit; font-size: 14px;
  text-align: left;
  transition: background .12s;
}
.sidebar-link:hover { background: var(--bg-hover); }
.sidebar-link.active { background: var(--bg-active); }
.sidebar-link svg { opacity: .75; flex-shrink: 0; }

.chat-list { flex: 1 1 auto; overflow-y: auto; padding: 2px 0 12px; }
.chat-empty {
  color: var(--text-faint);
  font-size: 13px; text-align: center;
  padding: 20px 10px;
}

.chat-item {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  margin: 1px 0;
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  transition: background .12s;
}
.chat-item:hover { background: var(--bg-hover); }
.chat-item.active { background: var(--bg-active); font-weight: 500; }
.chat-item.busy::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--danger);
  margin-right: 4px;
  flex-shrink: 0;
  animation: pulse 1.2s infinite ease-in-out;
}
@keyframes pulse {
  0%, 100% { opacity: .4; transform: scale(0.9); }
  50%      { opacity: 1;  transform: scale(1); }
}

.chat-item-title {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-rename {
  flex: 1; min-width: 0;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  padding: 3px 6px; font: inherit; font-size: 14px;
}

.chat-item-actions {
  display: flex; align-items: center; gap: 2px;
  opacity: 0; transition: opacity .15s;
}
.chat-item:hover .chat-item-actions,
.chat-item.active .chat-item-actions,
.chat-item.busy .chat-item-actions { opacity: 1; }
/* Touch devices have no hover; always show the actions so rename/delete are reachable. */
@media (hover: none) {
  .chat-item-actions { opacity: 1; }
}
.chat-item-actions button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: background .12s, color .12s;
}
.chat-item-actions button:hover { background: var(--bg-active); color: var(--text); }
.chat-stop { color: var(--danger) !important; }
.chat-stop:hover { background: rgba(226,76,76,0.15) !important; }

/* ---------- Header ---------- */
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
  min-height: 52px;
}
.chat-header .brand {
  font-size: 14px; font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.chat-header .chat-title {
  font-size: 14px; color: var(--text); font-weight: 500;
  margin-left: 4px; max-width: 45%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-header .spacer { flex: 1; }

.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px; cursor: pointer;
  font-family: inherit;
  transition: background .12s, border-color .12s;
}
.ghost:hover { background: var(--bg-hover); }
.ghost.icon-only { padding: 6px 8px; display: inline-flex; align-items: center; justify-content: center; border: 0; }

.status {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.status.ok      { background: rgba(30,160,70,0.12);  color: #1a7a3d; border-color: rgba(30,160,70,0.25); }
.status.pending { background: rgba(230,170,10,0.14); color: #956200; border-color: rgba(230,170,10,0.3); }
.status.bad     { background: rgba(226,76,76,0.14); color: var(--danger); border-color: rgba(226,76,76,0.3); }
:root[data-theme="dark"] .status.ok,
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status.ok  { color: #6fd48a; } }
:root[data-theme="dark"] .status.pending,
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status.pending { color: #f3c367; } }

/* Theme toggle icon button */
.theme-toggle {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-pill);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .12s;
  padding: 0;
}
.theme-toggle:hover { background: var(--bg-hover); }
.theme-toggle .sun  { display: none; }
.theme-toggle .moon { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .sun,
:root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon,
:root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: inline-block; }
}
:root[data-theme="dark"] .theme-toggle .sun { display: inline-block; }
:root[data-theme="light"] .theme-toggle .moon { display: inline-block; }

/* ---------- Transcript ---------- */
.transcript {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 20px 180px;
  scroll-behavior: smooth;
}
.transcript > * {
  max-width: 760px;
  margin-left: auto; margin-right: auto;
}

.empty-hint {
  text-align: center;
  color: var(--text-muted);
  padding: 120px 24px 40px;
}
.empty-hint h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.empty-hint p { margin: 4px 0; font-size: 15px; color: var(--text-muted); }
.empty-hint .hint-sub {
  margin-top: 18px;
  color: var(--text-faint);
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Messages (GPT-like layout) ---------- */
/* User: right-aligned bubble with timestamp below. Assistant: left avatar + flowing text (no bubble). */
.msg { margin: 22px 0; display: flex; }
.msg:first-child { margin-top: 8px; }
.msg-user { flex-direction: column; align-items: flex-end; }
.msg-assistant { gap: 14px; }

.msg-time {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.msg-user .bubble {
  max-width: 80%;
  background: var(--bg-bubble);
  color: var(--text);
  padding: 11px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-word;
}

.msg-assistant .avatar {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 2px;
}
.msg-assistant .msg-col {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  gap: 6px;
}
.msg-assistant .activity { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-assistant .activity:empty { display: none; }
.msg-assistant .text {
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  word-wrap: break-word;
  min-height: 22px;
}
.msg-assistant .text.no-text { color: var(--text-faint); font-style: italic; }

/* Streaming cursor — inserted by app.js inside the last block element while running */
.stream-cursor {
  display: inline-block;
  color: var(--text-muted);
  margin-left: 2px;
  animation: cursor-blink 1.05s steps(2, jump-none) infinite;
  user-select: none;
}
@keyframes cursor-blink {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* Message fade-in */
.msg { animation: msg-in .22s ease-out; }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Markdown styling (assistant) ---------- */
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child  { margin-bottom: 0; }
.markdown p  { margin: 0 0 12px; }
.markdown h1, .markdown h2, .markdown h3,
.markdown h4, .markdown h5, .markdown h6 {
  margin: 18px 0 10px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.markdown h1 { font-size: 1.55em; }
.markdown h2 { font-size: 1.3em; }
.markdown h3 { font-size: 1.12em; }
.markdown h4 { font-size: 1em; }
.markdown ul, .markdown ol { margin: 6px 0 12px; padding-left: 26px; }
.markdown li { margin: 4px 0; }
.markdown li > p { margin: 4px 0; }
.markdown a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.markdown a:hover { text-decoration-thickness: 2px; }
.markdown strong { font-weight: 600; }
.markdown em { font-style: italic; }
.markdown hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.markdown blockquote {
  margin: 12px 0;
  padding: 4px 14px;
  color: var(--text-muted);
  border-left: 3px solid var(--border-strong);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  padding: 1.5px 6px;
  border-radius: 5px;
  word-break: break-word;
}
.markdown pre {
  margin: 12px 0;
  padding: 14px 16px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.55;
}
.markdown pre code {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: var(--text);
  white-space: pre;
}
.markdown table {
  border-collapse: collapse;
  margin: 12px 0;
  width: 100%;
  font-size: 14px;
}
.markdown th, .markdown td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
}
.markdown th { background: var(--bg-subtle); font-weight: 600; }

/* ---------- Tool chips ---------- */
.tool-chip {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--tool-bg);
  color: var(--tool-text);
  border: 1px solid var(--tool-border);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.tool-chip .tool-name { font-weight: 600; flex-shrink: 0; }
.tool-chip .tool-arg {
  color: inherit; opacity: 0.75;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 440px;
}
.tool-chip.warn {
  background: var(--warn-bg);
  color: var(--warn-text);
  border-color: var(--warn-border);
  white-space: pre-wrap;
  display: block;
  max-width: 100%;
}

.meta {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-faint);
}
.meta:empty { display: none; }
.meta.bad { color: var(--danger); }

/* Typing dots */
.typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted);
  animation: blink 1.2s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40%           { opacity: 1;   transform: translateY(-2px); }
}

/* ---------- Composer ---------- */
.composer {
  position: sticky;
  bottom: 0;
  padding: 12px 16px 20px;
  flex: 0 0 auto;
  background: linear-gradient(to top, var(--bg) 60%, rgba(0,0,0,0));
}
.composer-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  padding: 8px 8px 8px 8px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}

/* "+" attach button, Gemini-style, sits at the left edge of the composer. */
.attach-btn {
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  flex-shrink: 0;
  transition: background .15s, color .15s, transform .08s;
}
.attach-btn:hover { background: var(--border-strong); color: var(--text); }
.attach-btn:active { transform: scale(0.94); }

/* Row of pending attachment chips shown above the textarea before send. */
.composer-attachments {
  max-width: 760px;
  margin: 0 auto 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px;
}
.attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  font-size: 12px;
  color: var(--text);
  max-width: 280px;
}
.attach-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip-rm {
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-faint);
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 16px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.attach-chip-rm:hover { background: var(--border-strong); color: var(--text); }

/* Static chips inside sent user bubbles — non-interactive. */
.bubble-attachments { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.attach-chip-static { padding: 3px 10px; font-size: 11.5px; opacity: 0.9; }
.composer-inner:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.composer textarea {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  padding: 8px 0;
  resize: none;
  max-height: 220px;
  overflow-y: auto;
}
.composer textarea::placeholder { color: var(--text-faint); }

.send {
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: opacity .15s, transform .08s;
  flex-shrink: 0;
}
.send:hover:not(:disabled) { opacity: 0.88; }
.send:active:not(:disabled) { transform: scale(0.94); }
.send:disabled { background: var(--border-strong); color: var(--text-faint); cursor: not-allowed; }

.send .stop-icon { display: none; }
.composer.running .send { background: var(--danger); color: #fff; }
.composer.running .send-icon { display: none; }
.composer.running .send .stop-icon { display: inline-block; }

/* Scrollbars */
.transcript::-webkit-scrollbar,
.composer textarea::-webkit-scrollbar,
.chat-list::-webkit-scrollbar,
.dm-messages::-webkit-scrollbar,
.dm-thread-list::-webkit-scrollbar,
.markdown pre::-webkit-scrollbar { width: 10px; height: 10px; }
.transcript::-webkit-scrollbar-thumb,
.composer textarea::-webkit-scrollbar-thumb,
.chat-list::-webkit-scrollbar-thumb,
.dm-messages::-webkit-scrollbar-thumb,
.dm-thread-list::-webkit-scrollbar-thumb,
.markdown pre::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
.transcript::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
.transcript::-webkit-scrollbar-track { background: transparent; }

/* ---------- Views ---------- */
.view { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.view[hidden] { display: none; }

/* Terminal */
#terminalView { padding: 0; }

/* Mobile key-bar — Esc/Tab/Ctrl-C/arrows for devices without those keys. */
.term-keybar { display: none; gap: 4px; padding: 6px; background: var(--bg-sidebar); border-bottom: 1px solid var(--border); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.term-keybar .tk {
  flex: 0 0 auto;
  min-width: 44px; min-height: 32px;
  padding: 4px 10px;
  font: inherit; font-size: 13px; font-weight: 500;
  background: var(--bg-subtle); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; user-select: none;
}
.term-keybar .tk:active { background: var(--bg-active); }
.term-tabs {
  display: flex; align-items: center; gap: 2px;
  padding: 6px 8px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
  min-height: 38px;
}
.term-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 8px 5px 12px;
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  max-width: 220px;
  user-select: none;
  transition: background .12s;
}
.term-tab:hover { background: var(--bg-hover); }
.term-tab.active { background: var(--bg-active); border-color: var(--border-strong); }
.term-tab .title {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px;
  background: transparent; border: 0; color: inherit; font: inherit; padding: 0;
  cursor: inherit;
}
.term-tab .title[contenteditable="true"] {
  background: var(--bg); cursor: text; padding: 0 2px; border-radius: 3px;
  outline: 1px solid var(--accent);
}
.term-tab .close {
  background: transparent; border: 0; color: inherit; opacity: 0.55;
  font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.term-tab .close:hover { opacity: 1; color: var(--danger); }
.term-new {
  background: transparent; border: 0; color: var(--text-muted);
  padding: 4px 10px; border-radius: var(--radius-sm);
  font: inherit; font-size: 13px;
  cursor: pointer; flex-shrink: 0; margin-left: 4px;
  transition: background .12s;
}
.term-new:hover { background: var(--bg-hover); color: var(--text); }
.term-panes {
  position: relative; flex: 1 1 auto; min-height: 0;
  background: #000;
  overflow: hidden;
}
.term-pane { position: absolute; inset: 0; padding: 6px 8px; display: none; }
.term-pane.active { display: block; }
.term-pane .xterm { width: 100%; height: 100%; }
.term-empty { color: var(--text-muted); font-size: 13px; padding: 24px; text-align: center; }

/* Users view */
.users-wrap { max-width: 960px; width: 100%; margin: 0 auto; padding: 28px 24px 48px; }
.users-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.users-header h2 { margin: 0; font-size: 24px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.users-header .spacer { flex: 1; }

.primary-btn {
  background: var(--accent); color: var(--accent-fg);
  border: 0; border-radius: var(--radius-pill);
  padding: 8px 18px;
  font: inherit; font-weight: 600; font-size: 13.5px;
  cursor: pointer;
  margin-left: auto;
  transition: opacity .15s, transform .06s;
}
.primary-btn:hover { opacity: 0.9; }
.primary-btn:active { transform: scale(0.98); }

.users-table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 14px;
}
.users-table th, .users-table td {
  padding: 11px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.users-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em;
}
.users-table tr:last-child td { border-bottom: 0; }
.users-table input[type="checkbox"] { cursor: pointer; }
.you-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1.5px 7px;
  border-radius: var(--radius-pill);
  background: var(--tool-bg);
  color: var(--tool-text);
  margin-left: 6px;
}

.row-actions { display: flex; gap: 6px; }
.row-actions .ghost.small { padding: 5px 12px; font-size: 12.5px; border-radius: var(--radius-sm); }
.row-actions .ghost.small.danger { color: var(--danger); border-color: rgba(226,76,76,0.35); }
.row-actions .ghost.small.danger:hover { background: rgba(226,76,76,0.12); }

.add-user-form {
  margin-top: 14px;
  padding: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.add-user-form input:not([type="checkbox"]) {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 8px 12px; font: inherit; font-size: 14px;
  min-width: 200px;
}
.add-user-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.add-user-form .chk { color: var(--text); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }

.user-msg {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-height: 18px;
  word-break: break-all;
}

/* ========== Direct messages ========== */
#messagesView.view { display: flex; flex-direction: column; height: 100%; overflow: hidden; position: relative; }
.dm-layout { display: flex; flex: 1; min-height: 0; }
.dm-sidebar {
  width: 280px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  background: var(--bg-sidebar);
}
.dm-sidebar-header {
  padding: 14px 16px; font-size: 12px; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  text-transform: uppercase; letter-spacing: 0.05em;
  font-weight: 600;
}
.dm-sidebar-header button.ghost { font-size: 12px; padding: 4px 10px; }
.dm-thread-list { list-style: none; margin: 0; padding: 4px; overflow-y: auto; flex: 1; }
.dm-thread-item {
  padding: 10px 12px; margin: 1px 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 8px;
  transition: background .12s;
}
.dm-thread-item:hover { background: var(--bg-hover); }
.dm-thread-item.active { background: var(--bg-active); }
.dm-thread-name { color: var(--text); font-size: 14px; font-weight: 500; }
.dm-thread-time { color: var(--text-muted); font-size: 11.5px; text-align: right; }
.dm-thread-preview {
  grid-column: 1 / 3; color: var(--text-muted); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dm-empty-side { padding: 16px; color: var(--text-muted); font-size: 13px; text-align: center; }

.dm-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dm-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 15px; }
.dm-thread { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.dm-header {
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  color: var(--text); font-weight: 600; font-size: 15px;
  background: var(--bg);
  display: flex; align-items: center; gap: 6px;
}
.dm-messages {
  flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px;
  background: var(--bg);
}
.dm-msg { display: flex; flex-direction: column; max-width: 70%; position: relative; }
.dm-del {
  background: transparent; color: var(--text-faint); border: 0;
  width: 18px; height: 18px; border-radius: 50%;
  cursor: pointer; font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background .12s, color .12s;
}
.dm-del:hover { background: rgba(226,76,76,0.15); color: var(--danger); }
.dm-msg.dm-mine { align-self: flex-end; align-items: flex-end; }
.dm-msg.dm-theirs { align-self: flex-start; align-items: flex-start; }
.dm-bubble {
  padding: 9px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45;
  word-break: break-word; white-space: pre-wrap;
}
.dm-mine .dm-bubble { background: var(--accent); color: var(--accent-fg); }
.dm-theirs .dm-bubble { background: var(--bg-bubble); color: var(--text); }
.dm-meta { color: var(--text-faint); font-size: 11px; margin-top: 2px; display: inline-flex; align-items: center; gap: 4px; }
.dm-warn { color: var(--danger); font-size: 13px; padding: 8px; }

.dm-composer {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.dm-composer textarea {
  flex: 1; resize: none;
  background: var(--bg-elevated); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 18px;
  padding: 9px 14px; font: inherit; font-size: 14.5px;
  min-height: 36px; max-height: 120px;
  transition: border-color .15s, box-shadow .15s;
}
.dm-composer textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.dm-composer button { align-self: flex-end; }

.dm-badge {
  display: inline-block;
  background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 1px 7px; margin-left: auto;
  min-width: 18px; text-align: center;
}

.dm-picker {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  animation: dm-fade 0.18s ease;
}
.dm-picker-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 380px; max-height: 70vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-md);
}
.dm-picker-head {
  padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
}
.dm-picker-head h3 { margin: 0; color: var(--text); font-size: 16px; font-weight: 600; }
.dm-picker-list { list-style: none; margin: 0; padding: 4px; overflow-y: auto; }
.dm-picker-item {
  padding: 10px 14px; cursor: pointer; color: var(--text);
  font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  border-radius: var(--radius-md);
  margin: 1px 0;
  transition: background .12s;
}
.dm-picker-item:hover { background: var(--bg-hover); }
.dm-picker-tag {
  color: var(--text-muted);
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
}
.dm-picker-exists { color: var(--text-faint); font-size: 11px; margin-left: auto; }

/* Browser default [hidden]{display:none} loses to display:flex above. Force it back. */
#messagesView[hidden] { display: none; }
.dm-picker[hidden]    { display: none; }
.dm-thread[hidden]    { display: none; }
.dm-empty[hidden]     { display: none; }
.dm-empty-side[hidden]{ display: none; }
.dm-badge[hidden]     { display: none; }

/* ===================== Mobile ===================== */
@media (max-width: 768px) {
  .chat-body { height: 100dvh; }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 84vw;
    max-width: 320px;
    z-index: 100;
    transform: translateX(0);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-md);
  }
  .sidebar.collapsed {
    transform: translateX(-100%);
    width: 84vw;
    flex-basis: auto;
    border-right-width: 1px;
  }
  body.has-mobile-drawer::before {
    content: '';
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99;
    animation: dm-fade 0.22s ease;
  }
  @keyframes dm-fade { from { opacity: 0 } to { opacity: 1 } }

  .main { width: 100%; }

  .sidebar-link, .new-chat, .ghost, .chat-item, .term-tab { min-height: 42px; }

  .term-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .term-tab { flex-shrink: 0; }
  .term-keybar { display: flex; }

  /* iOS: 16px font stops auto-zoom on focus */
  #cmd, #dmText, .composer textarea, .dm-composer textarea,
  .login-card input, .add-user-form input { font-size: 16px; }

  .chat-header { padding: 8px 12px; gap: 8px; min-height: 48px; }
  .chat-header .brand { display: none; }
  .chat-header .chat-title { max-width: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-header #status { display: none; }

  .transcript { padding: 16px 14px 160px; }

  .dm-layout { position: relative; overflow: hidden; }
  .dm-sidebar { width: 100%; border-right: none; }
  .dm-main {
    position: absolute; inset: 0;
    background: var(--bg);
    transform: translateX(100%);
    transition: transform 0.22s ease;
    z-index: 2;
  }
  .dm-layout.has-active .dm-main { transform: translateX(0); }
  .dm-back {
    background: none; border: none; color: var(--text); cursor: pointer;
    font-size: 22px; line-height: 1; padding: 4px 10px 4px 0;
  }
  .dm-picker-card { width: 92vw; max-width: 380px; max-height: 80vh; }

  .users-wrap { padding: 16px; }
  .users-table { display: block; overflow-x: auto; white-space: nowrap; }

  .chat-list, .term-tabs, .users-table, .dm-thread-list,
  .dm-messages, #transcript { -webkit-overflow-scrolling: touch; }

  /* Keyboard-aware composer: visualViewport gives us --kb-inset.
     On mobile we pin the composer with fixed positioning to the keyboard's top
     so iOS Safari doesn't slide it behind the keyboard. */
  .composer {
    position: fixed;
    left: 0; right: 0;
    bottom: var(--kb-inset, 0px);
    z-index: 10;
    padding: 10px 14px max(10px, env(safe-area-inset-bottom));
    background: var(--bg);
    transition: bottom .18s ease;
  }
  html.kb-open .composer { padding-bottom: 10px; }

  /* Transcript needs bottom breathing room for the fixed composer + keyboard */
  .transcript {
    padding-bottom: calc(140px + var(--kb-inset, 0px));
  }

  /* DM composer stays in-flow; just absorb keyboard height via padding */
  .dm-composer {
    padding-bottom: calc(max(10px, env(safe-area-inset-bottom)) + var(--kb-inset, 0px));
    transition: padding-bottom .18s ease;
  }
  .dm-messages {
    /* Nothing — dm-composer expands itself, so messages scroll area shrinks naturally */
  }
}

.dm-back { display: none; }
@media (max-width: 768px) { .dm-back { display: inline-block; } }

button, .sidebar-link, .chat-item, .term-tab, .dm-thread-item, .dm-picker-item {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* DM header call button + voice-message bubble + mic recording button. */
.dm-header-spacer { flex: 1; }
.dm-call-btn {
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-faint);
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.dm-call-btn:hover { background: var(--border-strong); color: var(--text); }

.dm-mic {
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-faint);
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 11px; font-weight: 600;
}
.dm-mic:hover { background: var(--border-strong); color: var(--text); }
.dm-mic.recording { background: #b92020; color: #fff; width: auto; padding: 0 10px; border-radius: 18px; }
.dm-mic.recording:hover { background: #d83030; }

.dm-voice { display: block; width: 100%; max-width: 260px; margin-bottom: 4px; }
.dm-voice-dur { font-size: 11px; opacity: 0.7; margin-bottom: 4px; }
.dm-voice-text { margin-top: 4px; }

/* Incoming-call modal */
.incoming-call {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
}
.incoming-call[hidden] { display: none; }
.incoming-call-card {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 28px 32px;
  min-width: 280px;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.incoming-call-name { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.incoming-call-sub { font-size: 13px; color: var(--text-faint); margin-bottom: 20px; }
.incoming-call-actions { display: flex; gap: 14px; justify-content: center; }
.call-accept {
  background: #1e9e42; color: #fff; border: 0;
  padding: 10px 24px; border-radius: 22px; cursor: pointer;
  font-size: 14px; font-weight: 600;
}
.call-accept:hover { background: #27b251; }
.call-reject {
  background: #b92020; color: #fff; border: 0;
  padding: 10px 24px; border-radius: 22px; cursor: pointer;
  font-size: 14px; font-weight: 600;
}
.call-reject:hover { background: #d83030; }

/* In-call bar — floats at top-right during an active call. */
.in-call-bar {
  position: fixed; top: 12px; right: 12px; z-index: 1050;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: rgba(20,20,20,0.92); color: #fff;
  border-radius: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  font-size: 13px;
}
.in-call-bar[hidden] { display: none; }
.in-call-info { display: flex; align-items: center; gap: 8px; }
.in-call-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #1e9e42;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.in-call-timer { font-variant-numeric: tabular-nums; opacity: 0.85; }
.in-call-state { font-size: 12px; opacity: 0.7; }
.in-call-actions { display: flex; gap: 6px; }
.call-mute, .call-hangup {
  background: rgba(255,255,255,0.12); color: #fff; border: 0;
  padding: 4px 10px; border-radius: 14px; cursor: pointer;
  font-size: 13px;
}
.call-mute:hover { background: rgba(255,255,255,0.2); }
.call-mute.muted { background: #b97020; }
.call-hangup { background: #b92020; font-weight: 600; }
.call-hangup:hover { background: #d83030; }

/* Files view — per-user uploaded files with drag-drop + list/download/delete. */
.files-wrap { max-width: 960px; width: 100%; margin: 0 auto; padding: 28px 24px 48px; }
.files-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.files-header h2 { margin: 0; font-size: 24px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; flex: 1; }
.files-header label.primary-btn { cursor: pointer; }
.file-drop {
  border: 2px dashed var(--border, #444);
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  color: var(--muted, #888);
  margin-bottom: 16px;
  transition: background 0.12s, border-color 0.12s;
}
.file-drop.dragover {
  background: rgba(14, 99, 156, 0.12);
  border-color: #0e639c;
  color: var(--text);
}
.files-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.files-table th, .files-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border, #333);
  text-align: left;
  vertical-align: middle;
}
.files-table th {
  color: var(--muted, #888);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.files-table td a { color: #4aa3df; text-decoration: none; }
.files-table td a:hover { text-decoration: underline; }
.files-table .files-empty { text-align: center; color: var(--muted, #888); padding: 24px 0; }
.files-table .row-actions { text-align: right; white-space: nowrap; }

/* Admin impersonation notice — lives in the sidebar above Logout. */
.impersonation-banner {
  margin: 8px 10px 4px;
  padding: 8px 10px;
  background: #b7791f; color: #fff;
  border-radius: 6px;
  font-size: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.impersonation-banner strong { font-weight: 600; }
.impersonation-banner .imp-sub { opacity: 0.85; font-size: 11px; }
.impersonation-banner button {
  align-self: stretch;
  background: #fff; color: #7b4a00; border: none;
  padding: 5px 8px; border-radius: 4px; cursor: pointer;
  font-size: 12px; font-weight: 600;
}
.impersonation-banner button:hover { background: #ffe8b3; }
