/* BioStudio AI — BioStudioAI 2 theme.
   Activated when #os carries the `theme-bs2` marker class (and <body> for
   popups rendered outside #os). A clean, light-first workspace: soft paper
   surfaces, a blue accent, gentle shadows and a bright dashboard home
   (js/core/bs2-dashboard.js) in place of the icon desktop. Scoped entirely
   under .theme-bs2 so the other themes are untouched. */

/* ---- Design tokens ---- */
body.theme-bs2,
#os.theme-bs2 {
  --bs2-blue: #2f6bff;
  --bs2-blue-strong: #1d4ed8;
  --bs2-cyan: #22b0e0;
  --bs2-blue-soft: #eaf1ff;
  --bs2-ink: #1b2540;
  --bs2-ink-soft: #64708c;
  --bs2-paper: #ffffff;
  --bs2-canvas: #f4f6fb;
  --bs2-line: #e6eaf2;
  --bs2-line-soft: #eef1f7;
  --bs2-shadow: 0 1px 2px rgba(16, 24, 48, 0.06), 0 8px 24px rgba(16, 24, 48, 0.06);
  --bs2-shadow-lg: 0 12px 40px rgba(16, 24, 48, 0.12);
  --radius: 14px;
  --radius-sm: 10px;

  --ink: var(--bs2-ink);
  --ink-soft: var(--bs2-ink-soft);
  --accent: var(--bs2-blue);
  --accent-soft: var(--bs2-blue-soft);
  --accent-ink: #ffffff;

  /* taller band so the floating dock taskbar has air around it */
  --taskbar-h: 72px;
  --taskbar-clearance: calc(var(--taskbar-h) + 10px);

  /* window + flyout chrome consumed by window.css / flyouts.css */
  --win-bg: rgba(255, 255, 255, 0.98);
  --win-body-bg: #ffffff;
  --win-border: var(--bs2-line);
  --win-border-focus: var(--bs2-blue);
  --win-shadow: var(--bs2-shadow-lg);
  --win-shadow-focus: var(--bs2-shadow-lg), 0 0 0 1px rgba(47, 107, 255, 0.28);
  --titlebar-bg: #fbfcfe;
  --flyout-bg: #ffffff;
  --flyout-border: var(--bs2-line);
  --tile-bg: #f4f6fb;
  --tile-hover: var(--bs2-blue-soft);
  --input-bg: #ffffff;
  --input-border: #d8def0;
  --win-hover-bg: var(--bs2-blue-soft);

  /* shared app + settings aliases (apps.css, app-color-themes.css) */
  --surface: var(--win-body-bg);
  --surface-2: var(--bs2-canvas);
  --surface-3: var(--bs2-line-soft);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --faint: #8b95ad;
  --border: var(--bs2-line);
  --line: var(--bs2-line);
  --bg: var(--bs2-canvas);
  --hover: var(--bs2-blue-soft);
  --primary: var(--bs2-blue);
  --primary-strong: var(--bs2-blue-strong);
  --primary-soft: var(--bs2-blue-soft);
  --on-primary: #ffffff;
  --success: #059669;
  --success-strong: #047857;
  --success-soft: #e7f7f0;
  --warning: #d97706;
  --warning-soft: #fef1dc;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --tech-cyan: var(--bs2-cyan);
  --tech-blue: var(--bs2-blue);
  --tech-violet: #4c6fff;
  --control-bg: var(--bs2-canvas);
  --control-line: var(--input-border);
  --glass-bg: rgba(255, 255, 255, 0.92);
  --modal-scrim: rgba(20, 28, 52, 0.32);
  --shadow: var(--bs2-shadow-lg);
  --shadow-sm: var(--bs2-shadow);
  --menu-bg: var(--bs2-paper);
  --menu-border: var(--bs2-line);
  --menu-hover: var(--bs2-blue-soft);

  --taskbar-bg: rgba(255, 255, 255, 0.94);
  --taskbar-border: var(--bs2-line);
  --tb-hover: var(--bs2-blue-soft);
  --tb-active: #dfe8ff;
  --app-btn-hover: rgba(16, 24, 48, 0.06);
  --app-bar: var(--bs2-paper);
  --app-line: var(--bs2-line);
  --app-btn: var(--bs2-paper);
  --app-input: var(--input-bg);
  --app-bg: var(--bs2-canvas);

  /* White app-color palette reads --mono-* when set; otherwise it falls
     back to scientific teal #0f766e. Point those fallbacks at BS2 blue so
     default chrome stays paper-and-blue. Other picker swatches stay as-is. */
  --mono-bg: var(--bs2-canvas);
  --mono-surface: var(--bs2-paper);
  --mono-surface-2: var(--bs2-canvas);
  --mono-surface-3: var(--bs2-line-soft);
  --mono-ink: var(--bs2-ink);
  --mono-ink-soft: var(--bs2-ink-soft);
  --mono-faint: var(--faint);
  --mono-line: var(--bs2-line);
  --mono-primary: var(--bs2-blue);
  --mono-primary-strong: var(--bs2-blue-strong);
  --mono-primary-soft: var(--bs2-blue-soft);
  --mono-accent: var(--bs2-blue);
  --mono-accent-soft: var(--bs2-blue-soft);
  --mono-accent-ink: #ffffff;
  --mono-control-bg: var(--bs2-canvas);
  --mono-control-line: var(--input-border);
  --mono-glass: var(--glass-bg);
  --mono-shadow: var(--bs2-shadow);
  --mono-shadow-lg: var(--bs2-shadow-lg);
  --mono-scrim: var(--modal-scrim);
  --mono-hover: var(--bs2-blue-soft);
  --mono-win-border: var(--bs2-line);
  --mono-tech: var(--bs2-cyan);
  --mono-tech-2: var(--tech-violet);
  --mono-plot-grid: var(--bs2-line);

  color-scheme: light;
  color: var(--ink);
}

/* ---- Wallpaper ---- */
#os.wp-bs2 {
  background:
    radial-gradient(1100px 700px at 82% -8%, rgba(47, 107, 255, 0.1), transparent 60%),
    radial-gradient(900px 620px at 4% 108%, rgba(20, 184, 166, 0.08), transparent 60%),
    linear-gradient(180deg, #f6f8fc 0%, #eef2f9 100%);
}

/* Optional dark appearance (rail toggle) keeps the same blue identity. */
body.theme-bs2.dark,
body.dark.theme-bs2,
#os.theme-bs2.dark {
  --bs2-ink: #e8ecf6;
  --bs2-ink-soft: #9aa6c2;
  --bs2-paper: #141a2c;
  --bs2-canvas: #0d1220;
  --bs2-line: #263049;
  --bs2-line-soft: #1e2740;
  --bs2-blue-soft: rgba(47, 107, 255, 0.16);
  --bs2-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --bs2-shadow-lg: 0 14px 44px rgba(0, 0, 0, 0.5);
  --win-bg: rgba(20, 26, 44, 0.98);
  --win-body-bg: #141a2c;
  --titlebar-bg: #131829;
  --flyout-bg: #141a2c;
  --tile-bg: #1a2136;
  --input-bg: #101524;
  --input-border: #2a3550;
  --faint: #7b86a3;
  --success-soft: rgba(16, 185, 129, 0.16);
  --warning-soft: rgba(217, 119, 6, 0.18);
  --danger-soft: rgba(220, 38, 38, 0.16);
  --glass-bg: rgba(20, 26, 44, 0.92);
  --modal-scrim: rgba(4, 8, 18, 0.55);
  --taskbar-bg: rgba(20, 26, 44, 0.94);
  --tb-hover: var(--bs2-blue-soft);
  --tb-active: rgba(47, 107, 255, 0.22);
  --app-btn-hover: rgba(255, 255, 255, 0.08);
  --mono-bg: var(--bs2-canvas);
  --mono-surface: var(--bs2-paper);
  --mono-surface-2: var(--titlebar-bg);
  --mono-surface-3: var(--bs2-line-soft);
  --mono-ink: var(--bs2-ink);
  --mono-ink-soft: var(--bs2-ink-soft);
  --mono-faint: var(--faint);
  --mono-line: var(--bs2-line);
  --mono-primary: var(--bs2-blue);
  --mono-primary-strong: var(--bs2-blue-strong);
  --mono-primary-soft: var(--bs2-blue-soft);
  --mono-accent: var(--bs2-blue);
  --mono-accent-soft: var(--bs2-blue-soft);
  --mono-control-bg: var(--input-bg);
  --mono-control-line: var(--input-border);
  --mono-glass: var(--glass-bg);
  --mono-shadow: var(--bs2-shadow);
  --mono-shadow-lg: var(--bs2-shadow-lg);
  --mono-scrim: var(--modal-scrim);
  --mono-hover: var(--bs2-blue-soft);
  --mono-win-border: var(--bs2-line);
  color-scheme: dark;
}
#os.wp-bs2.dark {
  background:
    radial-gradient(1100px 700px at 82% -8%, rgba(47, 107, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #0c1120 0%, #0a0e1a 100%);
}

/* ====================================================================== */
/* Dashboard home                                                          */
/* ====================================================================== */
#os.theme-bs2 .desktop-icons,
#os.theme-bs2 .desktop-widgets { display: none; }

.bs2-home {
  position: absolute;
  /* The parent desktop surface already represents the live taskbar work area. */
  inset: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  font-feature-settings: "cv02", "cv03";
}

/* ---- Left rail --------------------------------------------------------- */
.bs2-rail {
  flex: none;
  width: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 10px;
  background: var(--bs2-paper);
  border-right: 1px solid var(--bs2-line);
  z-index: 3;
}
.bs2-rail-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 22px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #2f6bff, #22b0e0);
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.35);
}
.bs2-rail-items { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.bs2-rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 11px 4px;
  border: none;
  border-radius: 13px;
  background: none;
  color: var(--bs2-ink-soft);
  font: inherit;
  cursor: pointer;
  transition: background 0.13s ease, color 0.13s ease;
}
.bs2-rail-item:hover { background: var(--bs2-canvas); color: var(--bs2-ink); }
.bs2-rail-item.active { background: var(--bs2-blue-soft); color: var(--bs2-blue); }
.bs2-rail-glyph { display: inline-flex; }
.bs2-rail-label { font-size: 11px; font-weight: 600; letter-spacing: -0.01em; }
.bs2-rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; width: 100%; align-items: center; }
.bs2-rail-util {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; border-radius: 12px;
  background: none; color: var(--bs2-ink-soft); cursor: pointer;
  transition: background 0.13s ease, color 0.13s ease;
}
.bs2-rail-util:hover { background: var(--bs2-canvas); color: var(--bs2-ink); }

/* ---- Rail fly-out ------------------------------------------------------ */
.bs2-flyout {
  position: absolute;
  top: 84px;
  left: 100px;
  z-index: 4;
  width: min(300px, 42vw);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--bs2-line);
  background: var(--flyout-bg);
  box-shadow: var(--bs2-shadow-lg);
  animation: bs2-flyin 0.16s ease;
}
@keyframes bs2-flyin { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.bs2-flyout-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 4px; }
.bs2-flyout-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--bs2-ink); }
.bs2-flyout-close {
  border: none; background: none; cursor: pointer; color: var(--bs2-ink-soft);
  font-size: 13px; width: 26px; height: 26px; border-radius: 8px;
}
.bs2-flyout-close:hover { background: var(--bs2-canvas); color: var(--bs2-ink); }
.bs2-flyout-list { display: flex; flex-direction: column; gap: 2px; }
.bs2-flyout-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  text-align: left; padding: 9px 10px; border-radius: 11px;
  border: none; background: none; color: var(--bs2-ink); font: inherit; cursor: pointer;
  transition: background 0.12s ease;
}
.bs2-flyout-item:hover { background: var(--bs2-canvas); }
.bs2-flyout-icon { display: inline-flex; flex: none; }
.bs2-flyout-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bs2-flyout-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs2-flyout-sub { font-size: 11.5px; color: var(--bs2-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs2-flyout-all {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 4px; padding: 10px; border-radius: 11px;
  border: none; cursor: pointer; font: 600 12.5px var(--font);
  color: var(--bs2-blue); background: var(--bs2-blue-soft);
}
.bs2-flyout-all:hover { filter: brightness(0.97); }

/* Account flyout (js/core/user-flyout.js), anchored under the avatar button
   instead of launching the Profile app as a window. */
.bs2-user-wrap { position: relative; display: inline-flex; }
.bs2-user-wrap .user-flyout { position: absolute; top: calc(100% + 8px); right: 0; }

/* ---- Center stage ------------------------------------------------------ */
.bs2-stage {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0;
  overflow: hidden;
}
.bs2-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(18px, 3vw, 40px);
  border-bottom: 1px solid var(--bs2-line);
  background: var(--bs2-paper);
}
.bs2-cmd {
  flex: 1;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--bs2-line);
  background: var(--bs2-canvas);
  color: var(--bs2-ink-soft);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.bs2-cmd:hover, .bs2-cmd:focus-visible, .bs2-cmd:focus-within {
  border-color: var(--bs2-blue);
  background: var(--bs2-paper);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
}
.bs2-cmd-glyph { display: inline-flex; color: var(--bs2-blue); }
.bs2-cmd-ph { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs2-cmd-eg { color: var(--bs2-ink-soft); opacity: 0.7; }
.bs2-cmd-keys { display: inline-flex; gap: 4px; flex: none; }
.bs2-cmd-keys kbd {
  font: 600 11px/1 var(--font); color: var(--bs2-ink-soft);
  border: 1px solid var(--bs2-line); border-radius: 6px; padding: 4px 7px; background: var(--bs2-paper);
}
.bs2-topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.bs2-icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--bs2-line); border-radius: 11px;
  background: var(--bs2-paper); color: var(--bs2-ink-soft); cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.bs2-icon-btn:hover { background: var(--bs2-canvas); color: var(--bs2-ink); }
.bs2-badge {
  position: absolute; top: 8px; right: 9px; width: 7px; height: 7px;
  border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px var(--bs2-paper);
}
.bs2-avatar {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px 4px 4px; border: 1px solid var(--bs2-line); border-radius: 999px;
  background: var(--bs2-paper); color: var(--bs2-ink-soft); cursor: pointer;
  transition: background 0.12s ease;
}
.bs2-avatar:hover { background: var(--bs2-canvas); }
.bs2-avatar-in {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #34d399, #10b981);
}

/* main = center + insights */
.bs2-main {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: clamp(18px, 2.4vw, 36px);
  padding: clamp(18px, 3vh, 32px) clamp(18px, 3vw, 40px) 0;
  overflow: hidden;
}
.bs2-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  overflow-y: auto;
  padding-bottom: 92px;
}
.bs2-welcome h1 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -0.03em; color: var(--bs2-ink); }
.bs2-welcome p { color: var(--bs2-ink-soft); font-size: 14.5px; margin-top: 5px; }
.bs2-wave { display: inline-block; }

/* project gallery */
.bs2-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 1500px) { .bs2-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bs2-proj {
  display: flex;
  flex-direction: column;
  text-align: left;
  border-radius: 16px;
  border: 1px solid var(--bs2-line);
  background: var(--bs2-paper);
  color: var(--bs2-ink);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--bs2-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.bs2-proj:hover { transform: translateY(-3px); box-shadow: var(--bs2-shadow-lg); border-color: #d3ddf5; }
.bs2-proj-thumb {
  display: block;
  height: 128px;
  background: var(--bs2-canvas);
  border-bottom: 1px solid var(--bs2-line-soft);
}
.bs2-proj-thumb svg { width: 100%; height: 100%; display: block; }
.bs2-proj-thumb.new {
  display: flex; align-items: center; justify-content: center;
  color: var(--bs2-ink-soft); font-size: 34px; font-weight: 300;
}
.bs2-proj-body { display: flex; flex-direction: column; gap: 3px; padding: 13px 15px 14px; }
.bs2-proj-title { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; color: var(--bs2-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs2-proj-sub { font-size: 12px; color: var(--bs2-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs2-proj-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }

.bs2-pill {
  font-size: 11px; font-weight: 650; padding: 4px 10px; border-radius: 999px;
  text-transform: capitalize;
}
.bs2-pill.prog { color: #1d4ed8; background: #e0e9ff; }
.bs2-pill.review { color: #b45309; background: #fef1dc; }
.bs2-pill.plan { color: #0f766e; background: #d8f3ef; }

.bs2-avatars { display: inline-flex; align-items: center; }
.bs2-mini-avatar {
  width: 24px; height: 24px; border-radius: 50%; margin-left: -7px;
  border: 2px solid var(--bs2-paper);
}
.bs2-mini-avatar:first-child { margin-left: 0; }
.bs2-mini-avatar[data-i="0"] { background: linear-gradient(135deg, #f472b6, #db2777); }
.bs2-mini-avatar[data-i="1"] { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.bs2-mini-avatar[data-i="2"] { background: linear-gradient(135deg, #34d399, #059669); }
.bs2-mini-avatar[data-i="3"] { background: linear-gradient(135deg, #fbbf24, #d97706); }
.bs2-avatars-more {
  display: inline-flex; align-items: center; justify-content: center;
  height: 24px; padding: 0 7px; margin-left: 4px; border-radius: 999px;
  font-size: 11px; font-weight: 650; color: var(--bs2-ink-soft); background: var(--bs2-canvas);
}

.bs2-viewall {
  align-self: center; display: inline-flex; align-items: center; gap: 6px;
  margin-top: 2px; padding: 8px 14px; border: none; border-radius: 10px;
  background: none; color: var(--bs2-blue); font: 600 13.5px var(--font); cursor: pointer;
}
.bs2-viewall:hover { background: var(--bs2-blue-soft); }

/* ---- Insights panel ---------------------------------------------------- */
.bs2-panel {
  flex: none;
  width: clamp(260px, 24vw, 320px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
  overflow-y: auto;
}
.bs2-card {
  border-radius: 16px;
  border: 1px solid var(--bs2-line);
  background: var(--bs2-paper);
  box-shadow: var(--bs2-shadow);
  padding: 16px;
}
.bs2-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bs2-card-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; color: var(--bs2-ink); }
.bs2-card-spark { display: inline-flex; color: var(--bs2-blue); }
.bs2-card-sub { font-size: 12.5px; font-weight: 700; color: var(--bs2-ink); margin-bottom: 10px; }
.bs2-ai .bs2-card-sub { margin-bottom: 12px; }

.bs2-act-list { display: flex; flex-direction: column; gap: 2px; }
.bs2-act {
  display: flex; align-items: center; gap: 11px; width: 100%;
  text-align: left; padding: 8px 6px; border: none; border-radius: 10px;
  background: none; color: var(--bs2-ink); font: inherit; cursor: pointer;
  transition: background 0.12s ease;
}
.bs2-act:hover { background: var(--bs2-canvas); }
.bs2-act-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 30px; height: 30px; border-radius: 9px; color: #059669; background: #e7f7f0;
}
.bs2-act-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bs2-act-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs2-act-time { font-size: 11px; color: var(--bs2-ink-soft); }

.bs2-link {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px; padding: 2px 2px; border: none; background: none;
  color: var(--bs2-blue); font: 600 12.5px var(--font); cursor: pointer;
}
.bs2-link:hover { text-decoration: underline; }

/* AI suggestion card */
.bs2-ai {
  background: linear-gradient(160deg, #f2f6ff, #eef1fb);
  border-color: #dbe6ff;
}
#os.theme-bs2.dark .bs2-ai { background: linear-gradient(160deg, rgba(47,107,255,0.14), rgba(47,107,255,0.06)); border-color: #2b3a63; }
.bs2-ai-row { display: flex; gap: 10px; align-items: flex-start; }
.bs2-ai-spark {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; border-radius: 8px; color: #fff;
  background: linear-gradient(135deg, #6366f1, #2f6bff);
}
.bs2-ai-text { font-size: 12.5px; line-height: 1.45; color: var(--bs2-ink); }
.bs2-ai-apply {
  margin-top: 12px; padding: 7px 16px; border: none; border-radius: 9px;
  background: var(--bs2-blue); color: #fff; font: 650 12.5px var(--font); cursor: pointer;
  transition: filter 0.12s ease;
}
.bs2-ai-apply:hover { filter: brightness(1.06); }

/* next-steps checklist */
.bs2-step-list { display: flex; flex-direction: column; gap: 2px; }
.bs2-step {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: left; padding: 8px 6px; border: none; border-radius: 10px;
  background: none; color: var(--bs2-ink); font: inherit; cursor: pointer;
  transition: background 0.12s ease;
}
.bs2-step:hover { background: var(--bs2-canvas); }
.bs2-step-mark { display: inline-flex; flex: none; color: var(--bs2-ink-soft); }
.bs2-step-label { font-size: 13px; font-weight: 500; }
.bs2-step.done .bs2-step-mark { color: #10b981; }
.bs2-step.done .bs2-step-label { color: var(--bs2-ink-soft); text-decoration: line-through; }

.bs2-empty { font-size: 12px; color: var(--bs2-ink-soft); padding: 4px 6px; }

/* ---- Floating action dock --------------------------------------------- */
.bs2-dock {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--bs2-line);
  background: var(--bs2-paper);
  box-shadow: var(--bs2-shadow-lg);
  z-index: 5;
}
.bs2-dock-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 15px; border: none; border-radius: 11px;
  background: none; color: var(--bs2-ink); font: 600 13px var(--font); cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.bs2-dock-btn:hover { background: var(--bs2-blue-soft); color: var(--bs2-blue); }
.bs2-dock-icon { display: inline-flex; color: var(--bs2-blue); }

/* ====================================================================== */
/* Window chrome + shared app surfaces (light paper look)                  */
/* ====================================================================== */
#os.theme-bs2 .window {
  border-radius: 14px;
  background: var(--win-bg);
  box-shadow: var(--win-shadow);
  border: 1px solid var(--bs2-line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#os.theme-bs2 .window.focused { box-shadow: var(--win-shadow-focus); }
#os.theme-bs2 .window.maximized { border-radius: 0; }
#os.theme-bs2 .window.snapped { border-radius: 14px; }
#os.theme-bs2 .window-titlebar {
  background: var(--titlebar-bg);
  border-bottom-color: var(--bs2-line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#os.theme-bs2 .window-body { background: var(--win-body-bg); color: var(--bs2-ink); }
#os.theme-bs2 .win-btn:hover { background: var(--win-hover-bg); }
#os.theme-bs2 .win-btn.close:hover { background: var(--danger); color: #fff; }
#os.theme-bs2 .window.drop-target { outline-color: var(--bs2-blue); }

/* ---- Taskbar — floating paper dock, not the conventional bar ---------- */
/* taskbar.js adds .bs-dock while a BioStudioAI profile is active.         */
#os.theme-bs2 .taskbar.bs-dock {
  left: 50%;
  right: auto;
  bottom: 10px;
  translate: -50% 0;
  width: max-content;
  max-width: calc(100vw - 24px);
  height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--bs2-line);
  border-radius: 18px;
  background: var(--bs2-paper);
  backdrop-filter: blur(min(18px, var(--bs-max-blur, 18px))) saturate(1.2);
  -webkit-backdrop-filter: blur(min(18px, var(--bs-max-blur, 18px))) saturate(1.2);
  box-shadow: var(--bs2-shadow-lg);
}
#os.theme-bs2 .taskbar.bs-dock .taskbar-left,
#os.theme-bs2 .taskbar.bs-dock .tb-show-desktop,
#os.theme-bs2 .taskbar.bs-dock .tray-chevron { display: none; }

#os.theme-bs2 .taskbar.bs-dock .taskbar-center { gap: 5px; }
#os.theme-bs2 .taskbar.bs-dock .taskbar-right {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--bs2-line);
}
#os.theme-bs2 .taskbar.bs-dock .tb-icon-btn,
#os.theme-bs2 .taskbar.bs-dock .task-btn {
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
}
#os.theme-bs2 .taskbar.bs-dock .taskbar-start {
  background: linear-gradient(135deg, #2f6bff, #22b0e0);
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.35);
}
#os.theme-bs2 .taskbar.bs-dock .taskbar-start .icon { color: #fff; }
#os.theme-bs2 .taskbar.bs-dock .taskbar-start:hover { filter: brightness(1.06); }

#os.theme-bs2 .task-btn-indicator { bottom: 4px; }
#os.theme-bs2 .task-btn.running .task-btn-indicator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bs2-blue);
}
#os.theme-bs2 .task-btn.active { background: var(--bs2-blue-soft); box-shadow: inset 0 0 0 1px rgba(47, 107, 255, 0.35); }
#os.theme-bs2 .task-btn.active .task-btn-indicator {
  width: 16px;
  height: 3px;
  border-radius: 3px;
  background: var(--bs2-blue);
}
#os.theme-bs2 .task-btn.multi.running .task-btn-indicator { box-shadow: 6px 0 0 -1px var(--bs2-blue); }

#os.theme-bs2 .tb-desktop-pill { border: 1px solid var(--bs2-line); background: var(--bs2-canvas); }
#os.theme-bs2 .tb-desktop-pill:hover { border-color: var(--bs2-blue); background: var(--bs2-blue-soft); }
#os.theme-bs2 .tb-desktop-pill .tb-desktop-dot { background: var(--bs2-blue); }
#os.theme-bs2 .taskbar.bs-dock .tray-cluster,
#os.theme-bs2 .taskbar.bs-dock .tray-notif-btn,
#os.theme-bs2 .taskbar.bs-dock .tray-clock { border-radius: 11px; }
#os.theme-bs2 .tb-style-toggle {
  border: 1px solid var(--bs2-line);
  border-radius: 999px;
  background: var(--bs2-blue-soft);
  color: var(--bs2-ink-soft);
}
#os.theme-bs2 .tb-style-toggle:hover { color: var(--bs2-blue); border-color: var(--bs2-blue); }

#os.theme-bs2 .start-menu,
#os.theme-bs2 .flyout {
  --start-mica: none;
  border-radius: 16px;
  border: 1px solid var(--bs2-line);
  background: var(--bs2-paper);
  box-shadow: var(--bs2-shadow-lg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#os.theme-bs2 .qs-tile.on { background: var(--bs2-blue); }
#os.theme-bs2 .cal-cell.today { background: var(--bs2-blue); }

body.theme-bs2 .ctx-menu,
body.theme-bs2 .tb-preview-popover,
body.theme-bs2 .snap-flyout,
body.theme-bs2 .graph-studio-nav-cmenu,
body.theme-bs2 .graph-studio-cmenu {
  --menu-bg: var(--bs2-paper);
  --menu-border: var(--bs2-line);
  --menu-hover: var(--bs2-blue-soft);
  --pr-blue: var(--bs2-blue);
  --pr-surface: var(--bs2-paper);
  --pr-line: var(--bs2-line);
  --pr-ink: var(--bs2-ink);
  color: var(--bs2-ink, #1b2540);
  background: var(--bs2-paper);
  border-radius: 12px;
  box-shadow: var(--bs2-shadow-lg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.theme-bs2 .ctx-item { border-radius: 8px; }
body.theme-bs2 .ctx-item:hover:not([disabled]) { background: var(--bs2-blue-soft); }
body.theme-bs2 .snap-preview { background: rgba(47, 107, 255, 0.16); border-color: var(--bs2-blue); }
body.theme-bs2 .snap-cell { background: var(--bs2-blue); }

#os.theme-bs2 .btn,
body.theme-bs2 .btn {
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--bs2-paper);
  color: var(--bs2-ink);
  font-weight: 550;
}
#os.theme-bs2 .btn:hover,
body.theme-bs2 .btn:hover { background: var(--bs2-canvas); }
#os.theme-bs2 .btn.primary,
body.theme-bs2 .btn.primary { background: var(--bs2-blue); border-color: transparent; color: #fff; }
#os.theme-bs2 .btn.primary:hover,
body.theme-bs2 .btn.primary:hover { filter: brightness(1.06); }
body.theme-bs2 .platform-dialog .btn.primary,
#os.theme-bs2 .platform-dialog .btn.primary {
  background: var(--bs2-blue) !important;
  border-color: transparent !important;
  color: #fff !important;
}

#os.theme-bs2 .field,
#os.theme-bs2 input[type="text"],
#os.theme-bs2 input[type="search"],
#os.theme-bs2 input[type="number"],
#os.theme-bs2 input[type="email"],
#os.theme-bs2 input[type="password"],
#os.theme-bs2 textarea,
#os.theme-bs2 select,
#os.theme-bs2 .bs-select {
  border-radius: 9px;
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--bs2-ink);
}
#os.theme-bs2 .field:focus,
#os.theme-bs2 input:focus-visible,
#os.theme-bs2 textarea:focus-visible,
#os.theme-bs2 select:focus-visible {
  outline: none;
  border-color: var(--bs2-blue);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.15);
}

body.theme-bs2 .platform-dialog-overlay {
  background: var(--modal-scrim);
  backdrop-filter: blur(min(6px, var(--bs-max-blur, 6px)));
  -webkit-backdrop-filter: blur(min(6px, var(--bs-max-blur, 6px)));
}
body.theme-bs2 .platform-dialog {
  border-radius: 16px;
  border: 1px solid var(--bs2-line);
  background: var(--bs2-paper);
  color: var(--bs2-ink, #1b2540);
  box-shadow: var(--bs2-shadow-lg);
}
body.theme-bs2 .platform-dialog-x:hover { background: var(--bs2-canvas); }
body.theme-bs2 .platform-dialog-input {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--bs2-ink);
  border-radius: 9px;
}

/* ====================================================================== */
/* Responsive                                                              */
/* ====================================================================== */
@media (max-width: 1180px) {
  .bs2-main { flex-direction: column; overflow-y: auto; }
  .bs2-panel { width: auto; }
  #os.theme-bs2 .bsw-panel { justify-content: flex-start; }
  .bs2-center { overflow: visible; padding-bottom: 0; justify-content: flex-start; }
}
@media (max-width: 820px) {
  .bs2-cmd-eg { display: none; }
  .bs2-gallery { grid-template-columns: 1fr; }
  .bs2-rail { width: 72px; }
  .bs2-rail-label { display: none; }
  .bs2-dock-label { display: none; }
}

#os.theme-bs2 :focus-visible,
body.theme-bs2 :focus-visible {
  outline: 2px solid var(--bs2-blue);
  outline-offset: 2px;
}

/* ====================================================================== */
/* Global search palette — clean paper command bar                         */
/* (overrides the generic styles palette.js injects at runtime)            */
/* ====================================================================== */
body.theme-bs2 .bs-search-overlay {
  background: rgba(20, 28, 52, 0.32);
  backdrop-filter: blur(min(6px, var(--bs-max-blur, 6px)));
  -webkit-backdrop-filter: blur(min(6px, var(--bs-max-blur, 6px)));
}
body.theme-bs2 .bs-search-box {
  background: var(--bs2-paper, #fff);
  color: var(--bs2-ink, #1b2540);
  border: 1px solid var(--bs2-line, #e6eaf2);
  border-radius: 18px;
  box-shadow: var(--bs2-shadow-lg, 0 12px 40px rgba(16, 24, 48, 0.12)), 0 0 0 4px rgba(47, 107, 255, 0.08);
}
body.theme-bs2 .bs-search-head { border-bottom-color: var(--bs2-line, #e6eaf2); padding: 14px 16px; }
body.theme-bs2 .bs-search-mag { color: var(--bs2-blue, #2f6bff); opacity: 1; }
body.theme-bs2 .bs-search-esc {
  color: var(--bs2-ink-soft);
  border-color: var(--bs2-line);
  background: var(--bs2-canvas);
  opacity: 1;
}
body.theme-bs2 .bs-search-group { color: var(--bs2-blue, #2f6bff); opacity: 0.9; }
body.theme-bs2 .bs-search-row { border-radius: 11px; }
body.theme-bs2 .bs-search-row.active { background: var(--bs2-blue-soft, #eaf1ff); }
body.theme-bs2 .bs-search-sub,
body.theme-bs2 .bs-search-hint { color: var(--bs2-ink-soft, #64708c); }
body.theme-bs2 .bs-search-app { color: var(--bs2-ink-soft); border-color: var(--bs2-line); opacity: 1; }

/* ====================================================================== */
/* Start menu internals — bright paper panel                               */
/* ====================================================================== */
#os.theme-bs2 .start-menu { background: var(--bs2-paper); color: var(--bs2-ink); }
#os.theme-bs2 .start-searchbar {
  --start-search-bg: var(--bs2-canvas);
  --start-search-border: var(--bs2-line);
  border-radius: 11px;
  background: var(--bs2-canvas);
  border: 1px solid var(--bs2-line);
  color: var(--bs2-ink);
  box-shadow: none;
}
#os.theme-bs2 .start-searchbar:focus-within {
  border-color: var(--bs2-blue);
  background: var(--bs2-paper);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
}
#os.theme-bs2 .start-section-title { color: var(--bs2-blue); }
#os.theme-bs2 .start-tile { border-radius: 13px; }
#os.theme-bs2 .start-tile:hover,
#os.theme-bs2 .start-all-row:hover,
#os.theme-bs2 .start-rec:hover,
#os.theme-bs2 .start-best:hover { background: var(--bs2-blue-soft); }
#os.theme-bs2 .start-allapps,
#os.theme-bs2 .start-back { color: var(--bs2-blue); }
#os.theme-bs2 .start-footer {
  background: var(--bs2-canvas);
  border-top: 1px solid var(--bs2-line);
  box-shadow: none;
}

/* ====================================================================== */
/* Task view — paper cards on a soft scrim                                 */
/* ====================================================================== */
#os.theme-bs2 .tv-scrim {
  background: rgba(24, 32, 58, 0.4);
  backdrop-filter: blur(min(10px, var(--bs-max-blur, 10px)));
  -webkit-backdrop-filter: blur(min(10px, var(--bs-max-blur, 10px)));
}
#os.theme-bs2 .tv-window {
  border-radius: 14px;
  border: 1px solid var(--bs2-line);
  background: var(--bs2-paper);
  box-shadow: var(--bs2-shadow);
}
#os.theme-bs2 .tv-window:hover { border-color: var(--bs2-blue); box-shadow: var(--bs2-shadow-lg); }
#os.theme-bs2 .tv-desktop { border-radius: 13px; border: 1px solid var(--bs2-line); }
#os.theme-bs2 .tv-desktop.active { border-color: var(--bs2-blue); box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.15); }
#os.theme-bs2 .tv-add { border: 1px dashed #c4cde4; border-radius: 13px; }
#os.theme-bs2 .tv-add:hover { border-color: var(--bs2-blue); }

/* ====================================================================== */
/* Customizable widget panel (js/core/bs-widgets.js) — paper card stack    */
/* ====================================================================== */
#os.theme-bs2 .bsw-panel {
  flex: none;
  width: clamp(260px, 24vw, 320px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  overflow-y: auto;
}
#os.theme-bs2 .bsw-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#os.theme-bs2 .bsw-head-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; color: var(--bs2-ink); }
#os.theme-bs2 .bsw-edit-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--bs2-line);
  background: var(--bs2-paper);
  color: var(--bs2-ink-soft); font: 600 11.5px var(--font); cursor: pointer;
  transition: border-color 0.13s ease, color 0.13s ease, background 0.13s ease;
}
#os.theme-bs2 .bsw-edit-btn:hover { color: var(--bs2-blue); border-color: var(--bs2-blue); }
#os.theme-bs2 .bsw-edit-btn.on { color: #fff; border-color: transparent; background: var(--bs2-blue); }

/* each widget is a paper card */
#os.theme-bs2 .bsw-widget {
  display: flex; flex-direction: column; gap: 9px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--bs2-line);
  background: var(--bs2-paper);
  box-shadow: var(--bs2-shadow);
}
#os.theme-bs2 .bsw-widget.editing { border-style: dashed; border-color: rgba(47, 107, 255, 0.5); }
#os.theme-bs2 .bsw-widget-head { display: flex; align-items: center; gap: 6px; }
#os.theme-bs2 .bsw-widget-glyph { display: inline-flex; color: var(--bs2-blue); }
#os.theme-bs2 .bsw-widget-title { flex: 1; font-size: 12.5px; font-weight: 700; color: var(--bs2-ink); }
#os.theme-bs2 .bsw-widget-tools { display: inline-flex; gap: 3px; }
#os.theme-bs2 .bsw-tool {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 8px;
  border: 1px solid var(--bs2-line); background: var(--bs2-paper);
  color: var(--bs2-ink-soft); cursor: pointer;
}
#os.theme-bs2 .bsw-tool:hover:not([disabled]) { color: var(--bs2-blue); border-color: var(--bs2-blue); }
#os.theme-bs2 .bsw-tool.danger:hover:not([disabled]) { color: #dc2626; border-color: #fca5a5; background: #fef2f2; }
#os.theme-bs2 .bsw-tool[disabled] { opacity: 0.35; cursor: default; }

#os.theme-bs2 .bsw-list { display: flex; flex-direction: column; gap: 2px; }
#os.theme-bs2 .bsw-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: left; padding: 8px 6px; border: none; border-radius: 10px;
  background: none; color: var(--bs2-ink); font: inherit; cursor: pointer;
  transition: background 0.12s ease;
}
#os.theme-bs2 .bsw-row:hover { background: var(--bs2-canvas); }
#os.theme-bs2 .bsw-row-icon {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  color: #059669; background: #e7f7f0;
}
#os.theme-bs2 .bsw-row.unread .bsw-row-icon { color: var(--bs2-blue); background: var(--bs2-blue-soft); }
#os.theme-bs2 .bsw-row.check .bsw-row-icon { color: var(--bs2-ink-soft); background: none; }
#os.theme-bs2 .bsw-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#os.theme-bs2 .bsw-row-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#os.theme-bs2 .bsw-row-sub { font-size: 11px; color: var(--bs2-ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#os.theme-bs2 .bsw-row-caret { flex: none; color: var(--bs2-ink-soft); opacity: 0.55; display: inline-flex; }
#os.theme-bs2 .bsw-empty { font-size: 12px; color: var(--bs2-ink-soft); padding: 2px 4px; }
#os.theme-bs2 .bsw-empty.center { text-align: center; padding: 8px; }

/* clock */
#os.theme-bs2 .bsw-clock { display: flex; flex-direction: column; gap: 2px; padding: 2px; }
#os.theme-bs2 .bsw-clock-time {
  font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  background: linear-gradient(120deg, #1b2540, #2f6bff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
#os.theme-bs2 .bsw-clock-date { font-size: 12.5px; color: var(--bs2-ink-soft); }

/* lab stats */
#os.theme-bs2 .bsw-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#os.theme-bs2 .bsw-stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 11px; border-radius: 11px;
  border: 1px solid var(--bs2-line-soft); background: var(--bs2-canvas);
}
#os.theme-bs2 .bsw-stat-value { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--bs2-blue); }
#os.theme-bs2 .bsw-stat-label { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bs2-ink-soft); }

/* quick launch */
#os.theme-bs2 .bsw-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#os.theme-bs2 .bsw-quick-app {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 4px; border: none; border-radius: 11px;
  background: var(--bs2-canvas); color: var(--bs2-ink); font: inherit; cursor: pointer;
  transition: background 0.12s ease;
}
#os.theme-bs2 .bsw-quick-app:hover { background: var(--bs2-blue-soft); }
#os.theme-bs2 .bsw-quick-name { font-size: 10px; font-weight: 600; color: var(--bs2-ink-soft); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* add-widget picker (edit mode) */
#os.theme-bs2 .bsw-add {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border-radius: 14px;
  border: 1px dashed #c4cde4;
  background: var(--bs2-canvas);
}
#os.theme-bs2 .bsw-add-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--bs2-ink-soft); }
#os.theme-bs2 .bsw-add-list { display: flex; flex-wrap: wrap; gap: 6px; }
#os.theme-bs2 .bsw-add-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 999px;
  border: 1px solid var(--bs2-line); background: var(--bs2-paper);
  color: var(--bs2-ink); font: 600 11.5px var(--font); cursor: pointer;
  transition: border-color 0.13s ease, background 0.13s ease, color 0.13s ease;
}
#os.theme-bs2 .bsw-add-chip:hover { border-color: var(--bs2-blue); background: var(--bs2-blue-soft); color: var(--bs2-blue); }

#os.theme-bs2.dark .bs2-act-icon,
#os.theme-bs2.dark .bsw-row-icon {
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
}
#os.theme-bs2.dark .bsw-clock-time {
  background: linear-gradient(120deg, #e8ecf6, #2f6bff);
  -webkit-background-clip: text; background-clip: text;
}

/* ====================================================================== */
/* Shared app chrome — toolbars, status, tables, tabs, toasts, scrollbars  */
/* ====================================================================== */
#os.theme-bs2 .app-toolbar,
#os.theme-bs2 .files-toolbar,
#os.theme-bs2 .st-toolbar {
  background: var(--app-bar);
  border-bottom-color: var(--bs2-line);
}
#os.theme-bs2 .app-statusbar,
#os.theme-bs2 .st-statusbar {
  background: var(--bs2-canvas);
  border-top-color: var(--bs2-line);
  color: var(--bs2-ink-soft);
}
#os.theme-bs2 .app,
#os.theme-bs2 .app-content,
#os.theme-bs2 .app-frame {
  color: var(--bs2-ink);
  background: var(--win-body-bg);
}
#os.theme-bs2 .clarity-studio-overlay { background: var(--bs2-canvas); }

#os.theme-bs2 .btn.ghost,
body.theme-bs2 .btn.ghost { background: transparent; border-color: transparent; }
#os.theme-bs2 .btn.ghost:hover,
body.theme-bs2 .btn.ghost:hover { background: var(--bs2-canvas); }

#os.theme-bs2 table { border-color: var(--bs2-line); }
#os.theme-bs2 th {
  background: var(--bs2-canvas);
  color: var(--bs2-ink-soft);
  border-color: var(--bs2-line);
}
#os.theme-bs2 td { border-color: var(--bs2-line-soft); }
#os.theme-bs2 tbody tr:hover td { background: var(--bs2-blue-soft); }

#os.theme-bs2 .theme-card,
#os.theme-bs2 .settings-section,
#os.theme-bs2 .option-card {
  background: var(--bs2-paper);
  border-color: var(--bs2-line);
  border-radius: 14px;
}
#os.theme-bs2 .theme-card.active,
#os.theme-bs2 .option-card.active {
  border-color: var(--bs2-blue);
  background: var(--bs2-blue-soft);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
}

#os.theme-bs2 .toast {
  border-radius: 16px;
  border: 1px solid var(--bs2-line);
  background: var(--bs2-paper);
  color: var(--bs2-ink);
  box-shadow: var(--bs2-shadow-lg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#os.theme-bs2 .toast-layer { bottom: calc(var(--taskbar-h) + 8px); }

#os.theme-bs2 ::-webkit-scrollbar { width: 11px; height: 11px; }
#os.theme-bs2 ::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--bs2-ink-soft) 42%, transparent);
  border-radius: 8px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
#os.theme-bs2 ::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--bs2-blue) 55%, transparent);
  background-clip: padding-box;
}
#os.theme-bs2 { scrollbar-color: color-mix(in srgb, var(--bs2-ink-soft) 45%, transparent) transparent; }
#os.theme-bs2 input, #os.theme-bs2 textarea, #os.theme-bs2 select { color-scheme: inherit; }

/* tabs used across studios, office, and settings */
#os.theme-bs2 :is(.st-nav-item, .st-tab, .ps-viz-tab, .office-rb-tab, .eln-saved-scope-tab, .nc-app-nav) {
  border-radius: 10px;
}
#os.theme-bs2 :is(.st-nav-item.active, .st-tab.active, .ps-viz-tab.active, .office-rb-tab.active, .eln-saved-scope-tab.is-active, .nc-app-nav.active) {
  background: var(--bs2-blue-soft);
  color: var(--bs2-blue-strong);
}

/* built-in utilities */
#os.theme-bs2 :is(.calc-display, .calc-key, .files-sidebar, .files-path, .files-preview, .files-home-card, .seq-input, .seq-stat) {
  background: var(--bs2-paper);
  border-color: var(--bs2-line);
  color: var(--bs2-ink);
}

/* ====================================================================== */
/* Studio suite + GraphPad-family apps                                     */
/* ====================================================================== */
#os.theme-bs2 .studio {
  --st-bg: var(--bs2-canvas);
  --st-panel: var(--bs2-paper);
  --st-line: var(--bs2-line);
  --st-line-soft: var(--bs2-line-soft);
  --st-ink: var(--bs2-ink);
  --st-ink-soft: var(--bs2-ink-soft);
  --st-accent: var(--bs2-blue);
  --st-ai: var(--bs2-blue);
  --st-info: var(--bs2-blue);
  --st-ok: var(--success);
  background: var(--st-bg);
  color: var(--st-ink);
}
#os.theme-bs2 .st-tbtn { border-radius: 9px; }
#os.theme-bs2 .st-tbtn.primary,
#os.theme-bs2 .st-btn.primary { background: var(--bs2-blue); border-color: transparent; color: #fff; }
#os.theme-bs2 .st-sidebar,
#os.theme-bs2 .st-inspector { background: var(--bs2-paper); border-color: var(--bs2-line); }
#os.theme-bs2 .st-workspace { background: var(--bs2-canvas); }
#os.theme-bs2 .st-card {
  background: var(--bs2-paper);
  border-color: var(--bs2-line);
  border-radius: 14px;
  box-shadow: var(--bs2-shadow);
}

#os.theme-bs2 :is(
  .graph-studio-app,
  .lims-studio-app,
  .scs-studio-root,
  .spatial-studio-app,
  .seahorse-studio-root,
  .ms-studio-root,
  .ms-studio-app,
  .tox-studio-app,
  .qms-lite-app,
  .qms-lite-root,
  .ss-studio-root,
  .pkpd-studio-root,
  .pathology-studio-root,
  .pathology-studio-app,
  .pcr-studio-app,
  .pcrs-graph-shell,
  .method-validation-root,
  .omics-studio-app,
  .molecular-design-root,
  .design-studio-root,
  .las-root,
  .las-root.las-gs-chrome,
  .compound-studio-app,
  .assay-designer-app
) {
  --pr-blue: var(--bs2-blue);
  --pr-blue-dk: var(--bs2-blue-strong);
  --pr-teal: #0d9488;
  --pr-bg: var(--bs2-canvas);
  --pr-surface: var(--bs2-paper);
  --pr-nav-bg: var(--bs2-canvas);
  --pr-line: var(--bs2-line);
  --pr-ink: var(--bs2-ink);
  --pr-ink-soft: var(--bs2-ink-soft);
  --pr-hover: var(--bs2-blue-soft);
  --pr-active: #d6e4fb;
  --pr-shadow: var(--bs2-shadow);
  --st-accent: var(--bs2-blue);
  --st-ai: var(--bs2-blue);
  --st-bg: var(--bs2-canvas);
  --st-panel: var(--bs2-paper);
  --st-line: var(--bs2-line);
  --st-ink: var(--bs2-ink);
  --st-ink-soft: var(--bs2-ink-soft);
}
#os.theme-bs2.dark :is(
  .graph-studio-app,
  .lims-studio-app,
  .scs-studio-root,
  .spatial-studio-app,
  .seahorse-studio-root,
  .ms-studio-root,
  .ms-studio-app,
  .tox-studio-app,
  .qms-lite-app,
  .qms-lite-root,
  .ss-studio-root,
  .pkpd-studio-root,
  .pathology-studio-root,
  .pathology-studio-app,
  .pcr-studio-app,
  .pcrs-graph-shell,
  .method-validation-root,
  .omics-studio-app,
  .molecular-design-root,
  .design-studio-root,
  .las-root,
  .las-root.las-gs-chrome,
  .compound-studio-app,
  .assay-designer-app
) {
  --pr-active: rgba(47, 107, 255, 0.22);
}

#os.theme-bs2 .graph-studio-ai-fab {
  background: linear-gradient(135deg, var(--bs2-blue), var(--bs2-cyan));
  box-shadow: 0 8px 22px rgba(47, 107, 255, 0.32);
}

#os.theme-bs2 .imaging-studio-root.im-gs-shell {
  --im-blue: var(--bs2-blue);
  --im-blue-dk: var(--bs2-blue-strong);
  --im-teal: #0d9488;
  --im-bg: var(--bs2-canvas);
  --im-surface: var(--bs2-paper);
  --im-nav-bg: var(--bs2-canvas);
  --im-line: var(--bs2-line);
  --im-ink: var(--bs2-ink);
  --im-ink-soft: var(--bs2-ink-soft);
  --im-hover: var(--bs2-blue-soft);
  --im-active: #d6e4fb;
  --im-shadow: var(--bs2-shadow);
}
#os.theme-bs2 .inv-app {
  --iv-blue: var(--bs2-blue);
  --iv-blue-dk: var(--bs2-blue-strong);
  --iv-bg: var(--bs2-canvas);
  --iv-surface: var(--bs2-paper);
  --iv-nav-bg: var(--bs2-canvas);
  --iv-line: var(--bs2-line);
  --iv-ink: var(--bs2-ink);
  --iv-ink-soft: var(--bs2-ink-soft);
  --iv-hover: var(--bs2-blue-soft);
  --iv-active: #d6e4fb;
  --iv-shadow: var(--bs2-shadow);
}
#os.theme-bs2 .pcr-studio-app {
  --pcr-violet: var(--bs2-blue);
  --pcr-navy: var(--bs2-ink);
}

#os.theme-bs2 .plasmid-studio-root {
  --ps-ink: var(--bs2-ink);
  --ps-muted: var(--bs2-ink-soft);
  --ps-line: var(--bs2-line);
  --ps-panel: var(--bs2-paper);
  --ps-soft: var(--bs2-canvas);
  --ps-blue: var(--bs2-blue);
  --ps-navy: var(--bs2-ink);
  color: var(--ps-ink);
  background: var(--ps-soft);
}
#os.theme-bs2 .ps-document-bar {
  background: linear-gradient(var(--bs2-canvas), var(--bs2-line-soft));
  border-bottom-color: var(--bs2-line);
}
#os.theme-bs2 .ps-table { background: var(--bs2-paper); }
#os.theme-bs2 .ps-table th { background: var(--bs2-canvas); color: var(--bs2-ink-soft); }

#os.theme-bs2 .fe-explorer-root {
  --fe-accent: var(--bs2-blue);
  --fe-accent-hover: var(--bs2-blue-strong);
  --fe-accent-soft: var(--bs2-blue-soft);
  --fe-accent-strong: rgba(47, 107, 255, 0.22);
  --fe-surface: var(--bs2-canvas);
  --fe-elevated: var(--bs2-paper);
  --fe-sidebar: var(--bs2-paper);
  --fe-line: var(--bs2-line);
  --fe-line-strong: var(--bs2-line);
  --fe-ink: var(--bs2-ink);
  --fe-ink-soft: var(--bs2-ink-soft);
  --fe-radius: 10px;
  --fe-radius-lg: 12px;
  --fe-shadow: var(--bs2-shadow);
}
#os.theme-bs2 .fe-explorer-root .fe-command-bar {
  background: var(--bs2-paper);
  border-bottom-color: var(--bs2-line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#os.theme-bs2 .fe-explorer-root .fe-nav-pane,
#os.theme-bs2 .fe-explorer-root .fe-sidebar,
#os.theme-bs2 .fe-explorer-root .files-sidebar {
  background: var(--bs2-paper);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#os.theme-bs2 .office-app { background: var(--bs2-canvas); }
#os.theme-bs2 .office-ribbon {
  background: var(--bs2-paper);
  border-bottom-color: var(--bs2-line);
}
#os.theme-bs2 .window .word-app .office-titlebar {
  background: var(--bs2-blue) !important;
}
/* Excel keeps product green — do not pick up White-palette --primary. */
#os.theme-bs2 .window .excel-app .office-titlebar {
  background: #107c41 !important;
}
#os.theme-bs2 .office-rb {
  --office-rb-accent: var(--bs2-blue);
  --office-rb-accent-dark: var(--bs2-blue-strong);
  --office-rb-hover: var(--bs2-blue-soft);
  --office-rb-hover-border: color-mix(in srgb, var(--bs2-blue) 28%, var(--bs2-line));
  background: var(--bs2-paper);
  color: var(--bs2-ink);
  border-bottom-color: var(--bs2-line);
}
#os.theme-bs2 :is(.rs-office-root, .hs-office-root, .ps-office-root) .studio,
#os.theme-bs2 :is(.rs-office-root, .hs-office-root, .ps-office-root) .st-workspace {
  background: var(--bs2-canvas);
}
#os.theme-bs2 .rs-office-root .st-inspector { background: var(--bs2-paper); }

#os.theme-bs2 .notification-center-app .nc-app-root { color: var(--bs2-ink); }
#os.theme-bs2 .notification-center-app .nc-app-nav:hover { background: var(--bs2-canvas); }
#os.theme-bs2 .notification-center-app .nc-row.unread { background: var(--bs2-blue-soft); }

#os.theme-bs2 .molbio-app { --app-bg: var(--bs2-canvas); }

/* ====================================================================== */
/* Studio AI + OS assistant — paper blue, not leftover violet              */
/* ====================================================================== */
#os.theme-bs2 .studio-ai-fab,
body.theme-bs2 .os-ai-fab {
  background: linear-gradient(135deg, var(--bs2-blue), var(--bs2-cyan));
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.35);
}
#os.theme-bs2 .studio-ai-badge {
  background: linear-gradient(135deg, var(--bs2-blue), var(--bs2-cyan));
}
#os.theme-bs2 .studio-ai-panel,
body.theme-bs2 .os-ai-panel {
  background: var(--bs2-paper);
  border-color: var(--bs2-line);
  color: var(--bs2-ink);
  border-radius: 16px;
  box-shadow: var(--bs2-shadow-lg);
}
#os.theme-bs2 .studio-ai-msg.user,
body.theme-bs2 .os-ai-msg.user { background: var(--bs2-blue-soft); }
#os.theme-bs2 .studio-ai-msg.ai,
body.theme-bs2 .os-ai-msg.ai { background: var(--bs2-canvas); }
#os.theme-bs2 .studio-ai-send,
body.theme-bs2 .os-ai-send,
body.theme-bs2 .os-ai-open {
  background: var(--bs2-blue);
  color: #fff;
}
body.theme-bs2 .os-ai-input,
body.theme-bs2 .os-ai-field-input {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--bs2-ink);
}
body.theme-bs2 .os-ai-input:focus,
body.theme-bs2 .os-ai-field-input:focus { border-color: var(--bs2-blue); }
body.theme-bs2 .os-ai-tabs { background: var(--bs2-blue-soft); }
body.theme-bs2 .os-ai-tab.active { background: var(--bs2-paper); }
body.theme-bs2 .os-ai-field.needed .os-ai-field-label { color: var(--bs2-blue); }
body.theme-bs2 .user-flyout {
  background: var(--bs2-paper);
  border-color: var(--bs2-line);
  color: var(--bs2-ink);
  box-shadow: var(--bs2-shadow-lg);
}
