/* Left sidebar: workspaces, sessions, profile menu. */
/* left sidebar */
.side { background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.side-head { padding: 14px 14px 10px; display: flex; align-items: center; gap: 8px; }
.brand { font-weight: 700; font-size: 15px; flex: 1; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.search { padding: 0 14px 8px; }
.search input { flex: 1; min-width: 0; width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.sessions { overflow-y: auto; flex: 1; padding: 4px 8px 8px; }
.sess { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 6px 8px 10px; border-radius: 8px; margin-bottom: 1px; cursor: pointer; }
.sess:hover { background: var(--panel-2); }
.sess.active { background: var(--user-bg); }
.sess .txt { flex: 1; min-width: 0; }
.sess .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.sess .m { color: var(--muted); font-size: 12px; }
.sess .icon-btn { opacity: 0; }
.sess:hover .icon-btn, .sess.menu-open .icon-btn { opacity: 1; }
@media (hover: none) { .sess .icon-btn { opacity: 1; } }
.search { display: flex; gap: 4px; align-items: center; }
.new-row { display: flex; gap: 6px; padding: 2px 14px 8px; }
.new-row .btn { flex: 1 1 auto; justify-content: center; padding: 6px 7px; gap: 5px; font-size: 12.5px; }
.new-row .btn .i { width: 14px; height: 14px; }
.folder-head { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 6px; border-radius: 8px; cursor: pointer; margin-top: 2px; font-weight: 600; font-size: 13px; color: var(--muted); user-select: none; }
.folder-head:hover, .folder-head.menu-open { background: var(--panel-2); color: var(--text); }
.folder-head .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-head .cnt { font-size: 11.5px; font-weight: 500; }
.folder-head .icon-btn { opacity: 0; width: 22px; height: 22px; }
.folder-head:hover .icon-btn, .folder-head.menu-open .icon-btn { opacity: 1; }
@media (hover: none) { .folder-head .icon-btn { opacity: 1; } }
.grp { padding-left: 12px; }
.folder-head.current .nm { color: var(--text); }
.folder-head [data-wnew] { opacity: 0; width: 22px; height: 22px; }
.folder-head:hover [data-wnew] { opacity: 1; }
@media (hover: none) { .folder-head [data-wnew] { opacity: 1; } }
.ws-empty { display: flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-size: 12.5px; padding: 6px 10px; border-radius: 8px; width: 100%; }
.ws-empty:hover { background: var(--panel-2); color: var(--text); }
.empty-side { color: var(--muted); font-size: 12.5px; padding: 14px 10px; line-height: 1.6; }
.empty-side b { color: var(--text); }
.empty-side .btn { margin-top: 10px; }
.crumb { color: var(--muted); font-weight: 500; }
.crumb-sep { color: var(--muted); margin: 0 6px; font-weight: 400; }
.ws-name { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-on { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-soft) !important; }
.activity { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.act { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.act b { color: var(--text); font-weight: 600; flex: none; }
.act span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "JetBrains Mono", monospace; font-size: 12px; }
.act .ok { color: var(--ok); } .act .bad { color: var(--err); }
.mini-spin { width: 10px; height: 10px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: rot .8s linear infinite; flex: none; }
@keyframes rot { to { transform: rotate(360deg); } }
.cursor::after { content: "▍"; color: var(--accent); animation: pulse .8s infinite alternate; margin-left: 1px; }
.badge.cancelled { color: var(--muted); }
.btn.stop { background: var(--panel); border-color: var(--err); color: var(--err); font-weight: 600; }
.conn { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.conn.on { background: var(--ok); } .conn.off { background: var(--err); }
.spin { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; animation: pulse 1s infinite alternate; }
@keyframes pulse { from { opacity: .3 } to { opacity: 1 } }
.section-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.section-head b { flex: 1; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.uw { margin-bottom: 8px; }
.uw-top { display: flex; justify-content: space-between; font-size: 12.5px; }
.uw-top span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin: 4px 0 2px; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--ok); transition: width .3s; }
.bar > i.warn { background: var(--warn); } .bar > i.err { background: var(--err); }
.note { color: var(--muted); font-size: 11.5px; }
.profile-wrap { position: relative; padding: 8px; border-top: 1px solid var(--border); }
.profile { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 7px 8px; border-radius: 10px; text-align: left; }
.profile:hover, .profile[aria-expanded="true"] { background: var(--panel-2); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex: none; }
.avatar.lg { width: 34px; height: 34px; font-size: 14px; }
.pf-name { font-weight: 600; font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-plan { color: var(--muted); font-size: 12px; flex: none; }
.pf-plan:not(:empty)::before { content: "· "; }
.pf-usage { margin-left: auto; width: 28px; height: 4px; border-radius: 99px; background: var(--panel-2); overflow: hidden; flex: none; }
.pf-usage:empty { display: none; }
.pf-usage i { display: block; height: 100%; background: var(--ok); }
.pf-usage i.warn { background: var(--warn); } .pf-usage i.err { background: var(--err); }
.pf-chev { color: var(--muted); flex: none; transition: transform .15s; }
.pf-usage:empty + .pf-chev { margin-left: auto; }
.profile[aria-expanded="true"] .pf-chev { transform: rotate(180deg); }
.pmenu { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 4px); background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--menu-shadow); padding: 6px; display: none; z-index: 30; max-height: calc(100vh - 90px); overflow-y: auto; }
.pmenu.open { display: block; }
.pm-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 6px; }
.pm-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-sep { height: 1px; background: var(--border); margin: 6px 2px; }
.pm-usage { padding: 4px 8px 2px; }
.pm-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; text-align: left; color: inherit; text-decoration: none; }
.pm-item:hover, .pm-item:focus-visible { background: var(--panel-2); outline: none; }
.pm-item .i { color: var(--muted); }
.pm-meta { margin-left: auto; color: var(--muted); font-size: 12px; }
.pm-ext { margin-left: auto; width: 14px; height: 14px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); } .pill.warn { color: var(--warn); } .pill.err { color: var(--err); } .pill.off { color: var(--muted); }
.conn-detail { display: flex; flex-direction: column; gap: 12px; padding: 16px; overflow-y: auto; min-height: 0; }
.conn-detail .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tool-list { border: 1px solid var(--border); border-radius: 8px; max-height: 260px; overflow-y: auto; }
.tool-list div { padding: 7px 10px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.tool-list div:last-child { border-bottom: 0; }
.tool-list b { font-family: "JetBrains Mono", monospace; font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .full { grid-column: 1 / -1; }
.field select { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.field .hint { font-weight: 400; color: var(--muted); font-size: 11.5px; margin-top: 3px; display: block; }
details.adv summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.err-box { border: 1px solid var(--err); color: var(--err); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
