/* SciDocs Unified UI -------------------------------------------------------
   Shared visual language for App Hub, Guia Pratico and SciDocs Pro.
   This file intentionally changes presentation only; application behavior
   stays in each product's own scripts. */

:root {
  --sc-shell-bg: #eef2f7;
  --sc-shell-panel: #ffffff;
  --sc-shell-panel-soft: #f8fafc;
  --sc-shell-panel-muted: #f1f5f9;
  --sc-shell-border: #d8e1ec;
  --sc-shell-border-strong: #c4cfdd;
  --sc-shell-text: #0f172a;
  --sc-shell-muted: #64748b;
  --sc-shell-accent: #4f46e5;
  --sc-shell-accent-hover: #4338ca;
  --sc-shell-accent-soft: #eef2ff;
  --sc-shell-info: #0284c7;
  --sc-shell-success: #059669;
  --sc-shell-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  --sc-shell-shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.05);
  --sc-shell-radius: 10px;
  --sc-shell-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.scidocs-shell {
  color: var(--sc-shell-text);
  background: var(--sc-shell-bg) !important;
  font-family: var(--sc-shell-font) !important;
}

body.scidocs-shell[data-theme="dark"] {
  --sc-shell-bg: #0f172a;
  --sc-shell-panel: #111827;
  --sc-shell-panel-soft: #172033;
  --sc-shell-panel-muted: #1e293b;
  --sc-shell-border: #334155;
  --sc-shell-border-strong: #475569;
  --sc-shell-text: #f8fafc;
  --sc-shell-muted: #94a3b8;
  --sc-shell-accent-soft: rgba(99, 102, 241, 0.17);
  --sc-shell-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  --sc-shell-shadow-soft: 0 3px 10px rgba(0, 0, 0, 0.18);
}

body.scidocs-shell[data-theme="cosmos"] {
  --sc-shell-bg: #050814;
  --sc-shell-panel: #080d1c;
  --sc-shell-panel-soft: #0d1428;
  --sc-shell-panel-muted: #121b32;
  --sc-shell-border: #273550;
  --sc-shell-border-strong: #394a6b;
  --sc-shell-text: #f8fafc;
  --sc-shell-muted: #94a3b8;
  --sc-shell-accent: #6366f1;
  --sc-shell-accent-hover: #818cf8;
  --sc-shell-accent-soft: rgba(99, 102, 241, 0.16);
  background: radial-gradient(circle at 50% -15%, #17234a 0%, #070a16 48%, #03050b 100%) !important;
}

/* App Hub ---------------------------------------------------------------- */
body.scidocs-shell-hub > header {
  min-height: 58px;
  color: var(--sc-shell-text) !important;
  background: color-mix(in srgb, var(--sc-shell-panel) 94%, transparent) !important;
  border-color: var(--sc-shell-border) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04) !important;
  backdrop-filter: blur(16px);
}

body.scidocs-shell-hub > header h1 { color: var(--sc-shell-text) !important; }
body.scidocs-shell-hub > header p { color: var(--sc-shell-muted) !important; }
body.scidocs-shell-hub > header > div { min-height: 58px !important; padding-top: 8px !important; padding-bottom: 8px !important; }

body.scidocs-shell-hub > header .bg-slate-800\/90,
body.scidocs-shell-hub > header .bg-slate-800 {
  color: var(--sc-shell-muted) !important;
  background: var(--sc-shell-panel-soft) !important;
  border-color: var(--sc-shell-border) !important;
  box-shadow: none !important;
}

body.scidocs-shell-hub > header .ws-tab-btn { color: var(--sc-shell-muted) !important; }
body.scidocs-shell-hub > header .ws-tab-btn:hover { color: var(--sc-shell-text) !important; background: var(--sc-shell-panel-muted) !important; }
body.scidocs-shell-hub > header .ws-tab-btn.active {
  color: #fff !important;
  background: var(--sc-shell-accent) !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.22) !important;
}

body.scidocs-shell-hub .hero-banner,
body.scidocs-shell-hub #area-apps > section:first-child,
body.scidocs-shell-hub #area-dev > section:first-child {
  color: var(--sc-shell-text) !important;
  background: linear-gradient(135deg, var(--sc-shell-panel) 0%, var(--sc-shell-accent-soft) 150%) !important;
  border-color: var(--sc-shell-border) !important;
  box-shadow: var(--sc-shell-shadow) !important;
}

body.scidocs-shell-hub #area-apps > section:first-child h2,
body.scidocs-shell-hub #area-dev > section:first-child h2 { color: var(--sc-shell-text) !important; text-shadow: none !important; }
body.scidocs-shell-hub #area-apps > section:first-child p,
body.scidocs-shell-hub #area-dev > section:first-child p { color: var(--sc-shell-muted) !important; }

body.scidocs-shell-hub .app-card,
body.scidocs-shell-hub .dev-shortcut-card {
  color: var(--sc-shell-text) !important;
  background: var(--sc-shell-panel) !important;
  border-color: var(--sc-shell-border) !important;
  border-radius: var(--sc-shell-radius) !important;
  box-shadow: var(--sc-shell-shadow-soft) !important;
}

body.scidocs-shell-hub .app-card:hover,
body.scidocs-shell-hub .dev-shortcut-card:hover {
  border-color: color-mix(in srgb, var(--sc-shell-accent) 55%, var(--sc-shell-border)) !important;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.12) !important;
}

body.scidocs-shell-hub .app-card h4,
body.scidocs-shell-hub .dev-shortcut-card h4 { color: var(--sc-shell-text) !important; }
body.scidocs-shell-hub .app-card p,
body.scidocs-shell-hub .dev-shortcut-card p { color: var(--sc-shell-muted) !important; }

/* Apps and developer shortcuts share the same compact card rhythm. */
body.scidocs-shell-hub .app-card > div:first-child { padding: 1.25rem !important; }
body.scidocs-shell-hub .app-card > div:first-child > div:first-child > div:first-child {
  width: 2.5rem !important;
  height: 2.5rem !important;
}
body.scidocs-shell-hub .app-card > div:first-child > div:first-child > div:first-child i { font-size: 1.05rem !important; }
body.scidocs-shell-hub .app-card h4 { margin-top: 1rem !important; font-size: .95rem !important; }
body.scidocs-shell-hub .app-card p { margin-top: .375rem !important; font-size: .75rem !important; line-height: 1.55 !important; }
body.scidocs-shell-hub .app-card > div:last-child { padding: .75rem 1.25rem !important; }
body.scidocs-shell-hub .app-card > div:last-child a { font-size: .75rem !important; }

body.scidocs-shell-hub[data-theme="light"] .dev-shortcut-card > div:first-child > div:first-child > div:first-child {
  color: #2563eb !important;
  background: #eff6ff !important;
  border: 1px solid #dbeafe;
  box-shadow: none !important;
}
body.scidocs-shell-hub[data-theme="light"] .dev-shortcut-card > div:first-child > div:first-child > div:first-child i {
  color: #2563eb !important;
}
body.scidocs-shell-hub[data-theme="light"] .dev-shortcut-card > div:last-child a,
body.scidocs-shell-hub[data-theme="light"] .app-card > div:last-child a { color: #334155 !important; }
body.scidocs-shell-hub[data-theme="light"] .dev-shortcut-card > div:last-child a:hover,
body.scidocs-shell-hub[data-theme="light"] .app-card > div:last-child a:hover { color: #4338ca !important; }
body.scidocs-shell-hub[data-theme="light"] .dev-shortcut-card > div:last-child i { color: #64748b !important; }

/* Guia Pratico ------------------------------------------------------------ */
body.scidocs-shell-guide > header {
  color: var(--sc-shell-text) !important;
  background: color-mix(in srgb, var(--sc-shell-panel) 95%, transparent) !important;
  border-color: var(--sc-shell-border) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04) !important;
  backdrop-filter: blur(16px);
}

body.scidocs-shell-guide > header > div { padding-top: 9px !important; padding-bottom: 9px !important; }
body.scidocs-shell-guide > header h1 { color: var(--sc-shell-text) !important; }
body.scidocs-shell-guide > header p { color: var(--sc-shell-muted) !important; }
body.scidocs-shell-guide > header a:first-child {
  background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
  border-radius: 9px !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.22) !important;
}

body.scidocs-shell-guide > header input,
body.scidocs-shell-guide > header button,
body.scidocs-shell-guide > header a:not(:first-child) {
  color: var(--sc-shell-muted) !important;
  background: var(--sc-shell-panel-soft) !important;
  border-color: var(--sc-shell-border) !important;
  box-shadow: none !important;
}

body.scidocs-shell-guide > header input:focus { border-color: var(--sc-shell-accent) !important; }
body.scidocs-shell-guide > nav {
  top: 60px !important;
  background: color-mix(in srgb, var(--sc-shell-panel) 96%, transparent) !important;
  border-color: var(--sc-shell-border) !important;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
}

body.scidocs-shell-guide .nav-tab { color: var(--sc-shell-muted) !important; border-radius: 7px !important; }
body.scidocs-shell-guide .nav-tab:hover { color: var(--sc-shell-text) !important; background: var(--sc-shell-panel-muted) !important; }
body.scidocs-shell-guide .nav-tab.active {
  color: #fff !important;
  background: var(--sc-shell-accent) !important;
  border-color: var(--sc-shell-accent) !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.22) !important;
}

body.scidocs-shell-guide main { max-width: 1480px !important; }
body.scidocs-shell-guide .guide-module > div:first-child,
body.scidocs-shell-guide article.bg-slate-900,
body.scidocs-shell-guide div.bg-slate-900,
body.scidocs-shell-guide .guide-example-card {
  color: var(--sc-shell-text) !important;
  background: var(--sc-shell-panel) !important;
  border-color: var(--sc-shell-border) !important;
  border-radius: var(--sc-shell-radius) !important;
  box-shadow: var(--sc-shell-shadow-soft) !important;
}

body.scidocs-shell-guide .guide-example-header {
  background: var(--sc-shell-panel) !important;
  border-color: var(--sc-shell-border) !important;
}

body.scidocs-shell-guide .guide-example-title,
body.scidocs-shell-guide .guide-example-summary strong { color: var(--sc-shell-text) !important; }
body.scidocs-shell-guide .guide-example-description,
body.scidocs-shell-guide .guide-example-summary p { color: var(--sc-shell-muted) !important; }
body.scidocs-shell-guide .code-box,
body.scidocs-shell-guide .preview-card,
body.scidocs-shell-guide .guide-example-code,
body.scidocs-shell-guide .guide-example-summary {
  background: var(--sc-shell-panel-soft) !important;
  border-color: var(--sc-shell-border) !important;
  box-shadow: none !important;
}

body.scidocs-shell-guide .expanded-catalog { border-color: var(--sc-shell-border) !important; }

/* Keep original and expanded guide examples on the same module palette. */
body.scidocs-shell-guide #module-ascii .preview-card,
body.scidocs-shell-guide #module-ascii .guide-example-summary,
body.scidocs-shell-guide #module-ascii pre.bg-\[\#130d24\] {
  color: #e9d5ff !important;
  background: #130d24 !important;
  border-color: rgba(168, 85, 247, .58) !important;
}
body.scidocs-shell-guide #module-ascii .guide-ascii-output { color: inherit !important; }

body.scidocs-shell-guide #module-codigo .guide-example-summary,
body.scidocs-shell-guide #module-codigo div.bg-slate-950.font-mono {
  color: #6ee7b7 !important;
  background: #071a16 !important;
  border-color: #14532d !important;
}
body.scidocs-shell-guide #module-codigo .guide-example-code,
body.scidocs-shell-guide #module-codigo .code-box { background: #080d1a !important; }

body.scidocs-shell-guide[data-theme="light"] #module-ascii .preview-card,
body.scidocs-shell-guide[data-theme="light"] #module-ascii .guide-example-summary,
body.scidocs-shell-guide[data-theme="light"] #module-ascii pre.bg-\[\#130d24\] {
  color: #6b21a8 !important;
  background: #faf5ff !important;
  border-color: #d8b4fe !important;
}
body.scidocs-shell-guide[data-theme="light"] #module-codigo .guide-example-summary,
body.scidocs-shell-guide[data-theme="light"] #module-codigo div.bg-slate-950.font-mono {
  color: #166534 !important;
  background: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
}
body.scidocs-shell-guide[data-theme="light"] #module-codigo .guide-example-code,
body.scidocs-shell-guide[data-theme="light"] #module-codigo .code-box {
  color: #0f172a !important;
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

/* Mermaid is rendered with the active theme and these rules keep every family legible. */
body.scidocs-shell-guide .mermaid-wrap svg { background: transparent !important; }
body.scidocs-shell-guide .mermaid-wrap text,
body.scidocs-shell-guide .mermaid-wrap .label,
body.scidocs-shell-guide .mermaid-wrap .nodeLabel,
body.scidocs-shell-guide .mermaid-wrap .edgeLabel { color: #e2e8f0 !important; fill: #e2e8f0 !important; }
body.scidocs-shell-guide .mermaid-wrap .edgePath path,
body.scidocs-shell-guide .mermaid-wrap .flowchart-link { stroke: #67e8f9 !important; }
body.scidocs-shell-guide .mermaid-wrap .edgeLabel rect,
body.scidocs-shell-guide .mermaid-wrap .labelBkg { fill: #080d1a !important; opacity: .96 !important; }

body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap,
body.scidocs-shell-guide[data-theme="light"] .guide-example-preview.mermaid-wrap {
  color: #0f172a !important;
  background: #ffffff !important;
  border-color: #d8e1ec !important;
}
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .node rect,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .node circle,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .node ellipse,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .node polygon,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .node path {
  fill: #eef2ff !important;
  stroke: #4f46e5 !important;
}
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap text,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .label,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .nodeLabel,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .edgeLabel,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap span,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap p {
  color: #0f172a !important;
  fill: #0f172a !important;
}
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .edgePath path,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .flowchart-link,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .messageLine0,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .messageLine1 { stroke: #64748b !important; }
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap marker path { fill: #64748b !important; stroke: #64748b !important; }
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .edgeLabel rect,
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .labelBkg { fill: #ffffff !important; opacity: .96 !important; }
body.scidocs-shell-guide[data-theme="light"] .mermaid-wrap .cluster rect {
  fill: #f8fafc !important;
  stroke: #cbd5e1 !important;
}

/* SciDocs Pro ------------------------------------------------------------- */
body.scidocs-shell-pro,
body.scidocs-shell-pro.light-theme {
  --bg-void: #eef2f7;
  --bg-deep: #ffffff;
  --bg-surface: #ffffff;
  --bg-panel: #ffffff;
  --bg-elevated: #f8fafc;
  --bg-card: #f1f5f9;
  --border-dim: #e2e8f0;
  --border-mid: #d8e1ec;
  --border-bright: #aebccd;
  --border-active: #6366f1;
  --cyan-dim: #e0e7ff;
  --cyan-mid: #4f46e5;
  --cyan-base: #4f46e5;
  --cyan-bright: #6366f1;
  --cyan-glow: rgba(79, 70, 229, 0.10);
  --cyan-glow2: rgba(79, 70, 229, 0.06);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-ghost: #94a3b8;
  --green-ok: #059669;
  --header-h: 58px;
  --tabs-h: 39px;
  --toolbar-h: 43px;
  --toolbar-extra-h: 0px;
  --statusbar-h: 27px;
  background: var(--sc-shell-bg) !important;
  color: var(--sc-shell-text) !important;
  font-family: var(--sc-shell-font) !important;
}

body.scidocs-shell-pro .bracket-corner { display: none !important; }
body.scidocs-shell-pro #app-header {
  color: var(--sc-shell-text) !important;
  background: #fff !important;
  border-bottom: 1px solid var(--sc-shell-border) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04) !important;
  gap: 9px;
}

body.scidocs-shell-pro .logo-glyph {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff !important;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-radius: 9px;
  filter: none !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.2);
}

body.scidocs-shell-pro .logo-glyph svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; }
body.scidocs-shell-pro .logo-text { color: var(--sc-shell-text) !important; font: 700 15px/1 var(--sc-shell-font) !important; letter-spacing: -.2px !important; text-shadow: none !important; }
body.scidocs-shell-pro .logo-sub { color: var(--sc-shell-muted) !important; font: 500 9px/1.2 var(--sc-shell-font) !important; letter-spacing: 0 !important; text-transform: none !important; }
body.scidocs-shell-pro .header-tag { display: none; }
body.scidocs-shell-pro .header-sep { background: var(--sc-shell-border); }
body.scidocs-shell-pro #header-status { color: var(--sc-shell-muted); font-family: var(--sc-shell-font); letter-spacing: 0; }

body.scidocs-shell-pro .ptog-btn,
body.scidocs-shell-pro .hdr-btn,
body.scidocs-shell-pro .btn-save-main {
  min-height: 29px;
  color: var(--sc-shell-muted) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  clip-path: none !important;
  font: 600 10px/1 var(--sc-shell-font) !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

body.scidocs-shell-pro .ptog-btn:hover,
body.scidocs-shell-pro .hdr-btn:hover { color: var(--sc-shell-text) !important; background: var(--sc-shell-panel-muted) !important; }
body.scidocs-shell-pro .ptog-btn.active { color: var(--sc-shell-accent) !important; background: var(--sc-shell-accent-soft) !important; }
body.scidocs-shell-pro .btn-save-main { color: #fff !important; background: var(--sc-shell-accent) !important; padding-inline: 13px; }
body.scidocs-shell-pro .btn-save-main::before { display: none; }
body.scidocs-shell-pro .btn-save-main:hover { background: var(--sc-shell-accent-hover) !important; }

body.scidocs-shell-pro #tabs-row {
  background: #f8fafc !important;
  border-bottom-color: var(--sc-shell-border) !important;
  padding-inline: 14px;
}

body.scidocs-shell-pro .tab-btn { color: var(--sc-shell-muted); border-radius: 7px 7px 0 0; font-family: var(--sc-shell-font); letter-spacing: 0; }
body.scidocs-shell-pro .tab-btn:hover { color: var(--sc-shell-text); background: var(--sc-shell-panel-muted); }
body.scidocs-shell-pro .tab-btn.active { color: var(--sc-shell-accent); background: #fff; border-color: var(--sc-shell-border); border-bottom-color: #fff; }

body.scidocs-shell-pro #toolbar {
  background: #fff !important;
  border-bottom-color: var(--sc-shell-border) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  padding-inline: 14px;
  gap: 2px;
}

body.scidocs-shell-pro #toolbar-secondary {
  position: fixed;
  top: calc(var(--header-h) + var(--tabs-h) + var(--toolbar-h));
  left: 0;
  right: 0;
  z-index: 997;
  min-height: 39px;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  color: var(--sc-shell-text);
  background: #f8fafc;
  border-bottom: 1px solid var(--sc-shell-border);
  box-shadow: 0 3px 10px rgba(15, 23, 42, .05);
  overflow-x: auto;
  overflow-y: hidden;
}

body.scidocs-shell-pro #toolbar-secondary[hidden] { display: none !important; }
body.scidocs-shell-pro #toolbar-secondary:not([hidden]) { display: flex; }
body.scidocs-shell-pro.pro-toolbar-expanded { --toolbar-extra-h: 39px; }
body.scidocs-shell-pro.pro-toolbar-expanded #main-layout,
body.scidocs-shell-pro.pro-toolbar-expanded #symbol-panel {
  top: calc(var(--header-h) + var(--tabs-h) + var(--toolbar-h) + var(--toolbar-extra-h)) !important;
}

body.scidocs-shell-pro .pro-toolbar-toggle[aria-expanded="true"] {
  color: var(--sc-shell-accent) !important;
  background: var(--sc-shell-accent-soft) !important;
}

body.scidocs-shell-pro .pro-command-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 8px;
  border-right: 1px solid var(--sc-shell-border);
  flex: 0 0 auto;
}

body.scidocs-shell-pro .pro-command-group:last-child { border-right: 0; }
body.scidocs-shell-pro .pro-command-btn {
  display: inline-flex;
  height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  color: var(--sc-shell-muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: 600 10px/1 var(--sc-shell-font);
  white-space: nowrap;
  cursor: pointer;
}

body.scidocs-shell-pro .pro-command-btn:hover { color: var(--sc-shell-text); background: var(--sc-shell-panel-muted); }
body.scidocs-shell-pro .pro-command-btn > span:first-child { color: var(--sc-shell-accent); font-weight: 800; }
body.scidocs-shell-pro .pro-command-primary { color: var(--sc-shell-accent); background: var(--sc-shell-accent-soft); }

body.scidocs-shell-pro .tb-btn {
  color: var(--sc-shell-muted) !important;
  border: 0 !important;
  border-radius: 6px;
  background: transparent !important;
}

body.scidocs-shell-pro #toolbar .tb-btn img { filter: brightness(0) saturate(100%) !important; opacity: .8 !important; }
body.scidocs-shell-pro .tb-btn:hover { color: var(--sc-shell-text) !important; background: var(--sc-shell-panel-muted) !important; }
body.scidocs-shell-pro .tb-sep { background: var(--sc-shell-border); }
body.scidocs-shell-pro #main-layout { background: #dfe6ef !important; }
body.scidocs-shell-pro #toc-panel,
body.scidocs-shell-pro #editor-panel,
body.scidocs-shell-pro #preview-panel { background: var(--sc-shell-panel) !important; }
body.scidocs-shell-pro #toc-panel { border-right: 1px solid var(--sc-shell-border); }
body.scidocs-shell-pro #md-editor { color: var(--sc-shell-text) !important; background: #fff !important; font-family: "JetBrains Mono", ui-monospace, monospace; }
body.scidocs-shell-pro #preview-scroll { background: #dfe6ef !important; }
body.scidocs-shell-pro .panel-hdr,
body.scidocs-shell-pro .editor-hdr,
body.scidocs-shell-pro .preview-hdr { background: #f8fafc !important; border-color: var(--sc-shell-border) !important; }
body.scidocs-shell-pro .panel-label,
body.scidocs-shell-pro .editor-module-tag,
body.scidocs-shell-pro .preview-module-tag { color: var(--sc-shell-accent) !important; font-family: var(--sc-shell-font) !important; letter-spacing: .04em !important; }
body.scidocs-shell-pro #status-bar { color: var(--sc-shell-muted); background: #f8fafc !important; border-color: var(--sc-shell-border) !important; }
body.scidocs-shell-pro .resize-handle { background: var(--sc-shell-border); }

body.scidocs-shell-pro #preview-content .page-break {
  position: relative;
  height: 22px;
  margin: 24px 0;
  border-top: 1px dashed #94a3b8;
}

body.scidocs-shell-pro #preview-content .page-break::after {
  content: "Quebra de página";
  position: absolute;
  top: -10px;
  left: 50%;
  padding: 2px 8px;
  color: #64748b;
  background: #fff;
  font: 600 9px/1.4 var(--sc-shell-font);
  transform: translateX(-50%);
}

body.scidocs-shell-pro #preview-content .section-break { border: 0; border-top: 2px solid #cbd5e1; margin: 28px 0; }
body.scidocs-shell-pro #preview-content .scientific-cover { padding: 52px 36px; text-align: center; border: 1px solid #cbd5e1; background: #fff; }
body.scidocs-shell-pro #preview-content .scientific-definition,
body.scidocs-shell-pro #preview-content .scientific-palette { padding: 18px; border: 1px solid #cbd5e1; border-left: 4px solid var(--sc-shell-accent); border-radius: 7px; background: #f8fafc; }

body.scidocs-shell-pro #modal-box,
body.scidocs-shell-pro #fs-load-box,
body.scidocs-shell-pro #save-file-box,
body.scidocs-shell-pro .settings-panel {
  color: var(--sc-shell-text) !important;
  background: #fff !important;
  border: 1px solid var(--sc-shell-border) !important;
  border-radius: 10px !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .2) !important;
}

body.scidocs-shell-pro .modal-title,
body.scidocs-shell-pro .settings-title,
body.scidocs-shell-pro .fs-load-title { color: var(--sc-shell-text) !important; font-family: var(--sc-shell-font) !important; letter-spacing: 0 !important; }
body.scidocs-shell-pro .modal-eyebrow,
body.scidocs-shell-pro .fs-load-eyebrow,
body.scidocs-shell-pro .section-title { color: var(--sc-shell-accent) !important; }

/* The Pro edition keeps the same SciDocs geometry in both themes. */
body.scidocs-shell-pro:not(.light-theme) {
  --bg-void: #070b16;
  --bg-deep: #080d19;
  --bg-surface: #0b1220;
  --bg-panel: #0d1424;
  --bg-elevated: #121b2e;
  --bg-card: #18243a;
  --border-dim: #25344d;
  --border-mid: #334662;
  --border-bright: #506685;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #b8c5d8;
  --text-ghost: #8ea0b8;
  --cyan-mid: #9ba1ff;
  --cyan-base: #aeb3ff;
  --cyan-bright: #c7caff;
  --sc-shell-bg: #070b16;
  --sc-shell-panel: #0d1424;
  --sc-shell-panel-soft: #121b2e;
  --sc-shell-panel-muted: #18243a;
  --sc-shell-border: #2a3953;
  --sc-shell-border-strong: #3b4e6d;
  --sc-shell-text: #eef4ff;
  --sc-shell-muted: #b8c5d8;
  --sc-shell-accent: #7c83ff;
  --sc-shell-accent-hover: #9297ff;
  --sc-shell-accent-soft: rgba(124, 131, 255, .16);
}

body.scidocs-shell-pro.light-theme {
  --sc-shell-bg: #eef2f7;
  --sc-shell-panel: #ffffff;
  --sc-shell-panel-soft: #f8fafc;
  --sc-shell-panel-muted: #f1f5f9;
  --sc-shell-border: #d8e1ec;
  --sc-shell-border-strong: #c4cfdd;
  --sc-shell-text: #0f172a;
  --sc-shell-muted: #52647a;
  --sc-shell-accent: #4f46e5;
  --sc-shell-accent-hover: #4338ca;
  --sc-shell-accent-soft: #eef2ff;
}

body.scidocs-shell-pro:not(.light-theme) #app-header,
body.scidocs-shell-pro:not(.light-theme) #toolbar { background: #080d19 !important; }
body.scidocs-shell-pro:not(.light-theme) #toolbar .tb-btn img {
  filter: brightness(0) saturate(100%) invert(90%) sepia(10%) saturate(442%) hue-rotate(181deg) brightness(93%) contrast(94%) !important;
  opacity: .92 !important;
}
body.scidocs-shell-pro:not(.light-theme) #toolbar .tb-btn:hover img {
  filter: brightness(0) saturate(100%) invert(100%) !important;
  opacity: 1 !important;
}
body.scidocs-shell-pro:not(.light-theme) .hdr-btn,
body.scidocs-shell-pro:not(.light-theme) .ptog-btn,
body.scidocs-shell-pro:not(.light-theme) .tb-btn,
body.scidocs-shell-pro:not(.light-theme) .pro-command-btn { color: #b8c5d8 !important; }
body.scidocs-shell-pro:not(.light-theme) .hdr-btn:hover,
body.scidocs-shell-pro:not(.light-theme) .ptog-btn:hover,
body.scidocs-shell-pro:not(.light-theme) .tb-btn:hover,
body.scidocs-shell-pro:not(.light-theme) .pro-command-btn:hover { color: #ffffff !important; }
body.scidocs-shell-pro.light-theme #toolbar .tb-btn:hover img {
  filter: brightness(0) saturate(100%) invert(31%) sepia(98%) saturate(1220%) hue-rotate(226deg) brightness(87%) contrast(95%) !important;
  opacity: 1 !important;
}
body.scidocs-shell-pro:not(.light-theme) .setting-label,
body.scidocs-shell-pro:not(.light-theme) .s-chk-label,
body.scidocs-shell-pro:not(.light-theme) .settings-section label { color: #cbd5e1 !important; }
body.scidocs-shell-pro:not(.light-theme) .setting-input {
  color: #f8fafc !important;
  background: #0b1220 !important;
  border-color: #334662 !important;
}
body.scidocs-shell-pro:not(.light-theme) .close-settings,
body.scidocs-shell-pro:not(.light-theme) .btn-settings-reset { color: #b8c5d8 !important; }
body.scidocs-shell-pro .panel-toggles {
  gap: 2px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
body.scidocs-shell-pro:not(.light-theme) #tabs-row,
body.scidocs-shell-pro:not(.light-theme) #toolbar-secondary,
body.scidocs-shell-pro:not(.light-theme) .panel-hdr,
body.scidocs-shell-pro:not(.light-theme) .editor-hdr,
body.scidocs-shell-pro:not(.light-theme) .preview-hdr,
body.scidocs-shell-pro:not(.light-theme) #status-bar { background: #0b1220 !important; }
body.scidocs-shell-pro:not(.light-theme) .tab-btn.active {
  color: #aeb3ff;
  background: var(--sc-shell-panel);
  border-color: var(--sc-shell-border);
  border-bottom-color: var(--sc-shell-panel);
}
body.scidocs-shell-pro:not(.light-theme) #main-layout,
body.scidocs-shell-pro:not(.light-theme) #preview-scroll { background: #050914 !important; }
body.scidocs-shell-pro:not(.light-theme) #md-editor { color: var(--sc-shell-text) !important; background: #090f1d !important; }
body.scidocs-shell-pro:not(.light-theme) #preview-content .page-break::after { color: var(--sc-shell-muted); background: var(--sc-shell-panel); }
body.scidocs-shell-pro:not(.light-theme) #preview-content .scientific-cover { border-color: var(--sc-shell-border); background: var(--sc-shell-panel); }
body.scidocs-shell-pro:not(.light-theme) #preview-content .scientific-definition,
body.scidocs-shell-pro:not(.light-theme) #preview-content .scientific-palette { border-color: var(--sc-shell-border); background: var(--sc-shell-panel-soft); }
body.scidocs-shell-pro:not(.light-theme) #modal-box,
body.scidocs-shell-pro:not(.light-theme) #fs-load-box,
body.scidocs-shell-pro:not(.light-theme) #save-file-box,
body.scidocs-shell-pro:not(.light-theme) .settings-panel { background: var(--sc-shell-panel) !important; }

@media (max-width: 1100px) {
  body.scidocs-shell-pro .header-tag,
  body.scidocs-shell-pro #header-status,
  body.scidocs-shell-pro .header-sep { display: none !important; }
  body.scidocs-shell-pro #app-header { gap: 5px; padding-inline: 9px; }
  body.scidocs-shell-pro .hdr-btn { padding-inline: 7px; }
}

@media (max-width: 760px) {
  body.scidocs-shell-hub > header > div,
  body.scidocs-shell-guide > header > div { align-items: stretch !important; }
  body.scidocs-shell-guide > nav { top: 113px !important; }
  body.scidocs-shell-pro .panel-toggles,
  body.scidocs-shell-pro #header-status { display: none !important; }
}
