/* -- Fonts: Inter and JetBrains Mono (OFL, Fontsource 5.3.0), served from static/fonts -- */
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-cyrillic-ext.woff2) format("woff2-variations"), url(fonts/inter-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-cyrillic.woff2) format("woff2-variations"), url(fonts/inter-cyrillic.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin-ext.woff2) format("woff2-variations"), url(fonts/inter-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin.woff2) format("woff2-variations"), url(fonts/inter-latin.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 800; src: url(fonts/jetbrains-mono-cyrillic-ext.woff2) format("woff2-variations"), url(fonts/jetbrains-mono-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: "JetBrains Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 800; src: url(fonts/jetbrains-mono-cyrillic.woff2) format("woff2-variations"), url(fonts/jetbrains-mono-cyrillic.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "JetBrains Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 800; src: url(fonts/jetbrains-mono-latin-ext.woff2) format("woff2-variations"), url(fonts/jetbrains-mono-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 800; src: url(fonts/jetbrains-mono-latin.woff2) format("woff2-variations"), url(fonts/jetbrains-mono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ==========================================================================
   codeboev.tech agent — interface styles
   ========================================================================== */

/* -- Tokens ------------------------------------------------------------- */
:root {
  --bg: #1b1b1e;
  --side: #141416;
  --panel: #222226;
  --raised: #2a2a2f;
  --hover: #303036;
  --active: #36363d;
  --line: #2f2f35;
  --line-soft: #26262b;
  --text: #ededf0;
  --text-2: #c6c6ce;
  --muted: #8c8c96;
  --faint: #65656e;
  --accent: #e9a54c;
  --accent-soft: rgba(233, 165, 76, 0.14);
  --accent-ring: rgba(233, 165, 76, 0.35);
  --blue: #5b9dff;
  --blue-soft: rgba(91, 157, 255, 0.14);
  --ok: #5fcf86;
  --err: #f26d65;
  --err-soft: rgba(242, 109, 101, 0.13);
  --cmd: #8fd99a;
  --add: rgba(95, 207, 134, 0.13);
  --del: rgba(242, 109, 101, 0.13);
  --mono: "JetBrains Mono Variable", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fs: 1; /* text size of this device: Компактный / Обычный / Крупный */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --feed: 768px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.03);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: calc(15px * var(--fs))/1.65 var(--sans);
  font-feature-settings: "cv11"; /* Inter: single-storey a reads calmer in long text */
  display: flex;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
code, pre { font-family: var(--mono); font-size: calc(13.5px * var(--fs)); font-variant-ligatures: none; }
:root[data-size="compact"] { --fs: 0.93; }
:root[data-size="large"] { --fs: 1.1; }
.size-pick { display: flex; gap: 6px; flex-wrap: wrap; }
::selection { background: var(--accent-ring); }
:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: calc(13px * var(--fs)); }
.muted { color: var(--muted); }
.center { text-align: center; padding: 40px 16px; }
.grow { flex: 1; }

/* Thin scrollbars */
* { scrollbar-width: thin; scrollbar-color: #3a3a41 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #3a3a41; border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #4a4a52; }

/* -- Icons -------------------------------------------------------------- */
.ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.ic.big { width: 34px; height: 34px; stroke-width: 1.4; }
.ic.dim { color: var(--faint); }

.logo { width: 26px; height: 26px; flex: none; }

/* -- Controls ----------------------------------------------------------- */
.icon {
  background: none;
  border: 0;
  color: var(--muted);
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--r-sm);
  display: inline-grid;
  place-items: center;
  flex: none;
  transition: background 0.15s, color 0.15s;
}
.icon:hover, .icon.on { background: var(--hover); color: var(--text); }
.icon:active { transform: scale(0.94); }
.icon.small { width: 24px; height: 24px; }
.icon.small .ic { width: 15px; height: 15px; }
.btn {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 13px;
  white-space: nowrap;
  font-weight: 500;
  font-size: calc(14px * var(--fs));
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn.small { padding: 4px 10px; font-size: calc(13px * var(--fs)); }
.btn:has(> .ic) { display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--hover); border-color: #3c3c43; }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--text); color: #141416; border-color: var(--text); font-weight: 600; }
.btn.primary:hover { background: #fff; }
.btn.danger { color: var(--err); }
.btn.danger-solid { background: var(--err); border-color: var(--err); color: #fff; font-weight: 600; }
.btn.ok { color: var(--ok); }
.btn.sel { border-color: var(--accent); background: var(--accent-soft); }
.link { background: none; border: 0; color: var(--muted); padding: 0; }
.link:hover { color: var(--text); }
.only-mobile, .only-collapsed { display: none; }
body.side-collapsed .only-collapsed { display: inline-grid; }
kbd {
  font-family: var(--sans);
  font-size: calc(12px * var(--fs));
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 5px;
  line-height: 18px;
}
.spin {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: rot 0.8s linear infinite;
  flex: none;
}
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes pulse { to { opacity: 0.35; } }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(0.98); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }

/* -- Sidebar ------------------------------------------------------------ */
#sidebar {
  width: 272px;
  flex: none;
  background: var(--side);
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: margin-left 0.25s var(--ease);
}
body.side-collapsed #sidebar { margin-left: -272px; }
.side-top { display: flex; align-items: center; gap: 6px; padding: 12px 10px 8px 14px; }
.brand { display: flex; align-items: center; gap: 9px; flex: 1; font-weight: 650; font-size: calc(15.5px * var(--fs)); letter-spacing: -0.01em; }
.brand b { color: var(--accent); font-weight: 650; }
.side-nav { padding: 4px 8px; display: grid; gap: 1px; }
.nav-item {
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--text-2);
  min-width: 0;
  transition: background 0.15s, color 0.15s;
}
.nav-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .ic { color: var(--muted); }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item:hover .ic { color: var(--text); }
.nav-item.primary { color: var(--text); font-weight: 550; }
.side-search-wrap { padding: 2px 2px 4px; animation: fade-up 0.15s var(--ease); }
.side-search {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  outline: none;
}
.side-search:focus { border-color: var(--accent-ring); }
.side-label { padding: 16px 18px 6px; font-size: calc(12px * var(--fs)); font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
#sessions { list-style: none; margin: 0; padding: 0 8px 8px; overflow-y: auto; flex: 1; }
#sessions li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-2);
  font-size: calc(14px * var(--fs));
  transition: background 0.12s;
}
#sessions li:hover { background: var(--hover); }
#sessions li.active { background: var(--active); color: var(--text); }
#sessions li.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
#sessions .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sessions .m { flex: none; font-size: calc(12px * var(--fs)); color: var(--faint); font-family: var(--mono); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sessions .owner { color: var(--accent); }
#sessions li.grp { padding: 14px 10px 5px; font-size: calc(12px * var(--fs)); font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; cursor: default; background: none; }
#sessions li.grp:first-child { padding-top: 10px; }
/* -- Sidebar: list head, project groups, pins, archive -- */
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 2px 18px; font-size: calc(12px * var(--fs)); font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.side-head .icon { color: var(--faint); }
.side-head .icon:hover { color: var(--text); }
#sessions li.grp.proj { cursor: pointer; display: flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: calc(13px * var(--fs)); color: var(--text-2); padding: 12px 10px 4px 6px; }
#sessions li.grp.proj:hover { color: var(--text); background: none; }
#sessions li.grp.proj .chev { width: 13px; height: 13px; color: var(--faint); flex: none; }
#sessions li.grp.proj .pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sessions li.grp.proj .pcount { font-weight: 500; color: var(--faint); font-size: calc(12px * var(--fs)); }
#sessions li.more-row { color: var(--muted); font-size: calc(12.5px * var(--fs)); padding-left: 26px; }
#sessions li.more-row:hover { color: var(--text); }
#sessions li.more-row.load { justify-content: center; padding-left: 10px; margin-top: 6px; border: 1px dashed var(--line); }
#sessions li.more-row.arch { gap: 8px; padding-left: 10px; margin-top: 10px; }
#sessions li.more-row .ic { width: 14px; height: 14px; }
#sessions li.arch-head { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
#sessions li.arch-head .ic { width: 14px; height: 14px; }
#sessions li.arch-head span { flex: 1; }
#sessions li.empty-row { color: var(--faint); cursor: default; background: none; }
#sessions li.sub-grp { display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 22px; font-size: calc(12.5px * var(--fs)); color: var(--muted); }
#sessions li.sub-grp:hover { color: var(--text); }
#sessions li.sub-grp .chev, #sessions li.sub-grp .sub-ic { width: 13px; height: 13px; flex: none; color: var(--faint); }
#sessions li.sub-grp .pname { flex: 1; }
#sessions li.sub-grp .pcount { color: var(--faint); font-size: calc(12px * var(--fs)); }
#sessions li.sub-grp .sub-live { color: var(--ok); font-size: calc(11.5px * var(--fs)); }
#sessions li.sub { padding-left: 34px; }
#sessions li.auto .t { color: var(--text-2); }
#sessions .kind-ic { width: 13px; height: 13px; flex: none; color: var(--faint); }
#sessions .pin-ic { width: 12px; height: 12px; flex: none; color: var(--faint); transform: rotate(30deg); }
#sessions li.grp.att { color: var(--accent); }
#sessions li.att-row { align-items: flex-start; padding-top: 7px; padding-bottom: 7px; }
#sessions .att-ic { width: 15px; height: 15px; flex: none; margin-top: 1px; }
#sessions .att-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
#sessions .att-sub { font-size: calc(12px * var(--fs)); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sessions .a-input .att-ic { color: var(--accent); }
#sessions .a-ask .att-ic { color: var(--blue); }
#sessions .a-failed .att-ic, #sessions .a-failed .att-sub { color: var(--err); }
#sessions .a-done .att-ic { color: var(--ok); }
#outputs .out-file { display: flex; align-items: baseline; gap: 6px; width: 100%; min-width: 0; text-align: left; }
#outputs .out-file .ic { width: 13px; height: 13px; flex: none; align-self: center; color: var(--faint); }
#outputs .out-file .fn { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-family: var(--mono); font-size: calc(12.5px * var(--fs)); }
#outputs .out-file .fd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-family: var(--mono); font-size: calc(12px * var(--fs)); }
#outputs .out-file:hover .fn { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
/* -- New chat: composer right under the greeting, suggestions below it (wide screens) -- */
#empty-after { width: 100%; max-width: calc(var(--feed) + 44px); margin: 0 auto; padding: 4px 22px 0; display: grid; gap: 12px; }
#empty-after[hidden] { display: none; }
@media (min-width: 761px) {
  body.is-empty #log { flex: 0 1 auto; margin-top: auto; padding-bottom: 6px; }
  body.is-empty #empty { margin-top: 0; }
  body.is-empty #composer-wrap { order: 1; }
  body.is-empty #empty-after { order: 2; margin-bottom: auto; padding-bottom: 24px; }
  body.viewing.is-empty #log { margin-bottom: auto; } /* no composer and suggestions below: stay centred */
}
#sessions .more { display: none; width: 24px; height: 24px; }
#sessions .more .ic { width: 16px; height: 16px; }
#sessions li:hover .more, #sessions li.active .more { display: inline-grid; }
#sessions li:hover .m { display: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 3px rgba(95, 207, 134, 0.12); }
.dot.run { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); animation: pulse 0.9s infinite alternate; }
.side-foot { padding: 8px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 4px; }
.side-foot .nav-item { flex: 1; }
.side-foot form { margin: 0; }
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7a6cf0, #c06ce0);
  color: #fff;
  font-size: calc(12.5px * var(--fs));
  font-weight: 650;
  display: grid;
  place-items: center;
  flex: none !important;
  text-transform: uppercase;
}
.me { font-weight: 550; color: var(--text); }
#scrim { display: none; }

/* -- Main & header ------------------------------------------------------ */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#top {
  height: 50px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 14px;
  border-bottom: 1px solid var(--line-soft);
}
.title {
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  padding: 5px 8px;
  color: var(--text);
  font-weight: 550;
  font-size: calc(14.5px * var(--fs));
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.title:hover { background: var(--hover); }
.git-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px 3px 8px;
  font-family: var(--mono);
  font-size: calc(12.5px * var(--fs));
  color: var(--text-2);
  flex: none;
  max-width: 42%;
  transition: border-color 0.15s, background 0.15s;
}
.git-chip:hover { background: var(--raised); border-color: #3c3c43; }
.git-chip .ic { width: 14px; height: 14px; color: var(--muted); }
.git-chip .br { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.git-chip small { font-size: calc(12px * var(--fs)); color: var(--muted); }
.git-chip .dirty { color: var(--accent); }
.git-chip .pr-badge { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: calc(12px * var(--fs)); background: var(--hover); color: var(--muted); white-space: nowrap; }
.git-chip .pr-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.git-chip .pr-badge.ok { color: var(--ok); }
.git-chip .pr-badge.warn { color: var(--accent); }
.git-chip .pr-badge.bad { color: var(--err); }
.git-chip .pr-badge.wait { color: var(--blue); }
.diff-scope { display: inline-flex; gap: 2px; padding: 2px; margin-bottom: 10px; border-radius: var(--r-sm); background: var(--hover); }
.diff-scope button { border: 0; background: none; color: var(--muted); font: inherit; font-size: calc(12.5px * var(--fs)); padding: 4px 10px; border-radius: calc(var(--r-sm) - 2px); cursor: pointer; }
.diff-scope button.on { background: var(--raised); color: var(--text); }
/* One chat per project: its "⋯" menu has nothing to offer on a wide screen (on a phone it holds the panes). */
@media (min-width: 761px) { body.simple #btn-more { display: none; } }
.top-actions { margin-left: auto; display: flex; gap: 2px; flex: none; }
#btn-info { position: relative; }
#bg-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: calc(11px * var(--fs));
  font-weight: 700;
  line-height: 15px;
}
#body { flex: 1; display: flex; min-height: 0; }
#chat { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
#conn { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--err-soft); color: var(--err); font-size: calc(13.5px * var(--fs)); padding: 5px; }

/* -- Empty state -------------------------------------------------------- */
#log { flex: 1; overflow-y: auto; padding: 28px 22px 16px; scroll-behavior: auto; }
#log > * { max-width: var(--feed); margin-left: auto; margin-right: auto; }
#empty { margin-top: 9vh; display: grid; gap: 14px; justify-items: start; animation: fade-up 0.35s var(--ease); }
.hero-logo { width: 46px; height: 46px; margin-bottom: 4px; }
#empty h2 { margin: 0; font-weight: 600; font-size: calc(28px * var(--fs)); letter-spacing: -0.02em; line-height: 1.25; }
#empty h2 .sub { display: block; color: var(--muted); font-weight: 500; font-size: calc(22px * var(--fs)); }
.cwd-field {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cwd-field:focus-within { border-color: var(--accent-ring); box-shadow: 0 0 0 4px var(--accent-soft); }
.cwd-field .ic { color: var(--muted); }
.cwd-field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 11px 0; font-family: var(--mono); font-size: calc(14px * var(--fs)); }
.switch { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: calc(13.5px * var(--fs)); cursor: pointer; user-select: none; }
.switch b { color: var(--text-2); font-weight: 550; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 32px; height: 18px; border-radius: 10px; background: var(--hover); position: relative; flex: none; transition: background 0.2s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #9a9aa3; transition: transform 0.2s var(--ease), background 0.2s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.suggest { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.sg {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 12px 14px;
  transition: background 0.15s, border-color 0.15s, transform 0.15s var(--ease);
}
.sg:hover { background: var(--raised); border-color: var(--line); transform: translateY(-1px); }
.sg .ic { grid-row: span 2; color: var(--accent); margin-top: 1px; }
.sg-title { font-weight: 600; font-size: calc(14px * var(--fs)); }
.sg-text { color: var(--muted); font-size: calc(13px * var(--fs)); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hint { color: var(--muted); font-size: calc(13px * var(--fs)); margin: 4px 0 0; }

/* -- Feed --------------------------------------------------------------- */
.u { display: flex; flex-direction: column; align-items: flex-end; margin: 22px auto 14px; gap: 6px; animation: fade-up 0.2s var(--ease); }
.u .bubble {
  background: var(--raised);
  border: 1px solid var(--line-soft);
  border-radius: 18px 18px 6px 18px;
  padding: 10px 15px;
  max-width: 85%;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.u .who { color: var(--accent); font-size: calc(12.5px * var(--fs)); font-weight: 600; }
.u .acts { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.u:hover .acts, .u:focus-within .acts { opacity: 1; }
.u .acts .icon { width: 28px; height: 28px; }
.u .acts .ic { width: 15px; height: 15px; }
@media (hover: none) { .u .acts { opacity: 0.75; } }
.att-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.att { display: inline-flex; align-items: center; gap: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px 9px; font-size: calc(12.5px * var(--fs)); color: var(--text-2); }
.att .ic { width: 13px; height: 13px; color: var(--muted); }
.edit-box { width: 100%; display: grid; gap: 8px; background: var(--panel); border: 1px solid var(--accent-ring); box-shadow: 0 0 0 4px var(--accent-soft); border-radius: var(--r-lg); padding: 10px 12px; }
.edit-ta { width: 100%; resize: vertical; background: none; border: 0; outline: 0; min-height: 70px; }
.edit-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: calc(13.5px * var(--fs)); }

.a { margin: 10px auto; animation: fade-up 0.2s var(--ease); }
.md { word-wrap: break-word; font-size: calc(15.5px * var(--fs)); line-height: 1.68; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 12px; }
.md h1, .md h2, .md h3 { line-height: 1.3; margin: 20px 0 10px; letter-spacing: -0.01em; }
.md h1 { font-size: calc(20px * var(--fs)); } .md h2 { font-size: calc(18px * var(--fs)); } .md h3 { font-size: calc(16px * var(--fs)); }
.md ul, .md ol { padding-left: 22px; margin: 0 0 12px; }
.md li { margin: 3px 0; }
.md li::marker { color: var(--muted); }
.md pre { background: var(--side); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 0; overflow: hidden; margin: 12px 0; }
.md pre > code { display: block; padding: 12px 14px; overflow-x: auto; background: none !important; }
.md .code-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 4px 14px; border-bottom: 1px solid var(--line-soft); font-family: var(--sans); font-size: calc(12px * var(--fs)); color: var(--faint); }
.md :not(pre) > code { background: var(--raised); border: 1px solid var(--line-soft); padding: 1px 5px; border-radius: 5px; font-size: 0.86em; }
.md a { color: var(--blue); text-decoration: none; border-bottom: 1px solid rgba(91, 157, 255, 0.35); }
.md a:hover { border-bottom-color: var(--blue); }
.md table { border-collapse: collapse; display: block; overflow-x: auto; margin: 12px 0; font-size: calc(14px * var(--fs)); }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.md th { background: var(--panel); font-weight: 600; }
.md blockquote { margin: 0 0 12px; padding: 2px 0 2px 14px; border-left: 3px solid var(--line); color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.streaming { white-space: pre-wrap; font-size: calc(15.5px * var(--fs)); line-height: 1.68; }
.streaming::after { content: ""; display: inline-block; width: 7px; height: 16px; margin-left: 2px; vertical-align: -2px; background: var(--accent); border-radius: 2px; animation: pulse 0.6s infinite alternate; }

.foot { display: flex; align-items: center; gap: 2px; color: var(--faint); font-size: calc(12.5px * var(--fs)); margin: 2px auto 18px; }
.foot .icon { width: 28px; height: 28px; color: var(--faint); }
.foot .icon:hover { color: var(--text); }
.foot .ic { width: 15px; height: 15px; }
.foot span { margin-left: 4px; }
.foot .err { color: var(--err); }

/* Tool rows: "Выполнено 2 команды ›" */
.trow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  padding: 4px 8px 4px 6px;
  margin-left: -6px;
  color: var(--muted);
  font-size: calc(14px * var(--fs));
  text-align: left;
  max-width: calc(100% + 6px);
  transition: background 0.15s, color 0.15s;
}
.trow:hover { color: var(--text-2); background: var(--panel); }
.trow .tool { width: 16px; height: 16px; color: var(--faint); }
.trow:hover .tool { color: var(--text-2); }
.trow .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .chev { width: 14px; height: 14px; transition: transform 0.18s var(--ease); color: var(--faint); }
.open > .trow .chev { transform: rotate(90deg); }
.trow.err, .trow.err .tool { color: var(--err); }
.trow .elapsed { color: var(--faint); font-size: calc(12.5px * var(--fs)); font-variant-numeric: tabular-nums; }
.trow .badge { font-size: calc(11px * var(--fs)); }
.tgroup, .titem { margin: 4px auto; }
.tgroup > .tg-body { display: none; border: 1px solid var(--line-soft); background: var(--panel); border-radius: var(--r); margin-top: 4px; overflow: hidden; }
.tgroup.open > .tg-body { display: block; animation: fade-up 0.18s var(--ease); }
.tg-body > .titem { margin: 0; padding: 3px 10px; border-bottom: 1px solid var(--line-soft); }
.tg-body > .titem:last-child { border-bottom: 0; }
.tg-body .trow { margin-left: 0; }
.titem > .detail { display: none; margin: 6px 0 6px 8px; padding-left: 14px; border-left: 2px solid var(--line); }
.titem.open > .detail { display: block; animation: fade-up 0.18s var(--ease); }
.detail pre { margin: 0 0 6px; white-space: pre-wrap; word-break: break-word; max-height: 380px; overflow-y: auto; padding: 9px 11px; border-radius: var(--r-sm); }
.detail .cmd { background: var(--side); border: 1px solid var(--line-soft); color: var(--cmd); }
.detail .cmd::before { content: "$ "; color: var(--faint); }
.detail .out { color: var(--text-2); background: var(--side); border: 1px solid var(--line-soft); }
.detail .out.err { color: var(--err); border-color: rgba(242, 109, 101, 0.3); }
.detail .path { font-family: var(--mono); font-size: calc(12.5px * var(--fs)); color: var(--muted); padding: 2px 0 6px; }
.detail .path .link { color: var(--blue); }
.detail .children { padding-left: 4px; margin: 6px 0; }
.detail .link { font-size: calc(13px * var(--fs)); color: var(--blue); }
.detail .todo-inline { list-style: none; padding: 0; margin: 0; }
.detail .todo-inline li, #tasks li { display: flex; gap: 8px; align-items: flex-start; padding: 2px 0; }
.detail .todo-inline li.completed, #tasks li.completed { color: var(--faint); text-decoration: line-through; }
.tdot { width: 14px; height: 14px; border-radius: 50%; border: 1.75px solid var(--faint); flex: none; margin-top: 3px; }
.tdot.in_progress { border-color: var(--blue); border-right-color: transparent; animation: rot 1.2s linear infinite; }
.tdone { width: 16px; height: 16px; color: var(--ok); margin-top: 2px; }
.diff { background: var(--side); border: 1px solid var(--line-soft); padding: 6px 0 !important; }
.diff span { padding: 0 11px; }
.diff .del { background: var(--del); display: block; }
.diff .add { background: var(--add); display: block; }
.diff .hunk { color: var(--blue); display: block; }
.diff .meta { color: var(--muted); display: block; }

/* Permission / question / plan card */
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin: 14px auto;
  display: grid;
  gap: 10px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: fade-up 0.22s var(--ease);
}
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.card .q { font-weight: 600; font-size: calc(15px * var(--fs)); }
.card .hint { margin: 0; }
.card pre { margin: 0; background: var(--side); border: 1px solid var(--line-soft); padding: 9px 11px; border-radius: var(--r-sm); white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto; }
.card .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card.resolved { opacity: 0.6; }
.card.resolved::before { background: var(--line); }
.card.resolved .actions, .card.resolved .opts, .card.resolved input { display: none; }
.card .verdict { font-size: calc(13px * var(--fs)); color: var(--muted); }
.card .opts { display: grid; gap: 6px; }
.card .opt { text-align: left; display: grid; gap: 2px; padding: 9px 12px; }
.card .opt small { color: var(--muted); font-weight: 400; }
.card input[type=text] { background: var(--side); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; outline: none; }
.card input[type=text]:focus { border-color: var(--accent-ring); }
.error-line { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--err); font-size: calc(13.5px * var(--fs)); margin: 10px auto; padding: 9px 12px; background: var(--err-soft); border-radius: var(--r-sm); white-space: pre-wrap; }
.error-line .sub { flex-basis: 100%; opacity: 0.85; }
.work { margin: 4px auto; }
.work.single > .work-head { display: none; }
.work:not(.single) > .work-body { display: none; margin: 4px 0 6px 8px; padding-left: 12px; border-left: 2px solid var(--line-soft); }
.work.open:not(.single) > .work-body { display: block; animation: fade-up 0.18s var(--ease); }
.notice.err { color: var(--err); }
.hint.warn { color: var(--accent); }
/* -- Subagent thinking, side question -- */
.sub-think { display: flex; gap: 6px; color: var(--muted); font-size: calc(13px * var(--fs)); margin: 4px 0; }
.sub-think .ic { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--faint); }
.sub-think span { white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#btw-answer:not(:empty) { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
#btw-answer .btw-q { color: var(--muted); font-size: calc(13.5px * var(--fs)); margin-bottom: 8px; }
/* -- Goal chip above the composer -- */
#goal-chip { display: flex; align-items: center; gap: 8px; max-width: var(--feed); margin: 0 auto 6px; padding: 6px 8px 6px 12px; border: 1px solid var(--accent-ring); background: var(--accent-soft); border-radius: 999px; font-size: calc(13.5px * var(--fs)); color: var(--text-2); }
#goal-chip[hidden] { display: none; }
#goal-chip .ic { width: 15px; height: 15px; color: var(--accent); flex: none; }
#goal-chip .goal-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#goal-chip .goal-meta { color: var(--muted); flex: none; font-size: calc(12.5px * var(--fs)); }
#goal-chip.done { border-color: var(--line); background: var(--panel); }
#goal-chip.done .ic { color: var(--ok); }
/* -- Usage panel -- */
#usage .lim { margin-bottom: 10px; }
#usage .lim-h { display: flex; justify-content: space-between; font-size: calc(13px * var(--fs)); color: var(--text-2); margin-bottom: 4px; }
#usage .lim .bar > div { height: 100%; background: var(--blue); border-radius: inherit; }
#usage .lim.warm .bar > div { background: var(--accent); }
#usage .lim.hot .bar > div { background: var(--err); }
#usage .lim-reset { font-size: calc(12px * var(--fs)); color: var(--faint); margin-top: 3px; }
#usage .cost { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: calc(13px * var(--fs)); color: var(--muted); }
/* -- Next step card (end of turn) and quick questions -- */
.next-card { position: relative; margin: 14px auto 6px; padding: 16px 18px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); animation: fade-up 0.2s var(--ease); }
.next-card .close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; color: var(--faint); }
.next-card .close:hover { color: var(--text-2); }
.next-recap { margin: 0 28px 10px 0; color: var(--muted); font-size: calc(14.5px * var(--fs)); line-height: 1.55; }
.next-ask { margin: 0 28px 14px 0; color: var(--text); font-size: calc(15px * var(--fs)); line-height: 1.5; }
.next-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.next-actions .btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; }
.next-actions .btn kbd { font-family: var(--sans); font-size: calc(12px * var(--fs)); padding: 1px 5px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, 0.18); color: rgba(0, 0, 0, 0.55); background: rgba(0, 0, 0, 0.05); }
.next-card.done { background: none; border-color: var(--line-soft); padding: 10px 14px; }
.next-card.done .next-actions, .next-card.done .close { display: none; }
.next-card.done .next-ask { margin-bottom: 0; color: var(--muted); }
.ask-card .q { font-size: calc(15px * var(--fs)); margin-bottom: 10px; }
.ask-card .opt-notes { margin: 0 0 12px; padding-left: 18px; color: var(--muted); font-size: calc(13.5px * var(--fs)); line-height: 1.5; }
.ask-card .opt-notes b { color: var(--text-2); font-weight: 550; }
.ask-card .ask-other { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.ask-card .ask-other input { flex: 1; min-width: 0; }
.ask-card.resolved .next-actions, .ask-card.resolved .ask-other { display: none; }
/* -- Account dialog tabs -- */
.tabs { display: flex; gap: 4px; margin: -4px 0 16px; border-bottom: 1px solid var(--line-soft); }
.tabs [role="tab"] { white-space: nowrap; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; margin-bottom: -1px; color: var(--muted); font-weight: 550; font-size: calc(14px * var(--fs)); }
.tabs [role="tab"]:hover { color: var(--text-2); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs [hidden] { display: none; }
.tab-panel { gap: 22px; }
#account-dlg .stack > .btn, #account-dlg .stack > form > .btn { justify-self: start; }
@media (max-width: 760px) {
  /* Users as cards: the table does not fit a phone. */
  #users, #users tbody, #users tr, #users td { display: block; width: auto; }
  #users tr:first-child { display: none; }
  #users tr { border: 1px solid var(--line-soft); border-radius: var(--r); padding: 10px 12px; margin-bottom: 8px; background: var(--panel); }
  #users td { padding: 2px 0; border: 0; }
  #users td[data-label] { display: inline; color: var(--muted); font-size: calc(13px * var(--fs)); margin-right: 12px; }
  #users td[data-label]::before { content: attr(data-label) ": "; color: var(--faint); }
  #users td.acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .table-wrap { overflow: visible; }
}
#sched-next.err { color: var(--err); }
.notice.err::before { background: var(--err); }
.notice { color: var(--muted); font-size: calc(13px * var(--fs)); margin: 10px auto; display: flex; gap: 8px; align-items: center; }
.notice::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }

.to-bottom {
  position: absolute;
  left: 50%;
  bottom: 132px;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  z-index: 5;
  animation: pop 0.2s var(--ease);
}
.to-bottom:hover { background: var(--hover); }

/* -- Composer ----------------------------------------------------------- */
#composer-wrap { padding: 6px 22px calc(14px + env(safe-area-inset-bottom)); position: relative; }
#composer {
  max-width: var(--feed);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 8px 6px 14px;
  box-shadow: 0 8px 28px -14px rgba(0, 0, 0, 0.7);
  transition: border-color 0.15s, box-shadow 0.15s;
}
#composer:focus-within { border-color: #44444c; box-shadow: 0 8px 28px -14px rgba(0, 0, 0, 0.7), 0 0 0 4px rgba(255, 255, 255, 0.03); }
#composer.drag { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
#input {
  display: block;
  width: 100%;
  resize: none;
  border: 0;
  outline: 0;
  background: none;
  max-height: 40vh;
  padding: 6px 2px 4px;
  font-size: calc(15.5px * var(--fs));
  line-height: 1.55;
}
#input::placeholder { color: var(--faint); }
.toolbar { display: flex; align-items: center; gap: 4px; margin-left: -6px; }
#status { color: var(--muted); font-size: calc(12.5px * var(--fs)); display: inline-flex; align-items: center; gap: 7px; margin-left: 4px; }
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  color: var(--text-2);
  padding: 5px 8px;
  border-radius: var(--r-sm);
  font-size: calc(13px * var(--fs));
  font-weight: 500;
  transition: background 0.15s;
}
.chip-btn:hover { background: var(--hover); color: var(--text); }
.chip-btn .ic { width: 15px; height: 15px; color: var(--muted); }
.chip-btn .dd { width: 13px; height: 13px; color: var(--faint); }
.chip-btn small { color: var(--muted); font-size: calc(12px * var(--fs)); }
#btn-mode .short { display: none; }
#btn-model span, #btn-mode span { white-space: nowrap; }
#btn-mode[data-mode="acceptEdits"] .ic:first-child { color: var(--accent); }
#btn-mode[data-mode="plan"] .ic:first-child { color: var(--blue); }
.round { width: 34px; height: 34px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center; transition: background 0.15s, transform 0.1s, opacity 0.15s; }
.round:active { transform: scale(0.92); }
.round .ic { width: 17px; height: 17px; stroke-width: 2.2; }
.send { background: var(--text); color: #141416; }
.send:hover { background: #fff; }
.send:disabled { background: var(--raised); color: var(--faint); cursor: default; transform: none; }
.stop { background: var(--raised); color: var(--text); }
.stop .ic { width: 13px; height: 13px; fill: currentColor; }
.stop:hover { background: var(--hover); }
.mic.rec { background: var(--err-soft); color: var(--err); animation: pulse 0.8s infinite alternate; }
#chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 6px; }
#chips:empty { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 7px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 4px 4px 6px; font-size: calc(12.5px * var(--fs)); max-width: 240px; }
.fchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip img { width: 26px; height: 26px; object-fit: cover; border-radius: 5px; }
.fchip .ic { width: 15px; height: 15px; color: var(--muted); }
.fchip button { background: none; border: 0; color: var(--muted); padding: 2px; border-radius: 5px; display: grid; }
.fchip button:hover { background: var(--hover); color: var(--text); }

/* -- Menus / popovers --------------------------------------------------- */
.menu {
  position: absolute;
  z-index: 40;
  background: #26262b;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 5px;
  box-shadow: var(--shadow-lg);
  min-width: 230px;
  max-width: min(420px, calc(100vw - 24px));
  max-height: 52vh;
  overflow-y: auto;
  animation: pop 0.14s var(--ease);
}
.menu .mh { font-size: calc(12px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); padding: 7px 10px 4px; }
.menu .mi {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  padding: 7px 10px;
  text-align: left;
  color: var(--text-2);
}
.menu .mi:hover, .menu .mi.sel { background: var(--hover); color: var(--text); }
.menu .mi .mi-ic { width: 16px; height: 16px; color: var(--muted); }
.menu .mi .txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.menu .mi .txt small { color: var(--muted); white-space: normal; font-size: calc(12.5px * var(--fs)); line-height: 1.4; }
.menu .mi .key { color: var(--faint); font-size: calc(12px * var(--fs)); }
.menu .mi .check { width: 16px; height: 16px; color: var(--accent); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
#popover { left: 22px; bottom: calc(100% - 2px); }
#menu-layer .menu { position: fixed; }

/* -- Right info panel --------------------------------------------------- */
#info {
  width: 292px;
  flex: none;
  border-left: 1px solid var(--line-soft);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 16px 16px;
  font-size: calc(14px * var(--fs));
  background: var(--bg);
}
body.no-info #info { display: none; }
.info-sec { padding: 12px 0 14px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.info-sec:last-child { border-bottom: 0; }
.info-h { font-size: calc(12.5px * var(--fs)); font-weight: 600; color: var(--muted); margin-bottom: 9px; display: flex; gap: 7px; align-items: center; text-transform: uppercase; letter-spacing: 0.05em; }
.info-h .ic { width: 15px; height: 15px; }
.info-h .icon.small { margin-left: auto; }
.link-h { background: none; border: 0; padding: 0; width: 100%; }
.link-h span { margin-left: auto; color: var(--text-2); text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.info-row { color: var(--text-2); overflow-wrap: anywhere; }
#ctx-none { margin: 2px 0 0; font-size: 12px; }
.bar { height: 6px; background: var(--raised); border-radius: 4px; overflow: hidden; }
#ctx-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #8b7bff); border-radius: 4px; transition: width 0.4s var(--ease); }
#ctx-cats { list-style: none; padding: 8px 0 0; margin: 0; font-size: calc(12.5px * var(--fs)); color: var(--muted); }
#ctx-cats li { display: flex; justify-content: space-between; padding: 2px 0; }
#tasks, #outputs, #bg-tasks, #mcp { list-style: none; padding: 0; margin: 0; }
#tasks li { color: var(--text-2); }
#tasks li.in_progress { color: var(--text); }
#outputs li { padding: 3px 0; }
#outputs button { background: none; border: 0; padding: 0; color: var(--text-2); text-align: left; overflow-wrap: anywhere; font-family: var(--mono); font-size: calc(12.5px * var(--fs)); }
#outputs button:hover { color: var(--blue); }
.bg-task { padding: 8px 0; border-bottom: 1px solid var(--line-soft); display: grid; gap: 4px; min-width: 0; }
.bg-task:last-child { border-bottom: 0; }
.bg-head { display: flex; align-items: center; gap: 8px; color: var(--text-2); min-width: 0; }
.bg-head .bg-desc { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bg-head .st { width: 16px; height: 16px; color: var(--ok); }
.bg-head .st.failed, .bg-head .st.stopped, .bg-head .st.killed { color: var(--err); }
.bg-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: calc(12.5px * var(--fs)); color: var(--muted); align-items: center; min-width: 0; }
.bg-meta .link { font-size: calc(12.5px * var(--fs)); color: var(--blue); }
.bg-meta .link.danger { color: var(--err); }
.bg-sum { font-size: calc(12.5px * var(--fs)); color: var(--muted); }
.task-out { margin: 4px 0 0; max-height: 220px; overflow: auto; background: var(--side); border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 7px 9px; font-size: calc(12px * var(--fs)); white-space: pre-wrap; word-break: break-word; }
.mcp-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: calc(13.5px * var(--fs)); min-width: 0; }
.mcp-name { flex: 1; min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcp-row .muted { font-size: calc(12px * var(--fs)); white-space: nowrap; }
.mcp-row .grow { display: none; }
.mcp-row .link { display: none; font-size: calc(12.5px * var(--fs)); color: var(--blue); white-space: nowrap; }
.mcp-row:hover .link { display: inline; }
@media (hover: none) { .mcp-row .link { display: inline; } }
.mdot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--faint); }
.mdot.ok { background: var(--ok); }
.mdot.err { background: var(--err); }
.mdot.warn { background: var(--accent); }

/* -- Split pane (diff / files) ------------------------------------------ */
#pane { flex: 0 0 min(52%, 840px); border-left: 1px solid var(--line-soft); display: flex; flex-direction: column; min-width: 0; background: var(--bg); animation: fade-up 0.2s var(--ease); position: relative; }
#pane-resize { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 5; }
#pane-resize::after { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 2px; background: transparent; transition: background 0.15s; }
#pane-resize:hover::after, body.resizing #pane-resize::after { background: var(--accent-ring); }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing iframe, body.resizing .xterm { pointer-events: none; }
.pane-head { height: 46px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line-soft); font-size: calc(14px * var(--fs)); font-weight: 600; }
.pane-body { flex: 1; overflow: auto; min-height: 0; }
#pane-diff { padding: 12px 14px 0; }
/* -- Diff line comments -- */
.diff .cl { cursor: pointer; position: relative; }
.diff .cl:hover { box-shadow: inset 3px 0 0 var(--accent); }
.dc { font-family: var(--sans); white-space: normal; margin: 4px 10px 6px; padding: 8px 10px; border: 1px solid var(--accent-ring); background: var(--panel); border-radius: var(--r); font-size: calc(13.5px * var(--fs)); display: flex; gap: 8px; align-items: flex-start; position: sticky; left: 10px; max-width: calc(100% - 20px); box-sizing: border-box; }
.dc .dc-text { flex: 1; white-space: pre-wrap; color: var(--text); }
.dc-edit { flex-direction: column; align-items: stretch; }
.dc-edit textarea { width: 100%; box-sizing: border-box; font: inherit; resize: vertical; }
.dc-edit .row { display: flex; gap: 6px; align-items: center; }
.dc-edit .hint { margin-left: auto; font-size: calc(12px * var(--fs)); }
#diff-send { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 10px 0 12px; background: var(--bg); border-top: 1px solid var(--line-soft); font-size: calc(13.5px * var(--fs)); }
#diff-send[hidden] { display: none; }
#diff-send > span { flex: 1; color: var(--text-2); }
#git-chip .pr-watch .ic { width: 13px; height: 13px; margin-left: 4px; vertical-align: -2px; color: var(--accent); }
.dfile { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; background: var(--side); }
.dfile > summary { list-style: none; cursor: pointer; padding: 8px 12px; display: flex; gap: 10px; font-family: var(--mono); font-size: calc(13px * var(--fs)); background: var(--panel); }
.dfile > summary::-webkit-details-marker { display: none; }
.dfile .st { width: 14px; color: var(--muted); font-weight: 700; }
.dfile .n { margin-left: auto; }
.dfile .plus-n { color: var(--ok); }
.dfile .minus-n { color: var(--err); }
.dfile pre { margin: 0; padding: 6px 0; font-size: calc(12.5px * var(--fs)); overflow-x: auto; border: 0; border-radius: 0; }
.dfile pre span { padding: 0 12px; white-space: pre; }
.files { display: flex; }
.file-view { flex: 1; overflow: auto; min-width: 0; }
.file-view .fv-head { position: sticky; top: 0; background: var(--bg); padding: 9px 14px; border-bottom: 1px solid var(--line-soft); font-family: var(--mono); font-size: calc(12.5px * var(--fs)); color: var(--muted); z-index: 1; }
.file-view pre { margin: 0; padding: 12px 14px; font-size: calc(13px * var(--fs)); }
.file-view pre code.hljs { background: none; padding: 0; }
.file-view .fv-head { display: flex; align-items: center; gap: 8px; }
.fv-path { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fv-meta { color: var(--faint); flex: none; }
.btn.sm { padding: 3px 9px; font-size: calc(12.5px * var(--fs)); display: inline-flex; align-items: center; gap: 4px; flex: none; }
.btn.sm .ic { width: 13px; height: 13px; }
.fv-code { display: flex; align-items: flex-start; min-width: 0; }
.fv-code > pre { margin: 0; }
.fv-gutter { flex: none; text-align: right; color: var(--faint); user-select: none; padding-right: 12px !important; border-right: 1px solid var(--line-soft); margin-right: 12px !important; }
.fv-code > pre:last-child { flex: 1; min-width: 0; overflow-x: auto; }
.fv-md { padding: 14px 18px; max-width: 760px; }
.empty-note { height: 100%; min-height: 200px; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--faint); font-size: calc(13.5px * var(--fs)); }
.file-tree { width: 250px; flex: none; border-left: 1px solid var(--line-soft); display: flex; flex-direction: column; min-height: 0; }
.tree-search { display: flex; align-items: center; gap: 7px; margin: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 9px; }
.tree-search .ic { width: 15px; height: 15px; color: var(--muted); }
.tree-search:focus-within { border-color: var(--accent-ring); }
#file-search { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 6px 0; font-size: calc(13.5px * var(--fs)); }
#tree { list-style: none; margin: 0; padding: 0 4px 8px; overflow-y: auto; flex: 1; font-size: calc(13.5px * var(--fs)); }
#tree ul { list-style: none; margin: 0; padding-left: 14px; }
#tree .node { background: none; border: 0; width: 100%; text-align: left; padding: 3px 6px; border-radius: 6px; color: var(--text-2); display: flex; align-items: center; gap: 5px; min-width: 0; }
#tree .node:hover { background: var(--hover); }
#tree .node.sel { background: var(--active); color: var(--text); }
#tree .node .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tree .node .chev { width: 13px; height: 13px; color: var(--faint); transition: transform 0.15s var(--ease); }
#tree .node.open .chev { transform: rotate(90deg); }
#tree .node .chev-pad { width: 13px; flex: none; }
#tree .node .kind { width: 15px; height: 15px; color: var(--muted); }
#tree .node.dir .kind { color: var(--accent); }

/* -- Dialogs ------------------------------------------------------------ */
dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px 22px;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  box-shadow: var(--shadow-lg);
}
dialog[open] { animation: pop 0.18s var(--ease); }
dialog::backdrop { background: rgba(8, 8, 10, 0.62); backdrop-filter: blur(4px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
dialog h2 { margin: 0; font-size: calc(18px * var(--fs)); font-weight: 650; letter-spacing: -0.01em; }
dialog h3 { margin: 20px 0 6px; font-size: calc(12.5px * var(--fs)); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: 7px; }
dialog h3 .ic { width: 15px; height: 15px; }
.stack { display: grid; gap: 8px; }
.stack input:not([type=checkbox]), .stack .row input, .stack textarea, .stack select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  min-width: 0;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.stack input:focus, .stack textarea:focus, .stack select:focus { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.stack textarea { resize: vertical; }
.stack .row { display: flex; gap: 8px; flex-wrap: wrap; }
.stack .row input { flex: 1; }
.stack .row select { flex: 1; }
.stack .row input[type=time] { flex: none; width: 120px; font-family: var(--sans); }
.check { display: flex; gap: 8px; align-items: center; color: var(--text-2); font-size: calc(14px * var(--fs)); }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.form-msg { margin: 0; font-size: calc(13.5px * var(--fs)); min-height: 1em; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--err); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--r); }
#users { width: 100%; border-collapse: collapse; font-size: calc(13.5px * var(--fs)); }
#users th { text-align: left; color: var(--muted); font-weight: 600; font-size: calc(12px * var(--fs)); text-transform: uppercase; letter-spacing: 0.04em; background: var(--side); }
#users th, #users td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
#users tr:last-child td { border-bottom: 0; }
#users td.acts { display: flex; flex-wrap: wrap; gap: 4px; white-space: normal; min-width: 220px; }
#users .btn { padding: 3px 9px; font-size: calc(12.5px * var(--fs)); }
#users tr.off td:not(.acts) { opacity: 0.5; }
.badge { display: inline-flex; align-items: center; font-size: calc(11px * var(--fs)); font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.err { color: var(--err); border-color: var(--err); }
.badge.admin { color: var(--accent); border-color: rgba(233, 165, 76, 0.4); background: var(--accent-soft); }
#sched-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.sched { border: 1px solid var(--line); background: var(--bg); border-radius: var(--r); padding: 11px 13px; display: grid; gap: 4px; }
.sched.off { opacity: 0.55; }
.sched-title { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.sched-meta { font-size: calc(13px * var(--fs)); color: var(--muted); }
.sched-meta .link { color: var(--blue); }
.sched .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.sched .btn { padding: 4px 10px; font-size: calc(13px * var(--fs)); }

#ask-dlg { width: min(440px, calc(100vw - 32px)); padding: 20px; }
.ask { display: grid; gap: 10px; margin: 0; }
.ask h2 { font-size: calc(16.5px * var(--fs)); }
.ask .hint { margin: 0; font-size: calc(14px * var(--fs)); color: var(--text-2); }
#ask-input { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; resize: vertical; outline: none; min-height: 42px; }
#ask-input:focus { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* -- Toasts ------------------------------------------------------------- */
#toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #2c2c32;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 14px;
  font-size: calc(14px * var(--fs));
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}
.toast.in { opacity: 1; transform: none; }
.toast .ic { color: var(--ok); }
.toast.error .ic { color: var(--err); }
.toast.warn .ic { color: var(--accent); }

/* -- Login -------------------------------------------------------------- */
body.login {
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(233, 165, 76, 0.1), transparent 60%), var(--bg);
}
.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px 28px 28px;
  width: min(380px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.3s var(--ease);
}
.login-card > div { display: grid; gap: 10px; } /* login steps: password, then one-time code */
.login-card .hint { margin: -2px 0 0; }
.login-card .logo { width: 44px; height: 44px; margin-bottom: 6px; }
.login-card h1 { font-size: calc(21px * var(--fs)); margin: 0; letter-spacing: -0.02em; font-weight: 650; }
.login-card h1 span { color: var(--accent); }
.login-card .lead { margin: 0 0 10px; color: var(--muted); font-size: calc(14px * var(--fs)); }
.login-card label { color: var(--muted); font-size: calc(13px * var(--fs)); font-weight: 500; }
.login-card input { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 12px; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.login-card input:focus { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-card button { background: var(--text); color: #141416; border: 0; border-radius: var(--r-sm); padding: 11px; font-weight: 650; margin-top: 8px; transition: background 0.15s; }
.login-card button:hover { background: #fff; }
.login-error { color: var(--err); margin: 0; font-size: calc(13.5px * var(--fs)); background: var(--err-soft); border-radius: var(--r-sm); padding: 8px 10px; }

/* Installed app (iOS black-translucent status bar): keep content below the notch. */
@supports (padding: env(safe-area-inset-top)) {
  #top { height: calc(50px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .side-top { padding-top: calc(12px + env(safe-area-inset-top)); }
}

/* -- Responsive --------------------------------------------------------- */
@media (max-width: 1180px) {
  #info { position: fixed; right: 0; top: calc(50px + env(safe-area-inset-top, 0px)); bottom: 0; z-index: 25; box-shadow: -16px 0 40px rgba(0, 0, 0, 0.45); }
  body:not(.show-info) #info { display: none; }
}
@media (min-width: 1181px) {
  body.pane-open #info { display: none; }
}
@media (max-width: 900px) {
  #pane { position: fixed; inset: calc(50px + env(safe-area-inset-top, 0px)) 0 0 0; z-index: 30; }
  .file-tree { width: 200px; }
}
@media (max-width: 760px) {
  .only-mobile { display: inline-grid; }
  body.side-collapsed .only-collapsed { display: none; }
  #side-collapse { display: none; }
  body.side-collapsed #sidebar { margin-left: 0; }
  #sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; transform: translateX(-100%); transition: transform 0.25s var(--ease); width: min(300px, 86vw); box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5); }
  body.side-open #sidebar { transform: none; }
  body.side-open #scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 45; animation: fade-up 0.2s; }
  #top { padding: 0 6px; }
  .title { flex: 1 1 auto; }
  /* Pane buttons move into the ⋯ menu; the git chip keeps its icon, state and PR number. */
  .top-actions .pane-btn { display: none; }
  .git-chip { max-width: none; white-space: nowrap; }
  .git-chip .br { display: none; }
  .git-chip .pr-badge { padding: 0; background: none; }
  .git-chip .pr-badge .t { display: none; }
  .top-actions .icon { width: 34px; }
  #log { padding: 16px 14px 8px; }
  #empty { margin-top: 3vh; }
  #empty h2 { font-size: calc(23px * var(--fs)); }
  #empty h2 .sub { font-size: calc(18px * var(--fs)); }
  .suggest { grid-template-columns: 1fr; }
  .sg:nth-child(n + 3) { display: none; }
  #composer-wrap { padding: 4px 10px calc(10px + env(safe-area-inset-bottom)); }
  #composer { border-radius: 18px; }
  #btn-mode .dd, #btn-model .dd, #btn-model small, #btn-mode .full { display: none; }
  #btn-mode .short { display: inline; }
  #popover { left: 10px; }
  .to-bottom { bottom: 118px; }
  .files { flex-direction: column-reverse; }
  .file-tree { width: auto; max-height: 40%; border-left: 0; border-bottom: 1px solid var(--line-soft); }
  .u .bubble { max-width: 92%; }
}
.mcp-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: calc(13px * var(--fs)); color: var(--muted); padding: 0 0 6px; }
.mcp-sum .warn { color: var(--accent); }
.mcp-sum .link { color: var(--blue); font-size: calc(12.5px * var(--fs)); }

/* -- Terminal pane & uploads -------------------------------------------- */
#pane-term.term { padding: 8px 4px 4px 10px; background: var(--bg); overflow: hidden; }
#pane-term .xterm { height: 100%; }
#pane-term .xterm-viewport { scrollbar-width: thin; }
#pane-files.drag { outline: 2px dashed var(--blue); outline-offset: -8px; background: var(--blue-soft); }

/* -- Two-factor setup ---------------------------------------------------- */
.tfa-qr { width: 180px; height: 180px; border-radius: 10px; background: #fff; image-rendering: pixelated; }
.tfa-secret { font-family: var(--mono); font-size: calc(13px * var(--fs)); color: var(--text); word-break: break-all; }
.tfa-codes {
  margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--side);
  border: 1px solid var(--line); font-family: var(--mono); font-size: calc(14px * var(--fs)); line-height: 1.7;
  columns: 2; column-gap: 24px; user-select: all;
}
.tfa-lead { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ok); font-size: calc(13.5px * var(--fs)); }
#tfa-sec .hint code { background: none; padding: 0; }
@media (max-width: 520px) { .tfa-codes { columns: 1; } }

/* -- Touch: iOS zooms into fields under 16px on focus -- */
@media (pointer: coarse) { input, textarea, select { font-size: max(16px, 1em) !important; } }

/* -- Project view: a project is one chat (employees; admins can preview it) -----------
   Only what would make a second chat goes: the developer keeps every tool. */
body.simple #new-chat,
body.simple #search-toggle,
body.simple #search-wrap,
body.simple #sched-open,
body.simple .cwd-field,
body.simple #wt-row,
body.simple .foot .fork { display: none !important; }
body.simple .title { cursor: default; }
body.simple .title:hover { background: none; }
#sessions li.proj-row { padding: 8px 8px 8px 10px; }
#sessions li.proj-row .proj-ic { width: 16px; height: 16px; flex: none; color: var(--muted); }
#sessions li.proj-row.active .proj-ic { color: var(--accent); }
#sessions li.proj-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sessions li.proj-row .state { width: 15px; height: 15px; flex: none; }
#sessions li.proj-row.active .state-w { display: none; } /* its chat is on screen */
#sessions li.proj-row .state-w { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 11px; }
#sessions li.proj-row .state-w.a-input, #sessions li.proj-row .state-w.a-ask { color: var(--accent); }
#sessions li.proj-row .state-w.a-failed { color: var(--err); }
#sessions li.proj-row .state-w.a-done { color: var(--ok); }
#sessions li.proj-row .state.a-input, #sessions li.proj-row .state.a-ask { color: var(--accent); }
#sessions li.proj-row .state.a-failed { color: var(--err); }
#sessions li.proj-row .state.a-done { color: var(--ok); }
/* Admin looking as an employee: read-only, so no composer */
body.viewing #composer-wrap,
body.viewing #empty-after { display: none !important; }
#sessions li.view-as { cursor: default; background: var(--active); color: var(--text-2); margin-bottom: 6px; gap: 8px; }
#sessions li.view-as:hover { background: var(--active); }
#sessions li.view-as .proj-ic { color: var(--accent); }
#sessions li.view-as .t { white-space: normal; }
#sessions li.view-as .btn { flex: none; }

/* Admin: employees' Claude access. The manual way stays folded under the sign-in button. */
#ca-manual > summary { cursor: pointer; color: var(--muted); font-size: calc(13px * var(--fs)); }
#ca-manual > * + * { margin-top: 10px; }
#ca-manual > select, #ca-manual > input { width: 100%; }
#ca-step .row input { flex: 1; min-width: 0; }
#ca-link { color: inherit; text-decoration: none; }
