/* BioStudio AI — Nebula tone (theme-nebula).
   Deep cosmic glass: violet-cyan depth, soft blur, spacious hero layout.
   Dark-first. Dashboard: js/core/bsx-dashboard.js layout="hero". */

body.theme-nebula,
#os.theme-nebula {
  --bsx-bg: #0b0f1a;
  --bsx-surface: rgba(18, 24, 42, 0.72);
  --bsx-surface-2: rgba(24, 32, 56, 0.65);
  --bsx-border: rgba(124, 108, 255, 0.22);
  --bsx-accent: #7c6cff;
  --bsx-accent-strong: #9d8fff;
  --bsx-accent-glow: #22d3ee;
  --bsx-accent-ink: #0b0f1a;
  --bsx-accent-soft: rgba(124, 108, 255, 0.14);
  --bsx-radius: 18px;
  --bsx-radius-lg: 22px;
  --bsx-shadow: 0 8px 32px rgba(34, 211, 238, 0.08);
  --bsx-shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(124, 108, 255, 0.12);
  --bsx-blur: blur(24px) saturate(1.35);

  --ink: #e8ecf7;
  --ink-soft: #9aa3c4;
  --radius: 18px;
  --taskbar-h: 76px;
  --accent: #7c6cff;

  --win-bg: rgba(16, 22, 40, 0.82);
  --win-body-bg: rgba(11, 15, 26, 0.88);
  --win-border: var(--bsx-border);
  --win-border-focus: #7c6cff;
  --titlebar-bg: rgba(14, 18, 34, 0.78);
  --flyout-bg: rgba(18, 24, 42, 0.9);
  --flyout-border: var(--bsx-border);
  --tile-bg: rgba(255, 255, 255, 0.05);
  --tile-hover: rgba(124, 108, 255, 0.16);
  --input-bg: rgba(8, 12, 22, 0.7);
  --input-border: rgba(124, 108, 255, 0.28);

  --taskbar-bg: rgba(12, 16, 30, 0.82);
  --taskbar-border: var(--bsx-border);
  --tb-hover: rgba(124, 108, 255, 0.18);
  --tb-active: rgba(34, 211, 238, 0.12);
  --app-btn-hover: rgba(255, 255, 255, 0.08);

  color: var(--ink);
}

#os.wp-nebula,
#os.wp-nebula.dark {
  background:
    radial-gradient(900px 700px at 18% 12%, rgba(124, 108, 255, 0.28), transparent 58%),
    radial-gradient(800px 600px at 82% 22%, rgba(34, 211, 238, 0.18), transparent 55%),
    radial-gradient(600px 500px at 50% 100%, rgba(109, 40, 217, 0.15), transparent 60%),
    linear-gradient(165deg, #070a14 0%, #0b0f1a 45%, #12182e 100%);
}

/* dashboard flourishes */
.neb-home .bsx-greeting h1 {
  font-weight: 650;
  letter-spacing: -0.03em;
  background: linear-gradient(110deg, #e8ecf7, #7c6cff 45%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.neb-home .bsx-cmd {
  border-radius: 999px;
  backdrop-filter: var(--bsx-blur);
  -webkit-backdrop-filter: var(--bsx-blur);
  box-shadow: 0 0 0 1px rgba(124, 108, 255, 0.25), var(--bsx-shadow);
}
.neb-home .bsx-cmd:focus-within {
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2), 0 0 40px rgba(124, 108, 255, 0.2);
}
.neb-home .bsx-proj, .neb-home .bsw-widget, .neb-home .bsx-app {
  backdrop-filter: var(--bsx-blur);
  -webkit-backdrop-filter: var(--bsx-blur);
}
.neb-home .bsx-proj:hover { transform: translateY(-2px); box-shadow: var(--bsx-shadow-lg); }
.neb-home .bsx-nav-link { border-radius: 999px; }
.neb-home .bsx-nav-link.active {
  background: rgba(124, 108, 255, 0.2);
  color: #c4b5fd;
  box-shadow: 0 0 20px rgba(124, 108, 255, 0.15);
}
.neb-home[data-layout="hero"] .bsx-view { width: 100%; text-align: left; }

/* window + dock */
#os.theme-nebula .window.focused {
  box-shadow: var(--bsx-shadow-lg), 0 0 0 1px var(--bsx-accent), 0 0 40px rgba(34, 211, 238, 0.1);
}
#os.theme-nebula .taskbar.bs-dock { border-radius: 999px; padding: 0 14px; }
#os.theme-nebula .taskbar.bs-dock .taskbar-start {
  background: linear-gradient(135deg, #7c6cff, #22d3ee);
  box-shadow: 0 6px 20px rgba(124, 108, 255, 0.4);
}

body.theme-nebula .platform-dialog-overlay {
  background: rgba(7, 10, 20, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.theme-nebula .bs-search-overlay {
  background: rgba(11, 15, 26, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#os.theme-nebula input, #os.theme-nebula textarea, #os.theme-nebula select { color-scheme: dark; }

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

/* studio apps */
#os.theme-nebula .studio {
  --st-accent: #7c6cff;
  --st-ai: #22d3ee;
  --st-bg: rgba(11, 15, 26, 0.55);
  --st-panel: rgba(18, 24, 42, 0.72);
  --st-line: rgba(124, 108, 255, 0.18);
  --st-line-soft: rgba(124, 108, 255, 0.1);
  --st-ink: #e8ecf7;
  --st-ink-soft: #9aa3c4;
}
#os.theme-nebula .st-toolbar,
#os.theme-nebula .st-sidebar,
#os.theme-nebula .st-inspector,
#os.theme-nebula .st-card {
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-radius: 12px;
}
#os.theme-nebula .st-nav-item.active {
  background: rgba(124, 108, 255, 0.18);
  color: #c4b5fd;
}

/* studio AI panel */
#os.theme-nebula .studio-ai-fab {
  background: linear-gradient(135deg, #7c6cff, #22d3ee);
  box-shadow: 0 8px 28px rgba(124, 108, 255, 0.45);
}
#os.theme-nebula .studio-ai-panel {
  background: rgba(18, 24, 42, 0.95);
  border-color: rgba(124, 108, 255, 0.25);
  color: var(--ink);
}
#os.theme-nebula .studio-ai-msg.user { background: rgba(124, 108, 255, 0.2); }
#os.theme-nebula .studio-ai-msg.ai { background: rgba(34, 211, 238, 0.08); }
#os.theme-nebula .studio-ai-send {
  background: linear-gradient(135deg, #7c6cff, #22d3ee);
}

/* OS assistant */
body.theme-nebula .os-ai-fab {
  background: linear-gradient(135deg, #7c6cff, #22d3ee);
}
body.theme-nebula .os-ai-input:focus { border-color: #7c6cff; }
body.theme-nebula .os-ai-send,
body.theme-nebula .os-ai-open {
  background: linear-gradient(135deg, #7c6cff, #22d3ee);
}
body.theme-nebula .os-ai-field.needed .os-ai-field-label { color: #22d3ee; }
body.theme-nebula .os-ai-field-input:focus { border-color: #7c6cff; }
