/* BioStudio AI — BioStudioAI Carbon theme (theme-bs4).
   Minimal dark graphite engineering surface: flat near-black panels, one
   lime accent, monospaced micro-labels, dense flat tiles, no blur/glow.
   Structure comes from css/bsx-shell.css; this file sets the Carbon tokens
   and the engineering flourishes. Dashboard: js/core/bsx-dashboard.js with
   layout="grid". Always dark. */

body.theme-bs4,
#os.theme-bs4 {
  /* Carbon tokens */
  --bsx-bg: #0f1013;
  --bsx-surface: #16181d;
  --bsx-surface-2: #1c1f25;
  --bsx-border: #262931;
  --bsx-accent: #a3e635;
  --bsx-accent-strong: #bef264;
  --bsx-accent-ink: #131503;
  --bsx-accent-soft: rgba(163, 230, 53, 0.09);
  --bsx-radius: 10px;
  --bsx-radius-lg: 14px;
  --bsx-shadow: none;
  --bsx-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --bsx-blur: none;
  --bsx-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* system tokens */
  --ink: #e8eaee;
  --ink-soft: #878b95;
  --radius: 10px;
  --taskbar-h: 70px;
  --accent: #a3e635;

  --win-bg: #16181d;
  --win-body-bg: #121418;
  --win-border: var(--bsx-border);
  --win-border-focus: #a3e635;
  --titlebar-bg: #14161b;
  --flyout-bg: #16181d;
  --flyout-border: var(--bsx-border);
  --tile-bg: #1c1f25;
  --tile-hover: rgba(163, 230, 53, 0.12);
  --input-bg: #101216;
  --input-border: #2c303a;

  --taskbar-bg: rgba(18, 20, 24, 0.96);
  --taskbar-border: var(--bsx-border);
  --tb-hover: rgba(163, 230, 53, 0.1);
  --tb-active: rgba(163, 230, 53, 0.08);
  --app-btn-hover: rgba(255, 255, 255, 0.07);

  color: var(--ink);
}

/* wallpaper — flat graphite with a faint grid, engineering-bench vibe */
#os.wp-bs4,
#os.wp-bs4.dark {
  background:
    linear-gradient(rgba(163, 230, 53, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 230, 53, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, #101114 0%, #0d0e11 100%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
}

/* ---- Engineering flourishes -------------------------------------------- */
.bs4-home .bsx-greeting h1 { font-weight: 550; letter-spacing: -0.03em; }
.bs4-home .bsx-greeting p,
.bs4-home .bsx-sec-title,
.bs4-home .bsx-nav-link,
.bs4-home .bsw-widget-title,
.bs4-home .bsw-stat-label,
.bs4-home .bsw-add-title,
.bs4-home .bsc-keys kbd {
  font-family: var(--bsx-mono);
}
.bs4-home .bsx-nav-link { font-size: 12px; text-transform: lowercase; }
.bs4-home .bsx-nav-link::before { content: "/"; margin-right: 5px; color: var(--bsx-accent); opacity: 0.7; }
.bs4-home .bsx-nav-link.active { color: var(--bsx-accent); background: var(--bsx-accent-soft); }
.bs4-home .bsx-app { position: relative; overflow: hidden; }
.bs4-home .bsx-app::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--bsx-accent);
  opacity: 0;
  transition: opacity 0.14s ease;
}
.bs4-home .bsx-app:hover { transform: none; background: var(--bsx-surface-2); }
.bs4-home .bsx-app:hover::after { opacity: 1; }
.bs4-home .bsx-app-sub { font-family: var(--bsx-mono); font-size: 10px; }
.bs4-home .bsx-brand-dot { border-radius: 2px; }
/* flat tiles with a status line that lights up lime on hover */
.bs4-home[data-layout="grid"] .bsx-proj { position: relative; overflow: hidden; }
.bs4-home[data-layout="grid"] .bsx-proj::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--bsx-accent);
  opacity: 0;
  transition: opacity 0.14s ease;
}
.bs4-home[data-layout="grid"] .bsx-proj:hover { background: var(--bsx-surface-2); }
.bs4-home[data-layout="grid"] .bsx-proj:hover::after { opacity: 1; }
.bs4-home .bsx-proj-mark { border-radius: 2px; }
.bs4-home .bsx-proj-sub { font-family: var(--bsx-mono); font-size: 10.5px; }
.bs4-home .bsw-clock-time { font-family: var(--bsx-mono); font-weight: 500; }
.bs4-home .bsw-stat-value { font-family: var(--bsx-mono); }

/* window chrome — flat, sharp, lime focus line */
#os.theme-bs4 .window-titlebar { border-bottom: 1px solid var(--bsx-border); }
#os.theme-bs4 .window.focused .window-titlebar { box-shadow: inset 0 2px 0 var(--bsx-accent); }
#os.theme-bs4 .window-title-text { font-family: var(--bsx-mono); font-size: 12px; }

/* taskbar dock — flat graphite slab */
#os.theme-bs4 .taskbar.bs-dock { border-radius: 12px; }
#os.theme-bs4 .tray-clock { font-family: var(--bsx-mono); }

/* start menu / tables tuned for the dark flat surface */
#os.theme-bs4 .start-section-title { font-family: var(--bsx-mono); text-transform: lowercase; }
#os.theme-bs4 th { background: #14161b; color: var(--ink-soft); border-color: var(--bsx-border); }
#os.theme-bs4 td { border-color: #202329; }
#os.theme-bs4 tbody tr:hover td { background: rgba(163, 230, 53, 0.05); }

#os.theme-bs4 input, #os.theme-bs4 textarea, #os.theme-bs4 select { color-scheme: dark; }
#os.theme-bs4 .field, #os.theme-bs4 input[type="text"], #os.theme-bs4 input[type="search"],
#os.theme-bs4 textarea, #os.theme-bs4 select {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--ink);
}

body.theme-bs4 .platform-dialog-overlay { background: rgba(5, 6, 8, 0.6); }

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