/* BioStudio AI — Pulse tone (theme-pulse).
   Bright clinical teal: clear hierarchy, high readability, grid layout.
   Light-first. Dashboard: js/core/bsx-dashboard.js layout="grid". */

body.theme-pulse,
#os.theme-pulse {
  --bsx-bg: #f0fdfa;
  --bsx-surface: #ffffff;
  --bsx-surface-2: #f0fdfa;
  --bsx-border: rgba(13, 148, 136, 0.18);
  --bsx-accent: #0d9488;
  --bsx-accent-strong: #0f766e;
  --bsx-accent-ink: #ffffff;
  --bsx-accent-soft: rgba(13, 148, 136, 0.1);
  --bsx-radius: 12px;
  --bsx-radius-lg: 16px;
  --bsx-shadow: 0 4px 20px rgba(13, 148, 136, 0.08);
  --bsx-shadow-lg: 0 20px 50px rgba(13, 148, 136, 0.12);
  --bsx-blur: none;

  --ink: #134e4a;
  --ink-soft: #5b7c78;
  --radius: 12px;
  --taskbar-h: 68px;
  --accent: #0d9488;

  --win-bg: #ffffff;
  --win-body-bg: #f8fffe;
  --win-border: rgba(13, 148, 136, 0.15);
  --win-border-focus: #0d9488;
  --titlebar-bg: #f0fdfa;
  --flyout-bg: #ffffff;
  --flyout-border: rgba(13, 148, 136, 0.12);
  --tile-bg: #f0fdfa;
  --tile-hover: rgba(13, 148, 136, 0.1);
  --input-bg: #ffffff;
  --input-border: rgba(13, 148, 136, 0.22);

  --taskbar-bg: rgba(255, 255, 255, 0.94);
  --taskbar-border: rgba(13, 148, 136, 0.15);
  --tb-hover: rgba(13, 148, 136, 0.1);
  --tb-active: rgba(13, 148, 136, 0.08);
  --app-btn-hover: rgba(13, 148, 136, 0.06);

  color: var(--ink);
}

#os.wp-pulse,
#os.wp-pulse.dark {
  background:
    linear-gradient(rgba(13, 148, 136, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 148, 136, 0.04) 1px, transparent 1px),
    radial-gradient(800px 500px at 90% 0%, rgba(13, 148, 136, 0.08), transparent 55%),
    linear-gradient(180deg, #f8fffe 0%, #f0fdfa 100%);
  background-size: 32px 32px, 32px 32px, 100% 100%, 100% 100%;
}

/* dashboard flourishes */
.pls-home .bsx-greeting h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #134e4a;
}
.pls-home .bsx-greeting p { color: var(--ink-soft); }
.pls-home .bsx-sec-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bsx-accent);
}
.pls-home[data-layout="grid"] .bsx-proj {
  border-left: 3px solid transparent;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.pls-home[data-layout="grid"] .bsx-proj:hover {
  border-left-color: var(--bsx-accent);
  background: var(--bsx-accent-soft);
}
.pls-home .bsx-nav-link.active {
  color: var(--bsx-accent-strong);
  background: var(--bsx-accent-soft);
  font-weight: 600;
}
.pls-home .bsx-brand-dot { background: var(--bsx-accent); }
.pls-home .bsw-stat-value { color: var(--bsx-accent-strong); font-weight: 700; }

/* window + dock */
#os.theme-pulse .window-titlebar { border-bottom: 1px solid var(--bsx-border); }
#os.theme-pulse .window.focused { box-shadow: var(--bsx-shadow-lg), 0 0 0 2px rgba(13, 148, 136, 0.35); }
#os.theme-pulse .taskbar.bs-dock {
  border-radius: 14px;
  box-shadow: var(--bsx-shadow-lg);
}
#os.theme-pulse .taskbar.bs-dock .taskbar-start {
  background: var(--bsx-accent);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

body.theme-pulse .platform-dialog-overlay { background: rgba(19, 78, 74, 0.2); }

#os.theme-pulse input, #os.theme-pulse textarea, #os.theme-pulse select { color-scheme: light; }
#os.theme-pulse th { background: #f0fdfa; color: var(--ink-soft); border-color: var(--bsx-border); }
#os.theme-pulse tbody tr:hover td { background: var(--bsx-accent-soft); }

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

/* studio apps */
#os.theme-pulse .studio {
  --st-accent: #0d9488;
  --st-ai: #0f766e;
  --st-bg: #f8fffe;
  --st-panel: #ffffff;
  --st-line: rgba(13, 148, 136, 0.14);
  --st-line-soft: rgba(13, 148, 136, 0.08);
  --st-ink: #134e4a;
  --st-ink-soft: #5b7c78;
}
#os.theme-pulse .st-nav-item.active {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
}
#os.theme-pulse .st-tbtn:hover,
#os.theme-pulse .st-btn.primary {
  border-color: var(--st-accent);
}

/* studio AI panel */
#os.theme-pulse .studio-ai-fab {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
}
#os.theme-pulse .studio-ai-panel {
  background: #ffffff;
  border-color: rgba(13, 148, 136, 0.2);
  color: var(--ink);
}
#os.theme-pulse .studio-ai-msg.user { background: rgba(13, 148, 136, 0.1); }
#os.theme-pulse .studio-ai-msg.ai { background: #f0fdfa; }
#os.theme-pulse .studio-ai-send { background: #0d9488; }

/* OS assistant */
body.theme-pulse .os-ai-fab { background: linear-gradient(135deg, #0d9488, #14b8a6); }
body.theme-pulse .os-ai-input:focus { border-color: #0d9488; }
body.theme-pulse .os-ai-send,
body.theme-pulse .os-ai-open { background: #0d9488; }
body.theme-pulse .os-ai-field.needed .os-ai-field-label { color: #0d9488; }
body.theme-pulse .os-ai-field-input:focus { border-color: #0d9488; }
