/* ============================================================================
   ShellBoard app mock — static recreation of the desktop UI.
   Fixed 1280×800 artboard (.sb-app), scaled to fit by app.js.
   All selectors scoped under `.shellboard`; own classes prefixed `sbm-`.
   Consumes the CSS custom properties + @keyframes sbBlink defined in shellboard.css.
   ============================================================================ */

.shellboard .sb-app {
  width: 1280px;
  height: 800px;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-0);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.45;
  position: relative;
  isolation: isolate;
}
.shellboard .sb-app--shadow-hero {
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 70px 140px -50px rgba(0,0,0,0.75), 0 30px 60px -20px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
}
.shellboard .sb-app--shadow-card {
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 40px 80px -36px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
}
.shellboard .sb-app .sbm-mono { font-family: var(--font-mono); }

/* ---- ghost button ---- */
.shellboard .sbm-ghostbtn {
  height: 26px; min-width: 26px; padding: 0 6px; border-radius: 5px; border: none;
  background: transparent; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10.5px;
}
.shellboard .sbm-ghostbtn svg { width: 13px; height: 13px; }

/* ---- top bar ---- */
.shellboard .sbm-topbar {
  height: 36px; background: var(--bg-1); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 12px; gap: 10px; flex: 0 0 auto;
}
.shellboard .sbm-traffic { display: flex; gap: 6px; }
.shellboard .sbm-traffic span { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line-strong); }
.shellboard .sbm-topbar__div { width: 1px; height: 14px; background: var(--line); }
.shellboard .sbm-topbar__name { font-size: 12px; font-weight: 600; color: var(--fg); }
.shellboard .sbm-topbar__slash { color: var(--faint); font-size: 12px; }
.shellboard .sbm-topbar__proj { font-size: 12px; color: var(--fg-2); }
.shellboard .sbm-spacer { flex: 1; }

/* ---- body split ---- */
.shellboard .sbm-body { flex: 1; display: flex; min-height: 0; position: relative; }
.shellboard .sbm-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg-2); }

/* ---- sidebar ---- */
.shellboard .sbm-sidebar { width: 240px; flex: 0 0 auto; border-right: 1px solid var(--line); background: var(--bg-1); display: flex; flex-direction: column; }
.shellboard .sbm-sb-head { height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--line-faint); }
.shellboard .sbm-sb-head__name { font-size: 13px; font-weight: 600; letter-spacing: -0.1px; }
.shellboard .sbm-sb-search { display: flex; align-items: center; gap: 6px; padding: 0 8px; height: 28px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px; color: var(--muted); margin: 10px 10px 6px; }
.shellboard .sbm-sb-search span { font-size: 12px; }
.shellboard .sbm-sb-list { flex: 1; padding: 2px 8px 8px; overflow: hidden; }
.shellboard .sbm-group { margin-bottom: 4px; }
.shellboard .sbm-group-head { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 6px; height: 26px; border-radius: 5px; color: var(--fg-2); }
.shellboard .sbm-group-head__chev { color: var(--muted); display: inline-flex; transition: transform .15s; }
.shellboard .sbm-group-head__chev.is-exp { transform: rotate(90deg); }
.shellboard .sbm-group-head__name { font-size: 12px; font-weight: 500; letter-spacing: -0.1px; }
.shellboard .sbm-group-head__count { font-size: 10.5px; color: var(--subtle); font-family: var(--font-mono); }
.shellboard .sbm-group-head__act { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.shellboard .sbm-ico-muted { color: var(--muted); display: inline-flex; }
.shellboard .sbm-proj { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 24px; height: 30px; border-radius: 6px; color: var(--fg-2); position: relative; }
.shellboard .sbm-proj--ungrouped { padding-left: 10px; }
.shellboard .sbm-proj.is-active { background: var(--bg-3); color: var(--fg); }
.shellboard .sbm-proj__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.shellboard .sbm-proj__name { font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shellboard .sbm-proj.is-active .sbm-proj__name { font-weight: 500; }
.shellboard .sbm-proj__act { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.shellboard .sbm-ungrouped { margin-top: 8px; border-top: 1px solid var(--line-faint); padding-top: 8px; }
.shellboard .sbm-sb-foot { border-top: 1px solid var(--line-faint); padding: 10px; display: flex; align-items: center; gap: 6px; }
.shellboard .sbm-sb-foot__new { flex: 1; justify-content: flex-start; gap: 8px; padding: 0 8px; font-size: 12px; height: 26px; }

/* ---- tab bar ---- */
.shellboard .sbm-tabbar { height: 40px; display: flex; align-items: center; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg-1); }
.shellboard .sbm-tab { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 12px; height: 28px; border-radius: 6px; color: var(--fg-2); border: 1px solid transparent; white-space: nowrap; flex: 0 0 auto; }
.shellboard .sbm-tab.is-active { background: var(--bg-2); color: var(--fg); border-color: var(--line-strong); box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset; }
.shellboard .sbm-tab__title { font-size: 12px; }
.shellboard .sbm-tab.is-active .sbm-tab__title { font-weight: 500; }
.shellboard .sbm-tab__act { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.shellboard .sbm-tab__bc { color: var(--accent); display: inline-flex; }
.shellboard .sbm-tab__x { color: var(--muted); display: inline-flex; margin-left: 2px; }

/* ---- splits ---- */
.shellboard .sbm-splits { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 0; background: var(--bg-0); }
.shellboard .sbm-splits-row { display: flex; gap: 8px; min-height: 0; }
.shellboard .sbm-splits-row--top { flex: 1.4; }
.shellboard .sbm-splits-row--bottom { flex: 1; }
.shellboard .sbm-pane { flex: 1; display: flex; flex-direction: column; background: var(--bg-2); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255,255,255,0.015) inset; min-height: 0; }
.shellboard .sbm-pane.is-focus { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft), 0 1px 0 rgba(255,255,255,0.025) inset; }
.shellboard .sbm-pane__head { height: 22px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid var(--line-faint); color: var(--muted); }
.shellboard .sbm-pane.is-focus .sbm-pane__head { color: var(--fg-2); background: rgba(139,125,247,0.04); }
.shellboard .sbm-pane__head .sbm-mono { font-size: 10.5px; }
.shellboard .sbm-pane__sep { color: var(--subtle); font-size: 10px; }
.shellboard .sbm-pane__cwd { color: var(--muted); }
.shellboard .sbm-pane__status { font-size: 10px; display: inline-flex; align-items: center; gap: 4px; }
.shellboard .sbm-pane__status--run { color: var(--green); }
.shellboard .sbm-pane__status--run .sbm-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.shellboard .sbm-pane__status--exit { color: var(--muted); }
.shellboard .sbm-pane__body { flex: 1; padding: 8px 12px; overflow: hidden; min-height: 0; }

/* ---- prompt / lines ---- */
.shellboard .sbm-prompt { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; height: 20px; white-space: nowrap; min-width: 0; }
.shellboard .sbm-seg { display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 1px 14px 1px 8px; font-size: 11px; font-weight: 500; color: #fff; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); }
.shellboard .sbm-seg svg { width: 10px; height: 10px; }
.shellboard .sbm-seg--end { clip-path: none; color: var(--fg-2); }
.shellboard .sbm-prompt__on { color: var(--muted); font-size: 10.5px; }
.shellboard .sbm-prompt__cmd { color: var(--fg-2); margin-left: 4px; overflow: hidden; text-overflow: ellipsis; }
.shellboard .sbm-prompt__time { display: inline-flex; align-items: center; gap: 4px; }
.shellboard .sbm-prompt__ok { color: var(--green); }
.shellboard .sbm-line { font-family: var(--font-mono); font-size: 12px; line-height: 1.5; white-space: pre; color: var(--fg-2); }
.shellboard .sbm-line .c-muted { color: var(--muted); }
.shellboard .sbm-line .c-fg { color: var(--fg); }
.shellboard .sbm-line .c-green { color: var(--green); }
.shellboard .sbm-line .c-cyan { color: var(--cyan); }
.shellboard .sbm-line .c-orange { color: var(--orange); }
.shellboard .sbm-line .c-blue { color: var(--blue); font-weight: 500; }
.shellboard .sbm-gap { height: 6px; }
.shellboard .sbm-caret { background: var(--accent); color: #fff; padding: 0 2px; }

/* ---- status bar ---- */
.shellboard .sbm-status { height: 28px; border-top: 1px solid var(--line); background: var(--bg-1); display: flex; align-items: center; gap: 10px; padding: 0 12px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); flex: 0 0 auto; }
.shellboard .sbm-status .sbm-pill { display: inline-flex; align-items: center; gap: 4px; }
.shellboard .sbm-status svg { width: 11px; height: 11px; }
.shellboard .sbm-status .sbm-sep { color: var(--faint); }
.shellboard .sbm-status .c-blue { color: var(--blue); }
.shellboard .sbm-status .c-green { color: var(--green); }
.shellboard .sbm-status .c-orange { color: var(--orange); }
.shellboard .sbm-status .c-subtle { color: var(--subtle); }

/* ---- overlays ---- */
.shellboard .sbm-backdrop { position: absolute; inset: 0; z-index: 30; background: rgba(8,9,12,0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; }
.shellboard .sbm-backdrop--palette { padding-top: 88px; }
.shellboard .sbm-backdrop--search { padding-top: 72px; }
.shellboard .sbm-ov { background: var(--bg-pop); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; display: flex; flex-direction: column; }
.shellboard .sbm-ov--palette { width: 620px; max-width: 92%; }
.shellboard .sbm-ov--search { width: 720px; max-width: 94%; max-height: calc(100% - 120px); }
.shellboard .sbm-ov__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-faint); }
.shellboard .sbm-ov__head svg { width: 15px; height: 15px; }
.shellboard .sbm-ov__q { font-size: 14px; color: var(--fg); }
.shellboard .sbm-ov__mark { background: var(--accent-soft); color: var(--accent-strong); border-radius: 3px; padding: 0 2px; }
.shellboard .sbm-ov__cursor { width: 1.5px; height: 16px; background: var(--accent); animation: sbBlink 1.1s steps(2) infinite; }
.shellboard .sbm-ov__count { font-size: 11px; color: var(--muted); }
.shellboard .sbm-ov__body { overflow: hidden; padding: 4px 0; }
.shellboard .sbm-ov--search .sbm-ov__body { padding: 6px 0 10px; }
.shellboard .sbm-ov__label { padding: 8px 18px 4px; font-size: 10px; color: var(--subtle); font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; }
.shellboard .sbm-ov__foot { height: 32px; border-top: 1px solid var(--line-faint); padding: 0 14px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.shellboard .sbm-ov__foot span { display: inline-flex; align-items: center; gap: 6px; }
.shellboard .sbm-kbd { font-family: var(--font-mono); font-size: 10px; padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--bg-3); color: var(--muted); min-width: 16px; text-align: center; }

.shellboard .sbm-row { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 36px; border-radius: 6px; color: var(--fg); margin: 0 6px; }
.shellboard .sbm-row.is-active { background: var(--bg-3); }
.shellboard .sbm-row__sq { width: 14px; height: 14px; border-radius: 4px; flex: 0 0 auto; }
.shellboard .sbm-row__ico { color: var(--muted); display: inline-flex; }
.shellboard .sbm-row.is-active .sbm-row__ico { color: var(--fg-2); }
.shellboard .sbm-row__title { font-size: 13px; }
.shellboard .sbm-row__hint { color: var(--muted); font-size: 12px; }
.shellboard .sbm-row__group { font-size: 10.5px; color: var(--subtle); letter-spacing: 0.4px; text-transform: uppercase; }
.shellboard .sbm-row__kbd { display: inline-flex; gap: 3px; }

.shellboard .sbm-match { padding: 10px 14px; border-radius: 8px; margin: 0 6px; display: flex; flex-direction: column; gap: 4px; }
.shellboard .sbm-match.is-active { background: var(--bg-3); }
.shellboard .sbm-match__top { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.shellboard .sbm-match__dot { width: 7px; height: 7px; border-radius: 50%; }
.shellboard .sbm-match__proj { color: var(--fg-2); }
.shellboard .sbm-match__chev { color: var(--faint); }
.shellboard .sbm-match__time { font-family: var(--font-mono); color: var(--subtle); font-size: 10.5px; }
.shellboard .sbm-match__snip { font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shellboard .sbm-match__snip mark { background: var(--accent-soft); color: var(--accent-strong); padding: 1px 3px; border-radius: 3px; }
