/* 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-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;

  --ink: var(--bs2-ink);
  --ink-soft: var(--bs2-ink-soft);

  /* taller band so the floating dock taskbar has air around it */
  --taskbar-h: 72px;

  /* 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);
  --titlebar-bg: #fbfcfe;
  --flyout-bg: #ffffff;
  --tile-bg: #f4f6fb;
  --tile-hover: var(--bs2-blue-soft);
  --input-bg: #ffffff;
  --input-border: #d8def0;

  /* legacy app aliases */
  --surface: var(--win-body-bg);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --border: var(--bs2-line);

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

  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. */
#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: #10152400;
  --input-border: #2a3550;
}
#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;
  box-shadow: var(--bs2-shadow-lg);
  border: 1px solid var(--bs2-line);
}
#os.theme-bs2 .window.focused { box-shadow: var(--bs2-shadow-lg), 0 0 0 1px rgba(47, 107, 255, 0.35); }
#os.theme-bs2 .window.maximized { border-radius: 0; }
#os.theme-bs2 .window-titlebar { border-bottom-color: var(--bs2-line); }
#os.theme-bs2 .win-btn:hover { background: var(--bs2-canvas); }
#os.theme-bs2 .win-btn.close:hover { background: #ef4444; color: #fff; }

/* ---- 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(18px) saturate(1.2);
  -webkit-backdrop-filter: 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 {
  border-radius: 16px;
  border: 1px solid var(--bs2-line);
  box-shadow: var(--bs2-shadow-lg);
}
#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 {
  --menu-bg: #ffffff;
  --menu-border: var(--bs2-line);
  --menu-hover: var(--bs2-blue-soft);
  color: var(--bs2-ink, #1b2540);
  border-radius: 12px;
  box-shadow: var(--bs2-shadow-lg);
}
body.theme-bs2 .ctx-item { border-radius: 8px; }

#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); }

#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 {
  border-radius: 16px;
  border: 1px solid var(--bs2-line);
  background: var(--bs2-paper);
  color: var(--bs2-ink, #1b2540);
  box-shadow: var(--bs2-shadow-lg);
}

/* ====================================================================== */
/* 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(6px);
  -webkit-backdrop-filter: 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-search {
  border-radius: 11px;
  background: var(--bs2-canvas);
  border: 1px solid var(--bs2-line);
  color: var(--bs2-ink);
}
#os.theme-bs2 .start-search:focus {
  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 { 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);
}

/* ====================================================================== */
/* Task view — paper cards on a soft scrim                                 */
/* ====================================================================== */
#os.theme-bs2 .tv-scrim {
  background: rgba(24, 32, 58, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: 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); }
