/* BioSphere · biblioteca de componentes
   Carrega depois de tokens.css. Toda cor, raio, espaço e sombra vem de um token.
   Prefixo: bs-. Os componentes gráficos (dot-matrix, régua, radar, linhas) são desenhados por bundle.js. */

/* ================= Base ================= */
[class^="bs-"][hidden], [class*=" bs-"][hidden], .bs-stage [hidden] { display: none !important; }
body { margin: 0; font-family: var(--font-sans); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.5; }
.bs-stage { padding: 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.bs-stage--col { flex-direction: column; align-items: stretch; }
.bs-stage--center { align-items: center; }
.bs-stage--raised { background: var(--surface-raised); }
.bs-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; width: 100%; }
.bs-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; width: 100%; }
.bs-cap { font-size: 11px; color: var(--ink-muted); font-family: var(--font-mono); }
.bs-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.bs-muted { color: var(--ink-muted); }
.bs-faint { color: var(--ink-faint); }
.bs-hl { color: var(--ink); }
:where(.bs, .bs-stage) :where(button), :where(button[class^="bs-"], button[class*=" bs-"]) { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:where([class^="bs-"], [class*=" bs-"]), :where([class^="bs-"], [class*=" bs-"])::before, :where([class^="bs-"], [class*=" bs-"])::after, :where([class^="bs-"], [class*=" bs-"]) :where(*) { box-sizing: border-box; }
:where([class^="bs-"], [class*=" bs-"]):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.bs-i { width: var(--size-icon); height: var(--size-icon); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bs-grain { position: relative; isolation: isolate; }
.bs-grain::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .22; mix-blend-mode: overlay; border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bs-halo { position: relative; isolation: isolate; overflow: hidden; }
.bs-halo::after {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 90%; z-index: -1; filter: blur(40px); opacity: .9;
  background: radial-gradient(40% 45% at 70% 30%, rgba(171, 116, 236, .22), transparent 70%), radial-gradient(35% 40% at 30% 60%, rgba(255, 190, 102, .18), transparent 70%), radial-gradient(30% 35% at 85% 75%, rgba(159, 244, 179, .22), transparent 70%);
}

/* ================= Ações ================= */
.bs-btn {
  height: var(--size-control-m); display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px;
  border-radius: var(--radius-pill); font-size: 13px; line-height: 1; white-space: nowrap; background: var(--surface-strong); color: var(--ink);
  transition: background .25s, transform .25s, opacity .25s;
}
.bs-btn:hover { transform: translateY(-1px); }
.bs-btn:active { transform: none; }
.bs-btn--ink { background: var(--ink); color: var(--on-ink); }
.bs-btn--accent { background: var(--mint); color: var(--on-mint); }
.bs-btn--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.bs-btn--ghost { background: transparent; color: var(--ink-muted); padding: 0 10px; }
.bs-btn--ghost:hover { color: var(--ink); transform: none; }
.bs-btn--glass { background: rgba(255, 255, 255, .18); color: var(--on-media); backdrop-filter: blur(var(--blur-bar)); -webkit-backdrop-filter: blur(var(--blur-bar)); }
.bs-btn--alert { background: var(--alert); color: var(--on-alert); }
.bs-btn--raised { background: var(--surface-raised); color: var(--ink); }
.bs-btn--s { height: var(--size-control-s); padding: 0 12px; font-size: 12px; gap: 6px; }
.bs-btn--l { height: var(--size-control-l); padding: 0 22px; font-size: 14px; }
.bs-btn--block { width: 100%; }
.bs-btn[disabled], .bs-btn.is-disabled { opacity: .4; pointer-events: none; }
.bs-btn.is-loading { pointer-events: none; }
.bs-btn.is-loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: bs-spin .8s linear infinite; }
@keyframes bs-spin { to { transform: rotate(360deg); } }

.bs-go {
  width: var(--size-control-m); height: var(--size-control-m); border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--surface-strong); color: var(--ink); transition: transform .4s cubic-bezier(.625, .05, 0, 1), background .3s;
}
.bs-go:hover { transform: rotate(45deg); background: var(--mint); color: var(--on-mint); }
.bs-go--ink { background: var(--ink); color: var(--on-ink); }
.bs-go--raised { background: var(--surface-raised); }
.bs-go--glass { background: rgba(255, 255, 255, .18); color: var(--on-media); backdrop-filter: blur(var(--blur-bar)); -webkit-backdrop-filter: blur(var(--blur-bar)); }
.bs-go--s { width: 36px; height: 36px; }
.bs-go--l { width: var(--size-control-l); height: var(--size-control-l); }

.bs-icon-btn {
  position: relative; width: var(--size-control-m); height: var(--size-control-m); border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--surface-glass); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-muted); transition: background .25s, color .25s;
  backdrop-filter: blur(var(--blur-bar)); -webkit-backdrop-filter: blur(var(--blur-bar));
}
.bs-icon-btn:hover { background: var(--surface-raised); color: var(--ink); }
.bs-icon-btn.is-active { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.bs-icon-btn--s { width: 36px; height: 36px; }

.bs-cta { width: 100%; height: var(--size-control-l); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 7px 0 20px; border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--ink); font-size: 13px; }
.bs-cta .bs-go { width: 38px; height: 38px; background: var(--ink); color: var(--on-ink); }

.bs-seg { display: inline-flex; padding: 4px; border-radius: var(--radius-pill); background: var(--surface-glass); box-shadow: inset 0 0 0 1px var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; backdrop-filter: blur(var(--blur-bar)); -webkit-backdrop-filter: blur(var(--blur-bar)); }
.bs-seg button { height: 36px; padding: 0 16px; border-radius: var(--radius-pill); font-size: 13px; color: var(--ink-muted); white-space: nowrap; transition: background .25s, color .25s; }
.bs-seg button:hover { color: var(--ink); }
.bs-seg button.is-active, .bs-seg button[aria-selected="true"] { background: var(--ink); color: var(--on-ink); }
.bs-seg--s button { height: 30px; padding: 0 12px; font-size: 12px; }
.bs-seg--raised { background: var(--surface-raised); }

.bs-chip { height: var(--size-control-s); display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: var(--radius-pill); font-size: 12.5px; background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-muted); transition: background .2s, color .2s; }
.bs-chip:hover { color: var(--ink); }
.bs-chip.is-on { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.bs-chip__n { font: 500 10.5px/1 var(--font-mono); padding: 3px 6px; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--ink-muted); }
.bs-chip.is-on .bs-chip__n { background: rgba(255, 255, 255, .16); color: var(--on-ink); }
.bs-chip--x::after { content: "×"; font-size: 14px; margin-left: 2px; opacity: .6; }
.bs-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ================= Status e rótulos ================= */
.bs-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 500; white-space: nowrap; background: var(--surface-raised); color: var(--ink-muted); }
.bs-tag--ink { background: var(--ink); color: var(--on-ink); }
.bs-tag--mint { background: var(--mint); color: var(--on-mint); }
.bs-tag--purple { background: var(--purple-soft); color: var(--purple-ink); }
.bs-tag--orange { background: var(--orange-soft); color: var(--orange-ink); }
.bs-tag--neutral { background: var(--surface-strong); color: var(--ink-muted); }
.bs-tag--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.bs-tag--glass { background: rgba(255, 255, 255, .92); color: #151515; }
.bs-tag--alert { background: var(--alert); color: var(--on-alert); }
.bs-tag--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bs-tag--s { height: 20px; padding: 0 8px; font-size: 10.5px; }

.bs-ctype { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 500; vertical-align: 2px; white-space: nowrap; }
.bs-ctype::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bs-ctype--fato { background: var(--surface-strong); color: var(--ink); }
.bs-ctype--interp { background: var(--blue-soft); color: var(--blue-ink); }
.bs-ctype--hip { background: var(--purple-soft); color: var(--purple-ink); }
.bs-ctype--lacuna { background: var(--orange-soft); color: var(--orange-ink); }
.bs-ctype--decisao { background: var(--mint-soft); color: var(--mint-ink); }
.bs-ctype--prev { background: var(--purple-tint); color: var(--purple); }

.bs-sens { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-muted); background: var(--surface-raised); }
.bs-sens .bs-i { width: 13px; height: 13px; }
.bs-sens--licensed { color: var(--purple-ink); background: var(--purple-tint); box-shadow: none; }
.bs-sens--confidential { color: var(--on-ink); background: var(--ink); box-shadow: none; }
.bs-sens--sensitive { color: var(--on-alert); background: var(--alert); box-shadow: none; }

.bs-status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 500; white-space: nowrap; }
.bs-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.bs-status--proposed { background: var(--surface-strong); color: var(--ink-muted); }
.bs-status--proposed::before { box-shadow: inset 0 0 0 1.5px currentColor; }
.bs-status--testing { background: var(--purple-soft); color: var(--purple-ink); }
.bs-status--testing::before { background: currentColor; animation: bs-pulse 1.4s infinite; }
.bs-status--confirmed { background: var(--mint); color: var(--on-mint); }
.bs-status--confirmed::before { background: currentColor; }
.bs-status--adjusted { background: var(--orange-soft); color: var(--orange-ink); }
.bs-status--adjusted::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px currentColor; }
.bs-status--refuted { background: var(--surface-strong); color: var(--ink-muted); text-decoration: line-through; text-decoration-color: var(--alert); }
.bs-status--refuted::before { background: var(--alert); }
@keyframes bs-pulse { 50% { opacity: .35; } }

.bs-mk { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font: 500 10px var(--font-mono); }
.bs-mk .bs-i { width: 13px; height: 13px; stroke-width: 2; }
.bs-mk--go { background: var(--mint); color: var(--on-mint); }
.bs-mk--pivot { background: var(--surface-raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.bs-mk--pause { background: var(--surface-strong); color: var(--ink); }
.bs-mk--stop { background: var(--ink); color: var(--on-ink); }
.bs-mk--next { background: var(--surface-raised); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.bs-mk--part { background: linear-gradient(90deg, var(--mint) 50%, var(--surface-strong) 50%); color: var(--ink); }
.bs-mk--miss { background: var(--orange-soft); color: var(--orange-ink); }
.bs-mk--s { width: 16px; height: 16px; }
.bs-mk--s .bs-i { width: 9px; height: 9px; }
.bs-mk--l { width: 36px; height: 36px; }
.bs-mk--l .bs-i { width: 16px; height: 16px; }

.bs-src { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-xs); font: 400 11px/22px var(--font-mono); background: var(--surface-sunken); color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; vertical-align: 2px; transition: background .2s; }
button.bs-src:hover { background: var(--surface-strong); color: var(--ink); }
.bs-src--dark { background: rgba(255, 255, 255, .1); color: var(--on-media); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.bs-srcs { display: inline-flex; flex-wrap: wrap; gap: 4px; }

.bs-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 11px; }
.bs-chain span { padding: 4px 9px; border-radius: var(--radius-pill); background: var(--surface-strong); color: var(--ink-muted); }
.bs-chain span.on { background: var(--ink); color: var(--on-ink); }
.bs-chain span.now { background: var(--mint); color: var(--on-mint); }
.bs-chain i { color: var(--ink-faint); font-style: normal; }

.bs-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); font: 500 11px/20px var(--font-mono); text-align: center; background: var(--mint); color: var(--on-mint); display: inline-block; }
.bs-count--ink { background: var(--ink); color: var(--on-ink); }
.bs-count--alert { background: var(--alert); color: var(--on-alert); }
.bs-icon-btn .bs-count { position: absolute; top: -3px; right: -3px; }
.bs-unread { width: 8px; height: 8px; border-radius: 50%; background: var(--purple); flex: none; display: inline-block; }
.bs-live { width: 8px; height: 8px; border-radius: 50%; background: var(--mint-strong); box-shadow: 0 0 0 4px var(--mint-soft); display: inline-block; animation: bs-pulse 1.6s infinite; }
.bs-tri { width: 22px; height: 20px; flex: none; }
.bs-tri--s { width: 16px; height: 15px; }
.bs-kbd { display: inline-block; font: 400 11px/1 var(--font-mono); padding: 4px 8px; border-radius: var(--radius-xs); background: var(--surface-strong); color: var(--ink-muted); }

.bs-avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 13px; font-weight: 500; color: #fff; background: linear-gradient(135deg, var(--purple-400), var(--orange)); flex: none; }
.bs-avatar--mint { background: linear-gradient(135deg, var(--mint-strong), var(--mint)); color: #151515; }
.bs-avatar--ink { background: linear-gradient(135deg, #363b44, #8e939d); }
.bs-avatar--s { width: 30px; height: 30px; font-size: 11px; }
.bs-avatar--l { width: 56px; height: 56px; font-size: 16px; }
.bs-avatars { display: flex; }
.bs-avatars .bs-avatar { margin-left: -8px; box-shadow: 0 0 0 3px var(--surface); }
.bs-avatars .bs-avatar:first-child { margin-left: 0; }

/* ================= Orbes 3D e ondas ================= */
.bs-orb {
  --c1: #d9b8ff; --c2: #8f3fe0; --c3: #4c0882;
  position: relative; display: inline-block; width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .95) 0 5%, rgba(255, 255, 255, 0) 18%), radial-gradient(circle at 65% 80%, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 35%), radial-gradient(circle at 40% 35%, var(--c1), var(--c2) 55%, var(--c3) 100%);
  box-shadow: inset -6px -10px 18px rgba(0, 0, 0, .18), inset 6px 8px 16px rgba(255, 255, 255, .45);
}
.bs-orb::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -26%; height: 30%; border-radius: 50%; background: var(--c2); filter: blur(12px); opacity: .45; z-index: -1; }
.bs-orb--mint { --c1: #e9fff0; --c2: #7fe39a; --c3: #1f8a41; }
.bs-orb--orange { --c1: #ffe6c4; --c2: #ff9f3a; --c3: #b8540a; }
.bs-orb--blue { --c1: #dfe6ff; --c2: #6f86ff; --c3: #2a3aa8; }
.bs-orb--glass { --c1: #ffffff; --c2: #cfd6e6; --c3: #7f8aa3; }
.bs-orb--flat::after { display: none; }
.bs-float { animation: bs-float 6s ease-in-out infinite; }
@keyframes bs-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.bs-orbs { position: relative; height: 150px; width: 100%; }
.bs-orbs .bs-orb { position: absolute; }
.bs-wave { display: inline-flex; align-items: center; gap: 2px; height: 18px; }
.bs-wave i { width: 2px; border-radius: 2px; background: currentColor; opacity: .8; animation: bs-wave 1.2s ease-in-out infinite; }
@keyframes bs-wave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }

/* ================= Métricas ================= */
.bs-dm { display: inline-block; line-height: 0; }
.bs-dm svg { display: block; overflow: visible; }
.bs-kpi { display: flex; flex-direction: column; gap: 10px; text-align: left; border-radius: 22px; padding: 10px 12px; margin: -10px -12px; transition: background .3s; min-width: 0; }
button.bs-kpi:hover { background: var(--surface-glass); }
.bs-kpi__top { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.bs-kpi__label { font-size: 13px; color: var(--ink-muted); max-width: 24ch; line-height: 1.4; }
.bs-kpi__foot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-muted); }
.bs-kpi--compact { gap: 6px; }
.bs-kpi--compact .bs-kpi__label { font-size: 12px; }
.bs-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px 20px; width: 100%; }

.bs-delta { display: inline-flex; align-items: center; gap: 4px; font: 500 12px/1 var(--font-mono); padding: 5px 8px; border-radius: var(--radius-pill); }
.bs-delta::before { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.bs-delta--up { background: var(--mint-soft); color: var(--mint-ink); }
.bs-delta--up::before { border-bottom: 6px solid currentColor; }
.bs-delta--down { background: var(--orange-soft); color: var(--orange-ink); }
.bs-delta--down::before { border-top: 6px solid currentColor; }
.bs-delta--flat { background: var(--surface-strong); color: var(--ink-muted); }
.bs-delta--flat::before { width: 8px; height: 2px; border: 0; background: currentColor; }

.bs-stat { padding: 14px 16px; min-height: 118px; display: flex; flex-direction: column; border-radius: var(--radius-lg); background: var(--surface-raised); text-align: left; min-width: 0; }
.bs-stat__lbl { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-muted); }
.bs-stat__ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-sunken); flex: none; }
.bs-stat__ico .bs-i { width: 14px; height: 14px; }
.bs-stat__val { margin-top: auto; display: flex; align-items: baseline; gap: 6px; padding-top: 14px; }
.bs-stat__unit { font-size: 12px; color: var(--ink-muted); }
.bs-stat__foot { font-size: 11px; color: var(--ink-muted); margin-top: 4px; }
.bs-stat--glass { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); color: var(--on-media); backdrop-filter: blur(var(--blur-glass)) saturate(140%); -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(140%); }
.bs-stat--glass .bs-stat__lbl, .bs-stat--glass .bs-stat__unit, .bs-stat--glass .bs-stat__foot { color: var(--on-media); opacity: .88; }
.bs-stat--glass .bs-stat__ico { background: rgba(255, 255, 255, .22); }

/* ================= Cards ================= */
.bs-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; border-radius: var(--radius-xl); padding: var(--space-7); background: var(--surface); box-shadow: var(--shadow-card); min-width: 0; }
.bs-card--raised { background: var(--surface-raised); }
.bs-card--flat { box-shadow: none; }
.bs-card--mint { background: linear-gradient(160deg, var(--surface-raised) 0%, var(--mint-tint) 45%, var(--purple-tint) 100%); }
.bs-card--mesh, .bs-card--terra, .bs-card--night, .bs-card--image { color: var(--on-media); }
.bs-card--mesh { background: var(--mesh-base); }
.bs-card--mesh > .bs-mesh { position: absolute; inset: -30%; z-index: -2; filter: blur(var(--blur-mesh)); background: radial-gradient(35% 40% at 75% 18%, var(--mesh-amber) 0%, transparent 70%), radial-gradient(40% 45% at 18% 25%, var(--mesh-lilac) 0%, transparent 70%), radial-gradient(45% 45% at 55% 70%, var(--purple) 0%, transparent 72%), radial-gradient(35% 35% at 90% 85%, var(--mint) 0%, transparent 70%), var(--mesh-base); }
.bs-card--terra { background: linear-gradient(135deg, var(--terra-1) 0%, var(--terra-2) 38%, var(--terra-3) 72%, var(--terra-4) 100%); }
.bs-card--night { background: var(--night); }
.bs-card--night::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bs-img, none) center / cover; opacity: .12; mix-blend-mode: screen; }
.bs-card--image { background: #cfd3dc var(--bs-img, none) var(--bs-img-pos, 58% 46%) / var(--bs-img-size, cover) no-repeat; }
.bs-card--image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 10, 40, .55) 0%, rgba(20, 10, 40, 0) 38%, rgba(20, 10, 40, 0) 55%, rgba(20, 10, 40, .55) 100%); }
.bs-card--glass { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); backdrop-filter: blur(var(--blur-glass)); -webkit-backdrop-filter: blur(var(--blur-glass)); color: var(--on-media); }
.bs-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.bs-card__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); flex: none; position: relative; }
.bs-card--mesh .bs-card__icon, .bs-card--terra .bs-card__icon, .bs-card--night .bs-card__icon, .bs-card--image .bs-card__icon { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.bs-card__title { font-size: 17px; letter-spacing: -.01em; line-height: 1.3; min-width: 0; }
.bs-card__title small { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; letter-spacing: 0; }
.bs-card--mesh .bs-card__title small, .bs-card--terra .bs-card__title small, .bs-card--night .bs-card__title small, .bs-card--image .bs-card__title small { color: var(--on-media); opacity: .72; }
.bs-card__head .bs-go, .bs-card__head .bs-count-dm { margin-left: auto; }
.bs-card__foot { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bs-card__eyebrow { font-size: 12px; opacity: .8; margin-bottom: 4px; }
.bs-card__h { font-weight: 400; font-size: 26px; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.bs-card .bs-tiles { margin-top: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.bs-trl-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 6px 0 12px; border-radius: var(--radius-pill); font-size: 12px; background: rgba(255, 255, 255, .92); color: #151515; }
.bs-trl-chip .bs-tag { height: 20px; }

.bs-bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-5); width: 100%; }
.bs-span-3 { grid-column: span 3; } .bs-span-4 { grid-column: span 4; } .bs-span-5 { grid-column: span 5; } .bs-span-6 { grid-column: span 6; } .bs-span-7 { grid-column: span 7; } .bs-span-8 { grid-column: span 8; } .bs-span-12 { grid-column: span 12; }
@media (max-width: 900px) { .bs-bento > * { grid-column: 1 / -1; } }

/* ================= Linhas e listas ================= */
.bs-rows { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.bs-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-raised); text-align: left; transition: background .25s, opacity .3s; }
button.bs-row:hover, .bs-row[data-bs-expand]:hover { background: var(--surface-sunken); }
.bs-row--sunken { background: var(--surface-sunken); }
button.bs-row--sunken:hover { background: var(--surface-strong); }
.bs-row__ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-sunken); flex: none; position: relative; }
.bs-row--sunken .bs-row__ico { background: var(--surface-raised); }
.bs-row__ico .bs-tri { position: absolute; top: -4px; right: -6px; width: 16px; height: 15px; }
.bs-row__main { flex: 1; min-width: 0; }
.bs-row__main b { display: block; font-weight: 400; font-size: 14px; line-height: 1.35; }
.bs-row__main small { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.bs-row__main .bs-trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-row__side { flex: none; font: 400 12px var(--font-mono); color: var(--ink-muted); text-align: right; white-space: nowrap; }
.bs-row__side--late { color: var(--alert); }
.bs-row__acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.bs-row--col { flex-direction: column; align-items: stretch; }
.bs-row--dim { opacity: .45; }
.bs-row__more { display: none; font-size: 13px; color: var(--ink-muted); line-height: 1.5; margin-top: 8px; }
.bs-row.is-open .bs-row__more { display: block; }
.bs-rel { font: 500 18px/1 var(--font-mono); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-sunken); color: var(--ink); }
.bs-rel.is-hot { background: var(--mint); color: var(--on-mint); }
.bs-mini { height: var(--size-control-s); padding: 0 12px; border-radius: var(--radius-pill); font-size: 12px; background: var(--surface-strong); color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.bs-mini--ink { background: var(--ink); color: var(--on-ink); }
.bs-mini--accent { background: var(--mint); color: var(--on-mint); }
.bs-mini--ghost { background: transparent; color: var(--ink-muted); }

.bs-box { border-radius: var(--radius-md); padding: 14px 16px; font-size: 13px; line-height: 1.5; background: var(--surface-raised); color: var(--ink); }
.bs-box--warn { background: var(--orange-tint); color: var(--orange-deep); display: flex; gap: 10px; align-items: flex-start; }
.bs-box--mint { background: var(--mint-tint); color: var(--mint-ink); }
.bs-box--p { background: var(--purple-tint); color: var(--purple-ink); }
.bs-box--sunken { background: var(--surface-sunken); }
.bs-box b { font-weight: 500; }

.bs-kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; width: 100%; }
.bs-kv--3 { grid-template-columns: repeat(3, 1fr); }
.bs-kv > div { background: var(--surface-raised); border-radius: 18px; padding: 12px 14px; min-width: 0; }
.bs-kv small { display: block; font-size: 11px; color: var(--ink-faint); margin-bottom: 3px; }
.bs-kv b { font-weight: 400; font-size: 14.5px; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .bs-kv--3 { grid-template-columns: 1fr 1fr; } }

.bs-lad { display: inline-flex; gap: 4px; align-items: center; }
.bs-lad i { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.2px var(--line-strong); }
.bs-lad i.on { background: var(--ink); box-shadow: none; }
.bs-lad i.prop { box-shadow: inset 0 0 0 1.5px var(--purple), 0 0 0 3px var(--purple-soft); }
.bs-lad--l i { width: 14px; height: 14px; }

.bs-bar100 { display: flex; height: 12px; border-radius: var(--radius-pill); overflow: hidden; gap: 2px; width: 100%; }
.bs-bar100 i { display: block; height: 100%; }
.bs-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 11.5px; color: var(--ink-muted); }
.bs-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bs-legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.bs-hbar { height: 8px; border-radius: var(--radius-pill); background: var(--surface-strong); overflow: hidden; }
.bs-hbar i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--ink); }
.bs-hbar--mint i { background: var(--mint-strong); }
.bs-hbar--alert i { background: var(--alert); }
.bs-progress { height: 6px; border-radius: var(--radius-pill); background: var(--surface-strong); overflow: hidden; }
.bs-progress i { display: block; height: 100%; background: var(--purple); border-radius: var(--radius-pill); transition: width .3s linear; }
.bs-progress--indeterminate i { width: 30%; animation: bs-indet 1.4s ease-in-out infinite; }
@keyframes bs-indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }

.bs-track { display: flex; align-items: center; gap: 10px; width: 100%; }
.bs-track__rail { flex: 1; height: 2px; background: var(--line-strong); position: relative; border-radius: 2px; }
.bs-track__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); border-radius: 2px; }
.bs-track__knob { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--mint); transform: translate(-50%, -50%); box-shadow: 0 0 0 5px rgba(159, 244, 179, .35); }
.bs-track__end { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); flex: none; }
.bs-track.is-paused .bs-track__knob { background: var(--surface-strong); box-shadow: 0 0 0 5px var(--surface-sunken), inset 0 0 0 2px var(--ink); }

.bs-dotrows { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.bs-dotrow { display: grid; grid-template-columns: 92px 1fr 34px; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-muted); width: 100%; text-align: left; }
button.bs-dotrow { border-radius: 12px; padding: 4px 6px; margin: -4px -6px; width: calc(100% + 12px); transition: background .25s; }
button.bs-dotrow:hover { background: var(--surface-sunken); }
.bs-dotrow__n { font: 400 13px var(--font-mono); color: var(--ink); text-align: right; }
.bs-dots { display: flex; gap: 3px; flex-wrap: nowrap; overflow: hidden; }
.bs-dots i { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.2px var(--line-strong); flex: none; }
.bs-dots i.on { background: var(--ink); box-shadow: none; }
.bs-dots i.on.warn { background: var(--alert); }
.bs-dotgrid { display: grid; gap: 8px; }
.bs-dotgrid i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.bs-dotgrid i.on { background: var(--ink); box-shadow: none; }
.bs-dotgrid i.warn { background: var(--alert); box-shadow: none; }
.bs-dotgrid i.mint { background: var(--mint-strong); box-shadow: none; }

.bs-funnel { display: grid; grid-template-columns: repeat(9, 1fr); align-items: end; gap: 6px; min-height: 150px; width: 100%; }
.bs-fcol { display: flex; flex-direction: column-reverse; align-items: center; gap: 5px; }
.bs-fdot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); transition: transform .25s; display: block; }
button.bs-fdot:hover { transform: scale(1.35); }
.bs-fdot.focus { background: var(--purple); box-shadow: 0 0 0 4px var(--purple-soft); }
.bs-fdot.ghost { background: transparent; box-shadow: inset 0 0 0 1.2px var(--line-strong); }
.bs-fdot.warn { background: var(--alert); }
.bs-faxis { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; margin-top: 8px; padding-top: 8px; box-shadow: inset 0 1px 0 var(--line); width: 100%; }
.bs-faxis span { text-align: center; font: 400 11px var(--font-mono); color: var(--ink-faint); }
.bs-bands { display: grid; grid-template-columns: 3fr 3fr 3fr; margin-top: 8px; gap: 6px; font-size: 10.5px; color: var(--ink-muted); text-align: center; width: 100%; }
.bs-bands span { padding: 5px 0; border-radius: var(--radius-pill); background: var(--surface-sunken); }

.bs-months { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; }
.bs-month { aspect-ratio: 1 / 1.08; border-radius: 18px; background: rgba(255, 255, 255, .13); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 9px 4px 10px; font-size: 11.5px; color: var(--on-media); transition: background .25s, transform .3s; }
button.bs-month:hover { background: rgba(255, 255, 255, .24); transform: translateY(-2px); }
.bs-month.next { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55); }
.bs-month.empty { opacity: .45; }
.bs-months--light .bs-month { background: var(--surface-raised); color: var(--ink); }
.bs-months--light .bs-month.next { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }

.bs-matrix { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 12px; }
.bs-matrix th { font-weight: 400; color: var(--ink-faint); font-size: 10.5px; padding: 0 2px 4px; text-align: center; }
.bs-matrix th:first-child { text-align: left; }
.bs-matrix td { background: var(--surface-raised); border-radius: 12px; padding: 8px; text-align: center; }
.bs-matrix td:first-child { text-align: left; font-size: 12.5px; line-height: 1.35; color: var(--ink); min-width: 150px; }
.bs-cell { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font: 500 11px var(--font-mono); }
.bs-cell--c { background: var(--mint); color: var(--on-mint); }
.bs-cell--d { background: var(--alert); color: var(--on-alert); }
.bs-cell--n { background: var(--surface-strong); color: var(--ink-faint); }
.bs-scroll-x { overflow-x: auto; width: 100%; }

.bs-heat { display: grid; gap: 4px; width: 100%; font-size: 11px; }
.bs-heat__h { color: var(--ink-faint); text-align: center; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-heat__r { color: var(--ink-muted); font-family: var(--font-mono); display: flex; align-items: center; }
.bs-heat__c { height: 36px; border-radius: 10px; display: grid; place-items: center; font: 500 11px var(--font-mono); }
.bs-heat__c[data-v="0"] { background: var(--surface-sunken); color: var(--ink-faint); }
.bs-heat__c[data-v="1"] { background: var(--orange-tint); color: var(--orange-deep); }
.bs-heat__c[data-v="2"] { background: var(--orange-soft); color: var(--orange-deep); }
.bs-heat__c[data-v="3"] { background: var(--orange); color: #151515; }
.bs-heat__c[data-v="4"] { background: var(--alert); color: var(--on-alert); }

.bs-tl { position: relative; padding-left: 22px; }
.bs-tl::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--line-strong); }
.bs-tl__it { position: relative; padding: 0 0 18px; }
.bs-tl__it::before { content: ""; position: absolute; left: -20px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--data-evidence); box-shadow: 0 0 0 4px var(--surface); }
.bs-tl__it[data-k="decisao"]::before { background: var(--data-decision); }
.bs-tl__it[data-k="lacuna"]::before { background: var(--alert); }
.bs-tl__it[data-k="hip"]::before { background: var(--data-hypothesis); }
.bs-tl__it[data-k="exp"]::before { background: var(--data-experiment); }
.bs-tl__it small { font: 400 11px var(--font-mono); color: var(--ink-faint); }
.bs-tl__it p { font-size: 14px; margin: 2px 0 0; }

.bs-player { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: var(--radius-pill); background: var(--surface-raised); width: 100%; }
.bs-player__btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); flex: none; }
.bs-player__rail { flex: 1; height: 3px; border-radius: 3px; background: var(--line-strong); position: relative; }
.bs-player__rail i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ink); }
.bs-player__t { font: 400 11px var(--font-mono); color: var(--ink-muted); }
.bs-quote { border-left: 2px solid var(--purple-300); padding: 4px 0 4px 12px; font-size: 13.5px; line-height: 1.5; color: var(--ink); margin: 0; }
.bs-empty { padding: 28px 10px; text-align: center; color: var(--ink-muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bs-empty b { font-weight: 400; color: var(--ink); font-size: 15px; }
.bs-skel { border-radius: var(--radius-md); background: linear-gradient(90deg, var(--surface-strong), var(--surface-sunken), var(--surface-strong)); background-size: 200% 100%; animation: bs-shimmer 1.4s linear infinite; }
@keyframes bs-shimmer { to { background-position: -200% 0; } }

.bs-brief p { font-size: 17px; line-height: 1.42; letter-spacing: -.01em; color: var(--ink-muted); margin: 0; transition: color .4s; }
.bs-brief p .bs-hl { color: var(--ink); }
.bs-brief { display: flex; flex-direction: column; gap: 14px; }
.bs-brief.is-reading p { color: var(--ink-faint); }
.bs-brief.is-reading p.reading { color: var(--ink); }

/* ================= Formulários ================= */
.bs-field { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.bs-field > span, .bs-field > label { font-size: 12px; color: var(--ink-muted); }
.bs-field .bs-hint { font-size: 11px; color: var(--ink-muted); }
.bs-field.is-error .bs-input, .bs-field.is-error .bs-textarea { box-shadow: inset 0 0 0 1.5px var(--alert); }
.bs-field.is-error .bs-hint { color: var(--orange-deep); }
.bs-input, .bs-textarea, .bs-select { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface-raised); border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 18px; padding: 12px 14px; outline: none; width: 100%; box-sizing: border-box; }
.bs-textarea { resize: vertical; min-height: 84px; }
.bs-input:focus, .bs-textarea:focus, .bs-select:focus { box-shadow: inset 0 0 0 1.5px var(--purple-300), 0 0 0 4px var(--purple-tint); }
.bs-search { position: relative; width: 100%; }
.bs-search .bs-i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); }
.bs-search input { height: var(--size-control-m); border-radius: var(--radius-pill); padding: 0 16px 0 42px; }
.bs-search .bs-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.bs-radios { display: flex; flex-direction: column; gap: 6px; }
.bs-radios label, .bs-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 18px; background: var(--surface-raised); font-size: 13.5px; cursor: pointer; box-shadow: inset 0 0 0 1px transparent; }
.bs-radios label:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--ink); }
.bs-radios input, .bs-check input { accent-color: var(--purple); margin-top: 2px; }
.bs-radios small { display: block; color: var(--ink-muted); font-size: 12px; margin-top: 2px; }
.bs-switch { position: relative; width: 40px; height: 24px; border-radius: var(--radius-pill); background: var(--line-strong); flex: none; transition: background .25s; display: inline-block; }
.bs-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .3s cubic-bezier(.625, .05, 0, 1); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.bs-switch.is-on, .bs-switch[aria-checked="true"] { background: var(--ink); }
.bs-switch.is-on::after, .bs-switch[aria-checked="true"]::after { transform: translateX(16px); }
.bs-range { width: 100%; accent-color: var(--purple); }
.bs-toggle-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; width: 100%; text-align: left; font-size: 14px; }
.bs-toggle-row:hover { background: var(--surface-raised); }
.bs-toggle-row .bs-grow { flex: 1; }
.bs-toggle-row small { display: block; color: var(--ink-muted); font-size: 12px; }

/* ================= Navegação ================= */
.bs-rail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 0; width: var(--size-rail); }
.bs-rail__logo { width: 44px; height: 44px; border-radius: var(--radius-sm); margin-bottom: 14px; box-shadow: 0 10px 24px -10px rgba(119, 12, 205, .6); }
.bs-rail__btn { position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--line); background: var(--surface-glass); transition: background .3s, color .3s; }
.bs-rail__btn:hover { background: var(--surface-raised); color: var(--ink); }
.bs-rail__btn.is-active { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.bs-rail__btn .bs-count { position: absolute; top: -3px; right: -3px; }
.bs-rail--h { flex-direction: row; width: auto; padding: 0; }
.bs-rail--h .bs-rail__logo { margin: 0 8px 0 0; }

.bs-top { display: flex; align-items: center; gap: 12px; width: 100%; flex-wrap: wrap; }
.bs-top__spacer { flex: 1; }
.bs-pill { height: var(--size-control-m); display: inline-flex; align-items: center; gap: 10px; padding: 0 18px; border-radius: var(--radius-pill); background: var(--surface-glass); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; white-space: nowrap; color: var(--ink); backdrop-filter: blur(var(--blur-bar)); -webkit-backdrop-filter: blur(var(--blur-bar)); }
.bs-pill b { font-weight: 500; }
.bs-pill .bs-sep { color: var(--ink-faint); }
.bs-pill--search { color: var(--ink-faint); min-width: 260px; }
.bs-pill--search .bs-kbd { margin-left: auto; }
.bs-copilot { height: var(--size-control-l); display: inline-flex; align-items: center; gap: 12px; padding: 0 7px 0 8px; border-radius: var(--radius-pill); background: #151515; color: #fff; box-shadow: var(--shadow-ink); text-align: left; }
.bs-copilot__txt { font-size: 14px; padding-right: 4px; line-height: 1.25; }
.bs-copilot__txt small { display: block; font-size: 11px; color: #a9adb6; }
.bs-copilot__mic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); }
.bs-copilot.is-listening .bs-copilot__mic { background: var(--alert); color: #151515; }

.bs-mnav { height: 68px; padding: 0 8px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: space-around; background: rgba(21, 21, 21, .92); color: #a9adb6; box-shadow: var(--shadow-float); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); width: 100%; max-width: 420px; }
.bs-mnav__btn { position: relative; flex: 1; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10.5px; color: inherit; }
.bs-mnav__btn.is-active { color: #fff; }
.bs-mnav__btn.is-active::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--mint); }
.bs-mnav__cop { flex: none; width: 64px; height: 64px; margin-top: -30px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); box-shadow: 0 0 0 5px rgba(21, 21, 21, .92); }
.bs-mnav__cop .bs-orb { width: 50px; height: 50px; display: grid; place-items: center; color: #fff; }
.bs-mnav__cop .bs-orb .bs-i { position: relative; z-index: 1; }

.bs-modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.bs-module { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px; border-radius: 22px; background: var(--surface-raised); font-size: 12px; text-align: center; color: var(--ink); }
.bs-module__ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-sunken); }
.bs-module.is-active .bs-module__ico { background: var(--ink); color: var(--on-ink); }
.bs-module .bs-count { margin-top: -4px; }

.bs-crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted); flex-wrap: wrap; }
.bs-crumbs b { font-weight: 500; color: var(--ink); }
.bs-crumbs i { color: var(--ink-faint); font-style: normal; }
.bs-tabs { display: flex; gap: 22px; box-shadow: inset 0 -1px 0 var(--line); width: 100%; overflow-x: auto; }
.bs-tabs button { position: relative; padding: 10px 0 14px; font-size: 14px; color: var(--ink-muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.bs-tabs button.is-active { color: var(--ink); }
.bs-tabs button.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--ink); }
.bs-pager { display: flex; gap: 6px; justify-content: center; }
.bs-pager i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.bs-pager i.on { background: var(--ink); width: 18px; border-radius: 6px; }

/* ================= Camadas (em fluxo nos previews; fixas no produto) ================= */
.bs-drawer { position: relative; width: min(560px, 100%); display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-float); }
.bs-drawer--fixed { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: var(--z-drawer); animation: bs-slide .55s cubic-bezier(.625, .05, 0, 1); }
@keyframes bs-slide { from { transform: translateX(104%); } }
.bs-drawer__head { position: relative; isolation: isolate; display: flex; align-items: flex-start; gap: 14px; padding: 24px 24px 20px; flex-wrap: wrap; }
.bs-drawer__ttl { flex: 1; min-width: 0; }
.bs-drawer__ttl small { display: block; font-size: 12px; opacity: .72; margin-bottom: 4px; }
.bs-drawer__ttl h2 { font-weight: 400; font-size: 24px; line-height: 1.12; letter-spacing: -.025em; margin: 0; }
.bs-drawer__ttl p { font-size: 13px; opacity: .75; margin: 6px 0 0; }
.bs-drawer__extra { flex-basis: 100%; }
.bs-drawer__tabs { padding: 12px 24px 4px; }
.bs-drawer__body { padding: 16px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.bs-drawer__foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 16px; box-shadow: inset 0 1px 0 var(--line); background: var(--surface-glass); }
.bs-drawer__foot .bs-btn { flex: 1 1 auto; }
.bs-close { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); flex: none; transition: transform .4s cubic-bezier(.625, .05, 0, 1); }
.bs-close:hover { transform: rotate(90deg); }
.bs-theme-mesh .bs-drawer__head, .bs-theme-image .bs-drawer__head, .bs-theme-terra .bs-drawer__head, .bs-theme-night .bs-drawer__head { color: var(--on-media); }
.bs-theme-mesh .bs-drawer__head::before, .bs-theme-image .bs-drawer__head::before, .bs-theme-terra .bs-drawer__head::before, .bs-theme-night .bs-drawer__head::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.bs-theme-mesh .bs-drawer__head::before { background: radial-gradient(40% 70% at 85% 10%, var(--mesh-amber), transparent 70%), radial-gradient(50% 80% at 10% 20%, var(--mesh-lilac), transparent 70%), radial-gradient(60% 90% at 60% 100%, var(--purple), transparent 75%), var(--mesh-base); }
.bs-theme-image .bs-drawer__head::before { background: linear-gradient(180deg, rgba(20, 10, 40, .55), rgba(20, 10, 40, .35)), var(--bs-img, none) 55% 45% / 180% auto; }
.bs-theme-terra .bs-drawer__head::before { background: linear-gradient(135deg, var(--terra-1) 0%, var(--terra-2) 40%, var(--terra-3) 75%, var(--terra-4) 100%); }
.bs-theme-night .bs-drawer__head::before { background: var(--night); }
.bs-theme-mesh .bs-close, .bs-theme-image .bs-close, .bs-theme-terra .bs-close, .bs-theme-night .bs-close { background: rgba(255, 255, 255, .18); color: #fff; }

.bs-modal { width: min(560px, 100%); border-radius: 32px; padding: 24px; background: var(--surface); box-shadow: var(--shadow-float); box-sizing: border-box; }
.bs-modal__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.bs-modal__head h2 { font-weight: 400; font-size: 22px; letter-spacing: -.02em; line-height: 1.15; flex: 1; margin: 0; }
.bs-modal__head p { font-size: 13px; color: var(--ink-muted); margin: 4px 0 0; }
.bs-modal__head .bs-close { width: 40px; height: 40px; }
.bs-modal__body { display: flex; flex-direction: column; gap: 14px; }
.bs-modal__foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.bs-sig { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius-md); background: var(--mint-tint); color: var(--ink); }
.bs-sig b { font-weight: 500; }
.bs-backdrop { position: fixed; inset: 0; background: rgba(21, 21, 21, .28); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

.bs-pop { width: 340px; max-width: 100%; border-radius: var(--radius-lg); padding: 14px; background: var(--surface); box-shadow: var(--shadow-pop); box-sizing: border-box; }
.bs-pop--wide { width: 400px; }
.bs-pop__head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 12px; }
.bs-pop__head b { font-weight: 400; font-size: 16px; flex: 1; }
.bs-pop__head small { display: block; font-size: 11.5px; color: var(--ink-muted); }
.bs-menu-it { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 16px; font-size: 14px; text-align: left; color: var(--ink); }
.bs-menu-it:hover { background: var(--surface-raised); }
.bs-menu-it .bs-grow { flex: 1; }
.bs-menu-it small { color: var(--ink-muted); font-size: 12px; }
.bs-menu-it.is-on { background: var(--surface-raised); }
.bs-menu-it.is-on::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
.bs-menu-it--danger { color: var(--orange-deep); }
.bs-hr { height: 1px; background: var(--line); margin: 8px 4px; }
.bs-menu-sec { font-size: 11px; color: var(--ink-muted); padding: 10px 12px 4px; }

.bs-toast { display: inline-flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; min-height: 48px; border-radius: var(--radius-pill); background: #151515; color: #fff; font-size: 13.5px; box-shadow: var(--shadow-ink); max-width: 100%; box-sizing: border-box; }
.bs-toast__ok { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #151515; flex: none; margin-left: -8px; }
.bs-toast__ok--warn { background: var(--alert); }
.bs-toast__ok--info { background: #3a3a40; color: #fff; }
.bs-toast button { height: 32px; padding: 0 14px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .12); color: #fff; font-size: 12.5px; flex: none; }
.bs-toast:not(:has(button)) { padding-right: 18px; }
.bs-tip { display: inline-block; max-width: 260px; padding: 8px 12px; border-radius: var(--radius-sm); background: #151515; color: #fff; font-size: 12px; line-height: 1.4; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); position: relative; }
.bs-tip small { display: block; color: #a9adb6; font: 400 10.5px var(--font-mono); margin-bottom: 2px; }
.bs-tip--arrow::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: #151515; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }

.bs-palette { width: min(640px, 100%); border-radius: 32px; padding: 12px; background: var(--surface); box-shadow: var(--shadow-pop); box-sizing: border-box; }
.bs-palette .bs-search input { height: var(--size-control-l); font-size: 16px; }
.bs-pal__grp { font-size: 11px; color: var(--ink-muted); padding: 10px 12px 6px; }
.bs-pal__it { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 16px; text-align: left; font-size: 14px; }
.bs-pal__it small { margin-left: auto; font: 400 11px var(--font-mono); color: var(--ink-muted); }
.bs-pal__it.is-sel { background: var(--ink); color: var(--on-ink); }
.bs-pal__it.is-sel small { color: inherit; opacity: .7; }
.bs-pal__foot { display: flex; gap: 14px; padding: 10px 12px 2px; font-size: 11px; color: var(--ink-muted); box-shadow: inset 0 1px 0 var(--line); margin-top: 8px; }

.bs-sheet { width: 100%; max-width: 420px; border-radius: 30px 30px 0 0; padding: 10px 16px 24px; background: var(--surface); box-shadow: var(--shadow-float); box-sizing: border-box; }
.bs-sheet__grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 0 auto 14px; }

/* ================= Copiloto ================= */
.bs-msgs { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.bs-msg { max-width: 92%; border-radius: 22px; padding: 12px 14px; font-size: 14px; line-height: 1.5; background: var(--surface-raised); color: var(--ink); box-sizing: border-box; }
.bs-msg--me { align-self: flex-end; background: var(--ink); color: var(--on-ink); border-bottom-right-radius: 8px; }
.bs-msg--ai { border-bottom-left-radius: 8px; }
.bs-msg--sys { align-self: center; background: transparent; color: var(--ink-muted); font-size: 12px; padding: 0 8px; text-align: center; }
.bs-msg--draft { box-shadow: inset 0 0 0 1px var(--purple-300); background: var(--purple-tint); }
.bs-msg--warn { box-shadow: inset 0 0 0 1px var(--orange-soft); }
.bs-msg__who { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-muted); margin-bottom: 6px; flex-wrap: wrap; }
.bs-msg__who .bs-orb { width: 18px; height: 18px; }
.bs-msg__who .bs-orb::after { display: none; }
.bs-msg .bs-srcs { margin-top: 8px; }
.bs-typing { display: inline-flex; gap: 4px; }
.bs-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); animation: bs-tdot 1s infinite; }
.bs-typing i:nth-child(2) { animation-delay: .15s; } .bs-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bs-tdot { 50% { transform: translateY(-4px); background: var(--purple-400); } }
.bs-composer { display: flex; align-items: flex-end; gap: 8px; background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); border-radius: 26px; padding: 6px 6px 6px 16px; width: 100%; box-sizing: border-box; }
.bs-composer textarea { flex: 1; border: 0; outline: none; resize: none; font: inherit; font-size: 14px; line-height: 1.4; padding: 8px 0; background: transparent; color: var(--ink); min-height: 20px; }
.bs-composer__btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-strong); color: var(--ink); }
.bs-composer__btn--send { background: var(--ink); color: var(--on-ink); }
.bs-composer__btn.is-on { background: var(--alert); color: var(--on-alert); box-shadow: 0 0 0 6px rgba(245, 102, 27, .18); animation: bs-mic 1.2s infinite; }
@keyframes bs-mic { 50% { box-shadow: 0 0 0 10px rgba(245, 102, 27, .08); } }
.bs-guard { font-size: 11px; color: var(--ink-muted); margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.bs-guard .bs-i { width: 13px; height: 13px; }
.bs-listen { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-muted); padding: 8px 4px; }
.bs-listen .bs-wave { color: var(--alert); }
.bs-rec { display: inline-flex; align-items: center; gap: 8px; font: 400 12px var(--font-mono); color: var(--orange-deep); }
.bs-rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--alert); animation: bs-pulse 1s infinite; }

/* ================= Gráficos (SVG desenhado por bundle.js) ================= */
.bs-chart { position: relative; width: 100%; }
.bs-chart svg { display: block; width: 100%; overflow: visible; }
.bs-chart text { font-family: var(--font-sans); font-size: 11px; fill: var(--ink-faint); }
.bs-chart .bs-t-mono { font-family: var(--font-mono); }
.bs-chart--media text { fill: rgba(255, 255, 255, .72); }
.bs-bubble { position: absolute; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; background: var(--mint); color: var(--on-mint); display: grid; place-items: center; font: 500 15px var(--font-mono); box-shadow: var(--shadow-mint); pointer-events: none; }
.bs-bubble--s { width: 44px; height: 44px; font-size: 12px; }
.bs-strip { display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 24px; border-radius: var(--radius-pill); background: var(--surface-glass); box-shadow: inset 0 0 0 1px var(--line); width: 100%; box-sizing: border-box; backdrop-filter: blur(var(--blur-bar)); -webkit-backdrop-filter: blur(var(--blur-bar)); }
.bs-strip__chart { flex: 1; min-width: 0; height: 76px; }
.bs-strip__pill { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 20px 10px 10px; border-radius: var(--radius-pill); background: var(--surface-raised); box-shadow: var(--shadow-card); white-space: nowrap; text-align: left; }
.bs-strip__pill b { font-weight: 500; font-size: 14px; display: block; }
.bs-strip__pill small { font-size: 11px; color: var(--ink-muted); }
@media (max-width: 700px) { .bs-strip { flex-direction: column-reverse; align-items: stretch; border-radius: 28px; padding: 8px 14px; } .bs-strip__pill { box-shadow: none; background: transparent; padding: 6px 0 0; } }

@media (prefers-reduced-motion: reduce) {
  .bs-float, .bs-wave i, .bs-status--testing::before, .bs-live, .bs-typing i, .bs-skel, .bs-progress--indeterminate i, .bs-composer__btn.is-on, .bs-rec::before, .bs-btn.is-loading::before { animation: none; }
  .bs-go, .bs-close, .bs-btn, .bs-month, .bs-fdot { transition: none; }
}

/* =====================================================================
   GESTÃO · tabelas, listas gerenciais, formulários de cadastro e planejamento
   ===================================================================== */

/* ---------- Tabela de dados ---------- */
.bs-table-card { background: var(--surface-raised); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); overflow: hidden; width: 100%; }
.bs-table-wrap { overflow-x: auto; width: 100%; }
.bs-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.bs-table th { position: sticky; top: 0; z-index: 1; background: var(--surface-raised); text-align: left; font-weight: 400; font-size: 11.5px; color: var(--ink-muted); padding: 12px 14px; white-space: nowrap; box-shadow: inset 0 -1px 0 var(--line); }
.bs-table td { padding: 12px 14px; box-shadow: inset 0 -1px 0 var(--line); vertical-align: middle; }
.bs-table td { white-space: nowrap; }
.bs-table td.cell-main, .bs-table td.wrap { white-space: normal; min-width: 220px; }
.bs-table--plain td { white-space: normal; }
.bs-table tbody tr { transition: background .2s; }
.bs-table tbody tr:hover { background: var(--surface-sunken); }
.bs-table tbody tr.is-selected { background: var(--purple-tint); }
.bs-table tbody tr:last-child td { box-shadow: none; }
.bs-table .num { text-align: right; font-family: var(--font-mono); font-size: 12.5px; }
.bs-table .muted { color: var(--ink-muted); }
.bs-table .strong { font-weight: 500; }
.bs-table .cell-main b { display: block; font-weight: 400; }
.bs-table .cell-main small { display: block; font-size: 11.5px; color: var(--ink-muted); margin-top: 2px; }
.bs-table .col-check { width: 44px; padding-right: 0; }
.bs-table .col-act { width: 56px; text-align: right; }
.bs-table input[type="checkbox"] { accent-color: var(--purple); width: 16px; height: 16px; cursor: pointer; }
.bs-table th[data-sort] { cursor: pointer; user-select: none; }
.bs-table th[data-sort]::after { content: "↕"; margin-left: 6px; opacity: .35; font-size: 10px; }
.bs-table th[data-sort].is-asc::after { content: "↑"; opacity: 1; color: var(--ink); }
.bs-table th[data-sort].is-desc::after { content: "↓"; opacity: 1; color: var(--ink); }
.bs-table tfoot td { font-weight: 500; background: var(--surface-sunken); box-shadow: inset 0 1px 0 var(--line); }
.bs-table--compact td, .bs-table--compact th { padding: 8px 12px; }
.bs-table--zebra tbody tr:nth-child(even) { background: var(--surface-sunken); }
.bs-table--plain th { position: static; }
.bs-table .bs-go { width: 32px; height: 32px; }
.bs-table .bs-go .bs-i { width: 15px; height: 15px; }
.bs-table .bs-avatar { width: 28px; height: 28px; font-size: 10.5px; }
.bs-cell-person { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.bs-cell-bar { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.bs-cell-bar .bs-hbar { flex: 1; }
.bs-var-pos { color: var(--mint-ink); }
.bs-var-neg { color: var(--orange-deep); }
.bs-best { background: var(--mint-tint); }
.bs-best::after { content: "melhor"; margin-left: 8px; font: 500 10px var(--font-sans); padding: 2px 7px; border-radius: var(--radius-pill); background: var(--mint); color: var(--on-mint); }
.bs-diff { background: var(--orange-tint); }

.bs-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px; box-shadow: inset 0 -1px 0 var(--line); }
.bs-toolbar .bs-search { flex: 1 1 220px; max-width: 320px; }
.bs-toolbar__spacer { flex: 1; }
.bs-bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 10px 10px 18px; margin: 10px; border-radius: var(--radius-pill); background: #151515; color: #fff; font-size: 13px; box-shadow: var(--shadow-ink); }
.bs-bulkbar b { font-weight: 500; }
.bs-bulkbar .bs-grow { flex: 1; }
.bs-bulkbar .bs-mini { background: rgba(255, 255, 255, .12); color: #fff; }
.bs-bulkbar .bs-mini--accent { background: var(--mint); color: #151515; }
.bs-pagination { display: flex; align-items: center; gap: 6px; padding: 12px 14px; font-size: 12px; color: var(--ink-muted); flex-wrap: wrap; }
.bs-pagination .bs-grow { flex: 1; }
.bs-page { min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--radius-pill); font: 400 12px var(--font-mono); color: var(--ink-muted); }
.bs-page:hover { background: var(--surface-sunken); color: var(--ink); }
.bs-page.is-active { background: var(--ink); color: var(--on-ink); }

/* árvore */
.bs-tree td:first-child { white-space: nowrap; }
.bs-tree__toggle { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-sunken); margin-right: 8px; vertical-align: -5px; transition: transform .25s; }
.bs-tree__toggle .bs-i { width: 12px; height: 12px; transform: rotate(-90deg); transition: transform .25s; }
tr.is-open > td .bs-tree__toggle .bs-i { transform: none; }
.bs-tree__leaf { display: inline-block; width: 22px; margin-right: 8px; }
.bs-tree [data-level="1"] td:first-child { padding-left: 42px; }
.bs-tree [data-level="2"] td:first-child { padding-left: 72px; }
.bs-tree [data-level="3"] td:first-child { padding-left: 102px; }
.bs-tree tr[hidden] { display: none; }
.bs-tree__id { font: 400 11.5px var(--font-mono); color: var(--ink-muted); margin-right: 8px; }

/* matriz de permissões e RACI */
.bs-perm td, .bs-perm th { text-align: center; }
.bs-perm td:first-child, .bs-perm th:first-child { text-align: left; }
.bs-perm__cell { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; font: 500 11px var(--font-mono); }
.bs-perm__cell--yes { background: var(--ink); color: var(--on-ink); }
.bs-perm__cell--own { background: var(--purple-soft); color: var(--purple-ink); }
.bs-perm__cell--no { background: var(--surface-sunken); color: var(--ink-faint); }
.bs-perm__cell--lock { background: var(--surface-sunken); color: var(--ink-muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.bs-perm__cell .bs-i { width: 13px; height: 13px; stroke-width: 2; }
.bs-raci { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font: 500 12px var(--font-mono); }
.bs-raci--R { background: var(--ink); color: var(--on-ink); }
.bs-raci--A { background: var(--purple); color: #fff; }
.bs-raci--C { background: var(--mint-soft); color: var(--mint-ink); }
.bs-raci--I { background: var(--surface-sunken); color: var(--ink-muted); }

/* auditoria */
.bs-audit td { font-size: 12.5px; }
.bs-audit .ts { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-muted); white-space: nowrap; }
.bs-audit .hash { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.bs-act { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.bs-act::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--data-evidence); }
.bs-act--sign::before { background: var(--data-decision); }
.bs-act--edit::before { background: var(--data-hypothesis); }
.bs-act--export::before { background: var(--data-experiment); }
.bs-act--deny::before { background: var(--alert); }

/* ---------- Kanban ---------- */
.bs-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 14px; overflow-x: auto; width: 100%; padding-bottom: 4px; }
.bs-col { background: var(--surface); border-radius: var(--radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; box-shadow: inset 0 0 0 1px var(--line); }
.bs-col__head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 8px; font-size: 13px; }
.bs-col__head .bs-count { margin-left: auto; }
.bs-col__head i { width: 8px; height: 8px; border-radius: 50%; }
.bs-col__limit { font: 400 11px var(--font-mono); color: var(--ink-muted); }
.bs-col.is-over { box-shadow: inset 0 0 0 1.5px var(--alert); }
.bs-kcard { background: var(--surface-raised); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; text-align: left; box-shadow: 0 1px 2px rgba(21, 21, 21, .06); cursor: grab; transition: transform .2s, box-shadow .2s; }
.bs-kcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.bs-kcard b { font-weight: 400; font-size: 13.5px; line-height: 1.35; }
.bs-kcard__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-muted); }
.bs-kcard__foot { display: flex; align-items: center; gap: 8px; }
.bs-kcard__foot .bs-avatar { width: 24px; height: 24px; font-size: 9.5px; margin-left: auto; }
.bs-kcard--late { box-shadow: inset 0 0 0 1.5px var(--alert); }
.bs-col__add { height: 36px; border-radius: var(--radius-pill); color: var(--ink-muted); font-size: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.bs-col__add:hover { color: var(--ink); background: var(--surface-raised); }

/* ---------- Cronograma (Gantt) ---------- */
.bs-gantt { width: 100%; overflow-x: auto; }
.bs-gantt__grid { display: grid; grid-template-columns: 200px 1fr; min-width: 640px; font-size: 12.5px; padding-top: 18px; }
.bs-gantt__scale { display: grid; font: 400 11px var(--font-mono); color: var(--ink-muted); box-shadow: inset 0 -1px 0 var(--line); }
.bs-gantt__scale span { padding: 8px 0 8px 6px; box-shadow: inset 1px 0 0 var(--line); }
.bs-gantt__label { padding: 10px 12px 10px 0; display: flex; flex-direction: column; justify-content: center; min-height: 46px; box-shadow: inset 0 -1px 0 var(--line); }
.bs-gantt__label small { color: var(--ink-muted); font-size: 11px; }
.bs-gantt__label.is-group { font-weight: 500; }
.bs-gantt__track { position: relative; min-height: 46px; box-shadow: inset 0 -1px 0 var(--line); background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: calc(100% / var(--cols, 6)) 100%; }
.bs-gantt__bar { position: absolute; top: 12px; height: 22px; border-radius: var(--radius-pill); background: var(--ink); color: var(--on-ink); font-size: 10.5px; line-height: 22px; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-gantt__bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: rgba(255, 255, 255, .2); }
.bs-gantt__bar span { position: relative; }
.bs-gantt__bar--purple { background: var(--purple); color: #fff; }
.bs-gantt__bar--soft { background: var(--surface-strong); color: var(--ink); }
.bs-gantt__bar--late { background: var(--alert); color: var(--on-alert); }
.bs-gantt__bar--group { height: 8px; top: 19px; background: var(--ink-muted); padding: 0; }
.bs-gantt__ms { position: absolute; top: 14px; width: 18px; height: 18px; transform: translateX(-50%) rotate(45deg); border-radius: 4px; background: var(--mint); box-shadow: 0 0 0 3px var(--surface-raised); }
.bs-gantt__ms--next { background: var(--surface-raised); box-shadow: 0 0 0 2px var(--ink); }
.bs-gantt__today { position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--ink); z-index: 1; }
.bs-gantt__today--label::before { content: "hoje"; position: absolute; top: -18px; left: -12px; font: 500 10px var(--font-mono); color: var(--ink); }

/* ---------- Matriz de risco ---------- */
.bs-riskmap { display: grid; grid-template-columns: 26px repeat(5, 1fr); grid-template-rows: repeat(5, 1fr) 26px; gap: 4px; width: 100%; max-width: 420px; aspect-ratio: 1 / .9; font-size: 10.5px; color: var(--ink-muted); }
.bs-riskmap__c { border-radius: 10px; position: relative; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 4px; padding: 4px; }
.bs-riskmap__c[data-s="1"] { background: var(--mint-tint); }
.bs-riskmap__c[data-s="2"] { background: var(--orange-tint); }
.bs-riskmap__c[data-s="3"] { background: var(--orange-soft); }
.bs-riskmap__c[data-s="4"] { background: rgba(245, 102, 27, .28); }
.bs-riskmap__c[data-s="5"] { background: rgba(245, 102, 27, .5); }
.bs-riskmap__y, .bs-riskmap__x { display: grid; place-items: center; font-family: var(--font-mono); }
.bs-riskmap__y span { writing-mode: vertical-rl; transform: rotate(180deg); }
.bs-riskdot { min-width: 22px; height: 22px; padding: 0 5px; border-radius: var(--radius-pill); display: inline-grid; place-items: center; font: 500 10px var(--font-mono); background: var(--ink); color: var(--on-ink); box-shadow: 0 0 0 2px var(--surface-raised); }
.bs-riskdot--focus { background: var(--purple); color: #fff; }

/* ---------- Etapas e aprovação ---------- */
.bs-steps { display: flex; align-items: flex-start; width: 100%; counter-reset: step; }
.bs-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; text-align: center; font-size: 12px; color: var(--ink-muted); min-width: 0; }
.bs-step::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 2px; background: var(--line-strong); z-index: 0; }
.bs-step:first-child::before { display: none; }
.bs-step__dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-raised); box-shadow: inset 0 0 0 1.5px var(--line-strong); font: 500 12px var(--font-mono); color: var(--ink-muted); }
.bs-step__dot .bs-i { width: 14px; height: 14px; stroke-width: 2; }
.bs-step small { display: block; font-size: 11px; color: var(--ink-faint); }
.bs-step.is-done::before, .bs-step.is-current::before { background: var(--ink); }
.bs-step.is-done .bs-step__dot { background: var(--mint); color: var(--on-mint); box-shadow: none; }
.bs-step.is-current { color: var(--ink); }
.bs-step.is-current .bs-step__dot { background: var(--ink); color: var(--on-ink); box-shadow: 0 0 0 5px var(--surface-strong); }
.bs-step.is-blocked .bs-step__dot { background: var(--orange-soft); color: var(--orange-ink); box-shadow: none; }
.bs-steps--v { flex-direction: column; gap: 0; }
.bs-steps--v .bs-step { flex-direction: row; align-items: flex-start; text-align: left; gap: 14px; padding-bottom: 22px; width: 100%; }
.bs-steps--v .bs-step::before { top: 32px; bottom: 0; left: 15px; right: auto; width: 2px; height: auto; }
.bs-steps--v .bs-step:first-child::before { display: block; }
.bs-steps--v .bs-step:last-child::before { display: none; }
.bs-steps--v .bs-step b { font-weight: 400; font-size: 14px; color: var(--ink); display: block; }
.bs-steps--v .bs-step__body { padding-top: 5px; min-width: 0; flex: 1; }

/* ---------- Listas gerenciais ---------- */
.bs-feed { display: flex; flex-direction: column; width: 100%; }
.bs-feed__day { font-size: 11px; color: var(--ink-muted); padding: 14px 0 8px; font-family: var(--font-mono); }
.bs-feed__it { display: flex; gap: 12px; padding: 10px 0; box-shadow: inset 0 -1px 0 var(--line); font-size: 13.5px; line-height: 1.45; }
.bs-feed__it .bs-avatar { width: 32px; height: 32px; font-size: 11px; }
.bs-feed__it b { font-weight: 500; }
.bs-feed__it small { display: block; font: 400 11px var(--font-mono); color: var(--ink-muted); margin-top: 2px; }
.bs-feed__body { flex: 1; min-width: 0; }
.bs-feed__diff { margin-top: 6px; font-size: 12.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bs-feed__diff del { color: var(--ink-muted); text-decoration-color: var(--alert); }
.bs-feed__diff ins { text-decoration: none; background: var(--mint-soft); color: var(--mint-ink); padding: 0 6px; border-radius: 6px; }

.bs-checklist { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.bs-checklist__head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.bs-checklist__head .bs-progress { flex: 1; }
.bs-checklist__head span { font: 400 12px var(--font-mono); color: var(--ink-muted); }
.bs-check-it { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--surface-raised); font-size: 13.5px; text-align: left; width: 100%; }
.bs-check-it__box { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); display: grid; place-items: center; flex: none; }
.bs-check-it__box .bs-i { width: 12px; height: 12px; stroke-width: 2.4; opacity: 0; }
.bs-check-it.is-done .bs-check-it__box { background: var(--mint); box-shadow: none; }
.bs-check-it.is-done .bs-check-it__box .bs-i { opacity: 1; color: var(--on-mint); }
.bs-check-it.is-done .bs-grow { color: var(--ink-muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.bs-check-it .bs-grow { flex: 1; min-width: 0; }
.bs-check-it small { display: block; font-size: 11.5px; color: var(--ink-muted); text-decoration: none; }

.bs-member { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: var(--surface-raised); width: 100%; }
.bs-member .bs-grow { flex: 1; min-width: 0; }
.bs-member b { font-weight: 400; font-size: 14px; display: block; }
.bs-member small { font-size: 12px; color: var(--ink-muted); }
.bs-member .bs-select { width: auto; padding: 8px 32px 8px 12px; border-radius: var(--radius-pill); font-size: 12.5px; }
.bs-member--pending { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }

.bs-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: var(--surface-raised); width: 100%; text-align: left; }
.bs-file__ico { width: 40px; height: 46px; border-radius: 10px; display: grid; place-items: center; font: 500 9.5px var(--font-mono); background: var(--surface-sunken); color: var(--ink-muted); flex: none; position: relative; }
.bs-file__ico::after { content: ""; position: absolute; top: 0; right: 0; width: 12px; height: 12px; background: linear-gradient(225deg, var(--surface-raised) 50%, var(--line-strong) 50%); border-radius: 0 10px 0 4px; }
.bs-file__ico--pdf { background: var(--orange-soft); color: var(--orange-deep); }
.bs-file__ico--xls { background: var(--mint-soft); color: var(--mint-ink); }
.bs-file__ico--doc { background: var(--blue-soft); color: var(--blue-ink); }
.bs-file__ico--img { background: var(--purple-tint); color: var(--purple-ink); }
.bs-file .bs-grow { flex: 1; min-width: 0; }
.bs-file b { display: block; font-weight: 400; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-file small { font-size: 11.5px; color: var(--ink-muted); }
.bs-ver { font: 500 10.5px var(--font-mono); padding: 3px 7px; border-radius: var(--radius-pill); background: var(--surface-strong); color: var(--ink); }

.bs-versions { display: flex; flex-direction: column; width: 100%; }
.bs-version { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; box-shadow: inset 0 -1px 0 var(--line); font-size: 13px; }
.bs-version small { display: block; color: var(--ink-muted); font-size: 11.5px; margin-top: 2px; }
.bs-version.is-current .bs-ver { background: var(--ink); color: var(--on-ink); }

.bs-thread { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.bs-comment { display: flex; gap: 10px; }
.bs-comment .bs-avatar { width: 32px; height: 32px; font-size: 11px; }
.bs-comment__body { flex: 1; min-width: 0; background: var(--surface-raised); border-radius: 18px 18px 18px 6px; padding: 10px 14px; font-size: 13.5px; line-height: 1.5; }
.bs-comment__body header { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--ink-muted); margin-bottom: 4px; }
.bs-comment__body header b { font-weight: 500; color: var(--ink); font-size: 13px; }
.bs-mention { color: var(--purple); font-weight: 500; }
.bs-comment__acts { display: flex; gap: 12px; margin-top: 6px; font-size: 12px; color: var(--ink-muted); }
.bs-comment--reply { margin-left: 42px; }
.bs-comment.is-resolved .bs-comment__body { background: var(--mint-tint); }

.bs-sla { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 6px; border-radius: var(--radius-pill); font-size: 12px; background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); }
.bs-sla__ring { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--c, var(--mint-strong)) calc(var(--p, 50) * 1%), var(--surface-strong) 0); }
.bs-sla--warn { --c: var(--orange); }
.bs-sla--late { --c: var(--alert); background: var(--orange-tint); box-shadow: none; color: var(--orange-deep); }

/* ---------- Formulários de cadastro e planejamento ---------- */
.bs-form { display: flex; flex-direction: column; gap: 22px; width: 100%; }
.bs-fsec { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 20px; padding-bottom: 22px; box-shadow: inset 0 -1px 0 var(--line); }
.bs-fsec:last-child { box-shadow: none; padding-bottom: 0; }
.bs-fsec__intro b { display: block; font-weight: 400; font-size: 15px; }
.bs-fsec__intro p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-muted); line-height: 1.45; }
.bs-fsec__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bs-fsec__fields .bs-full { grid-column: 1 / -1; }
@media (max-width: 720px) { .bs-fsec { grid-template-columns: 1fr; } .bs-fsec__fields { grid-template-columns: 1fr; } }
.bs-req::after { content: " *"; color: var(--alert); }
.bs-optional { color: var(--ink-faint); font-size: 11px; margin-left: 4px; }

.bs-unit { display: flex; align-items: stretch; background: var(--surface-raised); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.bs-unit:focus-within { box-shadow: inset 0 0 0 1.5px var(--purple-300), 0 0 0 4px var(--purple-tint); }
.bs-unit input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 14px; padding: 12px 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.bs-unit__u { display: grid; place-items: center; padding: 0 14px; font: 400 12px var(--font-mono); color: var(--ink-muted); background: var(--surface-sunken); }
.bs-unit__step { display: flex; flex-direction: column; }
.bs-unit__step button { flex: 1; width: 34px; font-size: 12px; color: var(--ink-muted); box-shadow: inset 1px 0 0 var(--line); }
.bs-unit__step button:hover { background: var(--surface-sunken); color: var(--ink); }

.bs-taginput { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 10px; min-height: 46px; border-radius: 18px; background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); cursor: text; }
.bs-taginput:focus-within { box-shadow: inset 0 0 0 1.5px var(--purple-300), 0 0 0 4px var(--purple-tint); }
.bs-taginput input { flex: 1; min-width: 120px; border: 0; outline: none; background: transparent; font: inherit; font-size: 14px; color: var(--ink); padding: 4px; }
.bs-token { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 4px; border-radius: var(--radius-pill); background: var(--surface-strong); font-size: 12.5px; }
.bs-token .bs-avatar { width: 22px; height: 22px; font-size: 9px; }
.bs-token--plain { padding-left: 10px; }
.bs-token button { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; line-height: 1; color: var(--ink-muted); }
.bs-token button:hover { background: var(--surface-raised); color: var(--ink); }

.bs-drop { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 16px; border-radius: var(--radius-lg); text-align: center; font-size: 13px; color: var(--ink-muted); background: var(--surface-raised); box-shadow: inset 0 0 0 1.5px var(--line-strong); background-image: repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 14px), repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 14px), repeating-linear-gradient(0deg, var(--line-strong) 0 8px, transparent 8px 14px), repeating-linear-gradient(0deg, var(--line-strong) 0 8px, transparent 8px 14px); background-size: 100% 1.5px, 100% 1.5px, 1.5px 100%, 1.5px 100%; background-position: 0 0, 0 100%, 0 0, 100% 0; background-repeat: no-repeat; box-shadow: none; }
.bs-drop b { font-weight: 400; color: var(--ink); font-size: 14px; }
.bs-drop.is-over { background-color: var(--purple-tint); color: var(--purple-ink); }
.bs-upload { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.bs-upload .bs-progress { flex: 1; }

.bs-cal { width: 300px; max-width: 100%; background: var(--surface); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-pop); }
.bs-cal__head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; font-size: 14px; }
.bs-cal__head .bs-go { width: 32px; height: 32px; }
.bs-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.bs-cal__grid span { font: 400 10.5px var(--font-mono); color: var(--ink-faint); padding: 6px 0; }
.bs-cal__d { height: 36px; border-radius: 50%; font: 400 12.5px var(--font-mono); color: var(--ink); position: relative; }
.bs-cal__d:hover { background: var(--surface-strong); }
.bs-cal__d.is-out { color: var(--ink-faint); }
.bs-cal__d.is-today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.bs-cal__d.is-range { background: var(--purple-tint); border-radius: 0; }
.bs-cal__d.is-start, .bs-cal__d.is-end { background: var(--ink); color: var(--on-ink); }
.bs-cal__d.is-start { border-radius: 50% 0 0 50%; }
.bs-cal__d.is-end { border-radius: 0 50% 50% 0; }
.bs-cal__d.has-ev::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--purple); }
.bs-cal__foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.bs-datefield { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 18px; background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.bs-datefield .bs-i { color: var(--ink-muted); }
.bs-datefield i { font-style: normal; color: var(--ink-faint); }

.bs-facets { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 300px; }
.bs-facet { padding: 12px 0; box-shadow: inset 0 -1px 0 var(--line); }
.bs-facet__h { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.bs-facet__h button { font-size: 11.5px; color: var(--ink-muted); }
.bs-facet__opt { display: flex; align-items: center; gap: 10px; padding: 5px 2px; font-size: 13px; cursor: pointer; }
.bs-facet__opt input { accent-color: var(--purple); width: 16px; height: 16px; }
.bs-facet__opt span { flex: 1; }
.bs-facet__opt small { font: 400 11px var(--font-mono); color: var(--ink-muted); }
.bs-facet__range { display: flex; align-items: center; gap: 8px; }
.bs-facet__range .bs-input { padding: 8px 10px; font-size: 13px; border-radius: 12px; }

.bs-inline { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; margin: -6px -10px; border-radius: 12px; cursor: text; font-size: 14px; }
.bs-inline:hover { background: var(--surface-sunken); }
.bs-inline:hover::after { content: "editar"; font-size: 11px; color: var(--ink-muted); }
.bs-inline.is-editing { background: var(--surface-raised); box-shadow: inset 0 0 0 1.5px var(--purple-300); }
.bs-inline.is-editing::after { display: none; }
.bs-inline input { border: 0; outline: none; background: transparent; font: inherit; color: var(--ink); min-width: 180px; }

.bs-settings { display: flex; flex-direction: column; background: var(--surface-raised); border-radius: var(--radius-lg); width: 100%; overflow: hidden; }
.bs-setting { display: flex; align-items: center; gap: 16px; padding: 14px 16px; box-shadow: inset 0 -1px 0 var(--line); }
.bs-setting:last-child { box-shadow: none; }
.bs-setting .bs-grow { flex: 1; min-width: 0; }
.bs-setting b { display: block; font-weight: 400; font-size: 14px; }
.bs-setting small { font-size: 12px; color: var(--ink-muted); }
.bs-setting .bs-select { width: auto; padding: 8px 32px 8px 12px; border-radius: var(--radius-pill); font-size: 13px; }
.bs-setting--danger b { color: var(--orange-deep); }

.bs-errors { border-radius: var(--radius-md); padding: 14px 16px; background: var(--orange-tint); color: var(--orange-deep); font-size: 13px; }
.bs-errors b { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.bs-errors ul { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.bs-errors a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.bs-savebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 10px 10px 18px; border-radius: var(--radius-pill); background: var(--surface-raised); box-shadow: var(--shadow-float); font-size: 13px; width: 100%; }
.bs-savebar .bs-grow { flex: 1; color: var(--ink-muted); }
.bs-savebar .bs-live { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }

.bs-stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); background: var(--surface-raised); border-radius: var(--radius-lg); width: 100%; overflow: hidden; }
.bs-stat-strip > div { padding: 14px 16px; box-shadow: inset -1px 0 0 var(--line); }
.bs-stat-strip small { display: block; font-size: 11.5px; color: var(--ink-muted); }
.bs-stat-strip b { display: block; font: 400 22px/1.2 var(--font-mono); letter-spacing: -.02em; margin-top: 4px; }
.bs-stat-strip span { font-size: 11.5px; }
