/* Calm, warm-neutral look in the spirit of Claude Code / Codex: quiet surfaces, thin lines, one accent. */
:root {
  --bg: #262624; --side: #1f1e1d; --surface: #2c2c2a; --hover: #343431; --line: #3a3936; --fg: #f3f1ea; --mut: #a6a39a; --faint: #77756e;
  --acc: #d97757; --acc-soft: rgba(217, 119, 87, .14); --ok: #6cbf8a; --ok-soft: rgba(108, 191, 138, .13);
  --warn: #e2ad4d; --warn-soft: rgba(226, 173, 77, .13); --bad: #e8705f; --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #faf9f5; --side: #f1efe8; --surface: #ffffff; --hover: #ecebe3; --line: #e4e1d6; --fg: #1f1e1d; --mut: #6b6a63; --faint: #9b998f;
    --acc: #c4613f; --acc-soft: rgba(196, 97, 63, .1); --ok: #2f8a55; --ok-soft: rgba(47, 138, 85, .1); --warn: #a46d0f; --warn-soft: rgba(226, 173, 77, .18); --bad: #c84a3a; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.muted { color: var(--mut); } .small { font-size: 12.5px; } .err { color: var(--bad); min-height: 1.2em; font-size: 13px; } .warn { color: var(--warn); }
.ok { color: var(--ok); } .no { color: var(--mut); }
a { color: var(--fg); text-underline-offset: 2px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; margin: 0; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
code { word-break: break-all; }
.row { display: flex; align-items: center; } .between { justify-content: space-between; } .gap { gap: 8px; } .wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 8px; }

/* controls */
button, a.button { font: inherit; font-size: 13.5px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--fg); padding: 7px 12px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background .12s, border-color .12s; }
button:hover, a.button:hover { background: var(--hover); }
button.primary, a.button.primary { background: var(--fg); border-color: var(--fg); color: var(--bg); font-weight: 600; }
button.primary:hover, a.button.primary:hover { opacity: .9; background: var(--fg); }
button.sm { padding: 5px 10px; font-size: 13px; }
button.danger { color: var(--bad); }
button.link { border: 0; background: none; color: var(--mut); padding: 0; font-size: 13px; }
button.link:hover { color: var(--fg); background: none; }
button:disabled { opacity: .45; cursor: default; }
.icon-btn { border: 0; width: 28px; height: 28px; padding: 0; justify-content: center; color: var(--mut); font-size: 16px; }
.icon-btn:hover { color: var(--fg); }
input, textarea, select { font: inherit; font-size: 14px; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, textarea:focus, select:focus { outline: none; border-color: color-mix(in srgb, var(--acc) 60%, var(--line)); box-shadow: 0 0 0 3px var(--acc-soft); }
select { width: auto; padding: 5px 8px; font-size: 13px; }
label { display: block; font-size: 12.5px; font-weight: 600; margin: 12px 0 5px; color: var(--mut); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* brand */
.brand { font-weight: 650; display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.logo { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--acc); color: #fff; font-size: 13px; }

/* sign-in */
.screen { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { font-size: 26px; margin: 28px 0 6px; font-family: ui-serif, Georgia, serif; font-weight: 500; }
.login-card button { width: 100%; justify-content: center; margin-top: 14px; padding: 9px; }

/* layout */
#app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 12px; }
.side-label { font-size: 11.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 6px 6px 4px; }
.side-label .icon-btn { width: 22px; height: 22px; font-size: 16px; }
.pc-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.pc { display: grid; grid-template-columns: 10px 1fr auto; gap: 2px 10px; align-items: center; text-align: left; border: 0; padding: 8px 8px; border-radius: 8px; width: 100%; }
.pc .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.pc .sp { grid-column: 2 / 4; font-size: 12px; color: var(--faint); }
.pc .stt { font-size: 12px; color: var(--mut); }
.pc.on { background: var(--hover); }
.sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.sdot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); } .sdot.busy { background: var(--warn); }
#tabs { display: flex; flex-direction: column; gap: 1px; border-top: 1px solid var(--line); padding-top: 10px; }
#tabs button { border: 0; color: var(--mut); padding: 7px 8px; width: 100%; justify-content: flex-start; gap: 10px; }
#tabs button:hover { color: var(--fg); }
#tabs button.on { color: var(--fg); background: var(--hover); font-weight: 600; }
#tabs svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#tabs .count { margin-left: auto; font-size: 11.5px; background: var(--acc-soft); color: var(--acc); border-radius: 99px; padding: 0 7px; font-weight: 600; }
.side-foot { margin-top: auto; padding: 10px 8px 2px; }
.main-wrap { min-width: 0; }
header.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 28px; min-height: 52px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; flex: 1; }
.crumbs .crumb-pc { color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs .sep { color: var(--faint); }
#page-title { font-weight: 600; }
.power { display: flex; align-items: center; gap: 10px; }
.pill { font-size: 12.5px; color: var(--mut); display: inline-flex; align-items: center; gap: 6px; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on { color: var(--ok); } .pill.busy { color: var(--warn); }
main { max-width: 1040px; padding: 24px 28px 60px; }
.only-mobile { display: none !important; }

/* shared blocks */
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rows > * + * { border-top: 1px solid var(--line); }
.rows > .empty { padding: 18px 16px; color: var(--mut); font-size: 13.5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.hint { color: var(--faint); font-size: 12.5px; margin: 10px 2px 0; }
.note { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); font-size: 13px; margin: 0 0 12px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 6px 0 10px; }
.sec-head h3 { font-size: 15px; } .sec-head p { margin: 3px 0 0; max-width: 620px; }
.sec-head + .panel { margin-bottom: 30px; }
.tag { font-family: var(--mono); font-size: 11.5px; padding: 0 6px; border-radius: 5px; background: var(--hover); color: var(--mut); }
.tag.live { color: var(--ok); background: var(--ok-soft); font-family: inherit; }

/* overview */
.ov-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ov-head h2 { font-size: 24px; font-family: ui-serif, Georgia, serif; font-weight: 500; }
.ov-head .muted { margin-top: 4px; }
.steps { list-style: none; margin: 0; padding: 4px 0; }
.steps li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; }
.steps .n { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--faint); display: grid; place-items: center; font-size: 11px; color: var(--mut); }
.steps li.done .n { border-color: var(--ok); background: var(--ok); color: var(--bg); }
.steps li.done .t { color: var(--mut); text-decoration: line-through; text-decoration-color: var(--faint); }
.steps .d { font-size: 12.5px; color: var(--faint); }
.mi { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 13.5px; min-width: 0; }
.mi .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi time { color: var(--faint); font-size: 12px; flex: none; }

/* screen + terminal */
.banner { font-size: 13px; color: var(--mut); display: inline-flex; align-items: center; gap: 8px; }
.banner::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.banner.ai::before { background: var(--acc); } .banner.me::before { background: var(--ok); }
.banner.ai, .banner.me { color: var(--fg); }
.desk-frame { position: relative; aspect-ratio: 16 / 10; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.desk-frame iframe, .term-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.desk-off { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 20px; color: #bbb; background: #141413; }
.desk-off p { margin: 3px 0; }
.desk-cover { position: absolute; inset: 0; background: transparent; border: 0; border-radius: 0; padding: 0 0 14px; display: flex; align-items: flex-end; justify-content: center; }
.desk-cover span { background: rgba(20,20,19,.88); color: #f3f1ea; padding: 7px 14px; border-radius: 99px; font-size: 13px; }
.desk-cover:hover { background: rgba(0,0,0,.1); }
.term-frame { position: relative; height: min(72vh, 680px); background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.app-dot { width: 8px; height: 8px; border-radius: 50%; } .app-dot.claude { background: #d97757; } .app-dot.codex { background: #9aa0a6; }

/* AIs */
.row-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 12px 16px; }
.ri-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ri-title { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ri-sub { font-size: 12.5px; color: var(--mut); }
.ri-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-item > .flow, .row-item > .perm-box { grid-column: 1 / -1; }
.app-ico { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 15px; font-weight: 700; background: var(--hover); color: var(--fg); }
.app-ico.claude { background: #d97757; color: #fff; } .app-ico.codex { background: #f3f1ea; color: #1f1e1d; } .app-ico.google { background: #fff; color: #4285f4; border: 1px solid var(--line); }
.app-ico.chatgpt { background: #10a37f; color: #fff; } .app-ico.grok { background: #000; color: #fff; border: 1px solid var(--line); } .app-ico.other { background: var(--acc-soft); color: var(--acc); }
.flow { padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 13.5px; }
.flow ol { margin: 0; padding-left: 18px; } .flow li { margin: 6px 0; }
.flow .bigcode { font: 700 20px var(--mono); letter-spacing: 2px; }
.flow pre { white-space: pre-wrap; margin: 6px 0 0; color: var(--mut); }
.flow .row input { flex: 1; min-width: 0; }
.perm-box { padding: 4px 0 2px; }
.perm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.perm { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 400; margin: 0; color: var(--fg); font-size: 13px; }
.perm input { width: auto; margin-top: 3px; accent-color: var(--acc); }
.perm span { display: block; font-size: 12px; color: var(--mut); }
.perm.on { border-color: color-mix(in srgb, var(--acc) 50%, var(--line)); background: var(--acc-soft); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.copy { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px 7px 10px; margin-top: 6px; }
.copy code { flex: 1; white-space: pre-wrap; } .copy button { padding: 3px 9px; font-size: 12.5px; }

/* dialogs + drawer */
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--fg); padding: 0; width: min(620px, calc(100% - 24px)); max-height: calc(100vh - 40px); }
dialog::backdrop { background: rgba(0,0,0,.45); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dlg-body { padding: 16px 18px 20px; overflow-y: auto; }
.apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.app { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 12px; border-radius: 10px; white-space: normal; }
.app .app-ico { margin-bottom: 6px; } .app b { font-size: 14px; } .app span:last-child { font-size: 12px; color: var(--mut); }
.guide-steps { counter-reset: s; list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; }
.guide-steps > li { counter-increment: s; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; font-size: 13.5px; }
.guide-steps > li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12px; border: 1px solid var(--line); color: var(--mut); }
.wait { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 13.5px; display: flex; gap: 10px; align-items: center; }
.wait.ok { background: var(--ok-soft); border-color: transparent; }
.wait:empty { display: none; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--acc); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
summary { cursor: pointer; font-size: 13px; color: var(--mut); }
.sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.size { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 10px; white-space: normal; text-align: left; }
.size b { font-size: 14px; } .size span { font-size: 12px; color: var(--mut); }
.size.on { border-color: var(--fg); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); z-index: 30; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: -20px 0 40px rgba(0,0,0,.25); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 18px; overflow-y: auto; }
.drawer-body h2 { font-size: 18px; line-height: 1.35; }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; align-items: center; margin: 16px 0; font-size: 13px; }
.kv > span:nth-child(odd) { color: var(--mut); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg button { padding: 3px 9px; font-size: 12.5px; border-radius: 99px; }
.seg button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.st-pick { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.st-pick select { width: auto; padding: 4px 8px; font-size: 13px; }
.ov-head h2 .link { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 13px; font-weight: 400; vertical-align: middle; }
.desc { white-space: pre-wrap; font-size: 13.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.timeline { margin-top: 8px; }
.tl { display: grid; grid-template-columns: 16px 1fr; gap: 10px; padding: 8px 0; font-size: 13.5px; }
.tl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); margin: 7px 0 0 4px; }
.tl .who { font-weight: 600; } .tl .when { color: var(--faint); font-size: 12px; margin-left: 6px; }
.tl .txt { white-space: pre-wrap; word-break: break-word; color: var(--mut); margin-top: 2px; }

/* tasks */
.composer { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 12px 12px 10px; margin-bottom: 18px; }
.composer:focus-within { border-color: color-mix(in srgb, var(--acc) 50%, var(--line)); box-shadow: 0 0 0 3px var(--acc-soft); }
.composer textarea { border: 0; background: transparent; padding: 4px 4px 8px; resize: none; font-size: 15px; box-shadow: none !important; }
.composer-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.composer-bar .pick { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 13px; color: var(--mut); }
.composer-bar .muted { flex: 1; }
.filters { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.filters button { border: 0; color: var(--mut); padding: 5px 10px; font-size: 13px; }
.filters button.on { color: var(--fg); background: var(--hover); font-weight: 600; }
.filters .c { color: var(--faint); font-weight: 400; margin-left: 2px; }
.task-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 11px 16px; cursor: pointer; border: 0; border-radius: 0; width: 100%; text-align: left; background: none; }
.task-row:hover { background: var(--hover); }
.rows > .task-row:first-child { border-radius: 12px 12px 0 0; } .rows > .task-row:last-child { border-radius: 0 0 12px 12px; } .rows > .task-row:only-child { border-radius: 12px; }
.task-row .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.task-row time { color: var(--faint); font-size: 12px; }
.sti { width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid var(--faint); display: inline-block; flex: none; }
.sti.doing { border-color: var(--acc); border-right-color: transparent; animation: spin 1.4s linear infinite; }
.sti.review { border-color: var(--acc); background: var(--acc); box-shadow: inset 0 0 0 2.5px var(--surface); }
.sti.blocked { border-color: var(--warn); background: var(--warn); box-shadow: inset 0 0 0 2.5px var(--surface); }
.sti.done { border-color: var(--ok); background: var(--ok); }
.who-chip { font-size: 12px; color: var(--mut); display: inline-flex; align-items: center; gap: 6px; }

/* activity */
.act { display: grid; grid-template-columns: 52px 130px minmax(0, 1fr); gap: 12px; padding: 8px 16px; font-size: 13px; align-items: baseline; }
.act time { color: var(--faint); font-size: 12px; font-family: var(--mono); } .act .sum { word-break: break-word; } .act .sum.err { color: var(--bad); }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 9px 16px; border-radius: 10px; font-size: 13.5px; z-index: 50; max-width: calc(100% - 32px); }

@media (max-width: 860px) {
  .composer-bar #nt-hint { display: none; }
  .composer-bar .pick { flex: 1; min-width: 0; } .composer-bar .pick select { min-width: 0; flex: 1; }
  #app { grid-template-columns: minmax(0, 1fr); }
  .only-mobile { display: inline-flex !important; }
  .scrim.only-mobile { display: block !important; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 39; }
  .scrim.hidden { display: none !important; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .18s ease; }
  .side.open { transform: none; }
  header.top { padding: 8px 12px; }
  main { padding: 16px 14px 50px; }
  .grid2, .perm-list { grid-template-columns: 1fr; }
  .apps, .sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-item { grid-template-columns: minmax(0, 1fr); }
  .ri-acts { justify-content: flex-start; }
  .task-row { grid-template-columns: 18px minmax(0, 1fr) auto; }
  .task-row .who-chip { display: none; }
  .act { grid-template-columns: 46px minmax(0, 1fr); } .act .who { grid-column: 2; } .act .sum { grid-column: 1 / -1; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .ov-head h2 { font-size: 21px; }
}
#pc-plan { margin-top: 12px; }
.link.danger-link { color: var(--bad); margin-left: 4px; }
/* typing box under the screen */
.typer { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.typer input#ty-text { flex: 1; min-width: 0; }
.typer input.secret { -webkit-text-security: disc; }
.ty-enter { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 400; font-size: 13px; color: var(--mut); white-space: nowrap; }
.ty-enter input { width: auto; margin: 0; }
.keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.site-open { margin: 8px 0 28px; }
.site-open input { flex: 1; min-width: 0; }
.app-ico.site { background: var(--hover); color: var(--fg); font-weight: 600; }

/* automations */
.auto-row { cursor: pointer; }
.auto-row:hover { background: var(--hover); }
.rows > .auto-row:first-child { border-radius: 12px 12px 0 0; } .rows > .auto-row:last-child { border-radius: 0 0 12px 12px; } .rows > .auto-row:only-child { border-radius: 12px; }
.auto-row.off .ri-title { color: var(--mut); }
.switch { position: relative; width: 34px; height: 20px; border-radius: 99px; background: var(--line); border: 0; padding: 0; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); transition: left .15s; }
.switch.on { background: var(--ok); } .switch.on::after { left: 17px; }
.switch:hover { background: var(--faint); } .switch.on:hover { background: var(--ok); opacity: .9; }
.res { display: inline-flex; align-items: center; gap: 6px; }
.templates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: -6px 0 28px; }
.templates:empty { display: none; }
.tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; white-space: normal; padding: 12px; border-radius: 10px; }
.tpl b { font-size: 13.5px; } .tpl span { font-size: 12px; color: var(--mut); }
.ad-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.ad-grid select { width: 100%; padding: 8px 10px; font-size: 14px; }
#ad-instr { resize: vertical; }
.run { padding: 10px 0; border-top: 1px solid var(--line); }
.run-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.run-head .grow { flex: 1; }
.run .txt { white-space: pre-wrap; word-break: break-word; color: var(--mut); font-size: 13px; margin-top: 6px; max-height: 220px; overflow: auto; }
@media (max-width: 860px) { .templates, .ad-grid { grid-template-columns: 1fr; } }
code.nw { white-space: nowrap; }
/* Connections page: groups (AIs / Accounts / Company systems) and the "what do you want to connect" picker */
.grp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 26px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.sec-head + .grp-head { margin-top: 8px; }
.grp-head h4 { font-size: 14px; font-weight: 600; margin: 0; }
.grp-head p { margin: 3px 0 0; max-width: 620px; }
.grp-head + .panel { margin-bottom: 0; }
.panel.rows + .panel.rows { margin-top: 8px; }
.panel.rows:empty { display: none; }
.empty.row { justify-content: space-between; flex-wrap: wrap; text-align: left; }
.tag.ok-tag { color: var(--ok); background: var(--ok-soft); font-family: inherit; }
.kind-grp + .kind-grp { margin-top: 16px; }
.kind-label { font-size: 12.5px; font-weight: 600; color: var(--mut); margin: 0 0 8px; }
#cd-flow .panel.rows { margin: 10px 0; }
#cd-back { margin-bottom: 10px; }
.side-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.side-foot #btn-logout-all { font-size: 12px; opacity: .75; }
#login-with { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; } #login-with:empty { display: none; }
#login-with .button { width: 100%; justify-content: center; padding: 9px; }
