/* Self-hosted so the first paint never waits on a third party. Icons block
   rather than swap: a swap would flash ligature names like "space_dashboard". */
@font-face {
  font-family: 'Material Icons Round';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/assets/fonts/material-icons-round-5.3.0.woff2') format('woff2');
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext-5.3.0.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-5.3.0.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand-dark: #002b49;
  --brand-primary: #00bf9a;
  --brand-cta: #087961;
  --brand-cta-hover: #06624e;
  --brand-cta-active: #054f3f;
  --brand-ink-active: #066a55;
  --accent: #087961;
  --brand: #087961;
  --brand-light: #00b6d6;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --neutral: #94a3b8;
  --canvas: #f6fafb;
  --line: #dbe5e8;
  --shadow: 0 10px 30px rgba(0, 43, 73, 0.09);
  --rail-fg: #dcecf2;
  --page-bg: #f8fafc;
  --success-bg: #e2f8f2;
  --success-fg: #087961;
  --warning-bg: #fff3d9;
  --warning-fg: #9a5700;
  --error-bg: #ffebeb;
  --error-fg: #b52525;
  --mint-bg: #f0fffb;
  --mint-fg: #075c51;
  --ds-space-1: 0.25rem;
  --ds-space-2: 0.5rem;
  --ds-space-3: 0.75rem;
  --ds-space-4: 1rem;
  --ds-space-5: 1.25rem;
  --ds-space-6: 1.5rem;
  --ds-space-7: 2rem;
  --ds-space-8: 2.5rem;
  --tint-brand-soft: #f0fffb;
  --tint-brand: #e8faf5;
  --tint-brand-strong: #d9f0ea;
  --tint-brand-border: #b9ebe0;
  --brand-deep: #087961;
  --brand-deep-alt: #057d67;
  --brand-deepest: #075c51;
  --surface-muted: #edf1f2;
  --surface-subtle: #f7fbfc;
  --surface-sunken: #eef4f6;
  --rail-text: #dcecf2;
  --line-strong: #bdcdd2;
  --line-strong-alt: #b9c9ce;
  --tint-warning: #fff3d9;
  --tint-warning-alt: #fff2df;
  --tint-error: #ffebeb;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  color: var(--text-primary);
  background: var(--page-bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, 'system-ui', 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  /* No body-level font-size override - CoE leaves the 16px browser default
     and sizes every component explicitly (confirmed via computed styles
     against the real app); a smaller body base here made anything without
     its own explicit size render off relative to CoE throughout. */
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
/* Nothing in this file ever sized a checkbox - every text-input rule
 * explicitly carves them out (`:not([type='checkbox'])`), so every
 * checkbox in the app rendered at the browser's bare native size, which
 * on some platforms/zoom levels is a large, unstyled square with none of
 * the app's brand on it. One box, everywhere, themed with `accent-color`
 * (keeps native keyboard/screen-reader behaviour - no custom
 * `appearance: none` box to reimplement). The hidden mobile-nav toggle
 * in components/AppChrome.tsx is the one checkbox that must stay
 * invisible, hence the exclusion. */
input[type='checkbox']:not(.visually-hidden) {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
  vertical-align: middle;
  accent-color: var(--brand-primary);
  cursor: pointer;
}
input[type='checkbox']:disabled {
  cursor: not-allowed;
}
.material-icons {
  font-family: 'Material Icons Round';
  font-weight: normal;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  font-variant-ligatures: discretionary-ligatures;
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}
/* ============================================================
   Chrome - igual ao AppChrome real do UniConecta CoE:
   header navy fixo (4rem) + sidebar branca de 14.5rem com seções
   recolhíveis, não uma rail de ícones. Valores tirados direto do
   styles.css da suíte (.app-top-header, .app-sidebar, .app-nav-*).
   ============================================================ */
:root {
  --app-header-bar: 4rem;
}
.app-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- header ---------- */
.app-top-header {
  position: relative;
  z-index: 50;
  flex-shrink: 0;
  height: var(--app-header-bar);
  background: var(--brand-dark);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.app-top-header-inner {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  height: 100%;
  padding: 0 var(--ds-space-4);
  gap: var(--ds-space-3);
}
.app-top-header-left {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  min-width: 0;
}
.app-top-header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.app-top-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.app-top-header-tools {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

/* App-switcher: quadrado navy com uma letra ciano, igual ao apple-touch-icon
 * da suíte - é o mesmo sistema de ícone, só troca a letra por produto. */
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #012338;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0;
  flex-shrink: 0;
}
.brand-mark svg {
  width: 20px;
  height: 20px;
}
.app-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-family: Inter, sans-serif;
  font-weight: 300;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.app-wordmark b {
  font-weight: 300;
  color: var(--brand-light);
}
.app-wordmark span {
  color: #fff;
}
@media (max-width: 900px) {
  .app-wordmark {
    display: none;
  }
}

.app-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.app-switcher {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}
.app-switcher-trigger {
  border-radius: 8px;
}
.app-switcher-trigger:hover {
  background: rgba(255, 255, 255, 0.06);
}
.app-switcher-chevron {
  display: none;
  font-size: 1.15rem !important;
  flex-shrink: 0;
  opacity: 0.75;
}
@media (min-width: 640px) {
  .app-switcher-chevron {
    display: block;
  }
}
.app-switcher-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 0.4rem);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: min(18rem, 94vw);
  margin: 0;
  padding: 0.45rem;
  border-radius: 10px;
  background: var(--brand-dark);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.app-switcher-menu-label {
  margin: 0;
  padding: 0.25rem 0.5rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}
.app-switcher-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.app-switcher-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  font-size: 0.875rem;
  font-weight: 500;
}
.app-switcher-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.app-switcher-item--active {
  background: rgba(0, 182, 214, 0.16);
}
.app-switcher-item-name {
  min-width: 0;
}
.app-switcher-item-icon {
  font-size: 1rem !important;
  flex-shrink: 0;
  opacity: 0.7;
}

/* Seletor de organização. Mesmo componente do WorkspaceSwitcher real. */
.org-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 20rem;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
  color: inherit;
  text-align: left;
}
.org-chip:hover,
.org-switcher[open] .org-chip {
  background: rgba(255, 255, 255, 0.08);
}
.org-switcher {
  position: relative;
  min-width: 0;
  max-width: 20rem;
  width: 100%;
}
.org-switcher > .org-chip {
  cursor: pointer;
  font: inherit;
  list-style: none;
  width: 100%;
}
.org-switcher > .org-chip::-webkit-details-marker {
  display: none;
}
.org-switcher-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  min-width: 16.5rem;
  padding: 0.4rem;
  border-radius: 0.5rem;
  background: rgb(15 23 42);
  border: 1px solid rgb(51 65 85);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.45);
  z-index: 90;
}
.org-switcher-label {
  margin: 0 0 0.25rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(100 116 139);
}
.org-switcher-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: rgb(226 232 240);
  font: inherit;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}
.org-switcher-option span {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 0.1rem;
}
.org-switcher-option strong {
  font-size: 0.875rem;
  font-weight: 600;
}
.org-switcher-option small {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.7;
}
.org-switcher-option .material-icons:first-child,
.org-switcher-option .material-icons:last-child {
  font-size: 1.2rem !important;
  flex-shrink: 0;
}
.org-switcher-option:hover:not(:disabled) {
  background: rgb(255 255 255 / 0.07);
  color: #fff;
}
.org-switcher-option.is-current {
  background: rgb(255 255 255 / 0.08);
}
.org-switcher-option:disabled {
  cursor: default;
}
.org-switcher-error {
  margin: 0.35rem 0.65rem 0.2rem;
  color: rgb(252 165 165);
  font-size: 0.75rem;
}
.org-chip .material-icons:first-child {
  font-size: 18px;
  opacity: 0.9;
  flex-shrink: 0;
}
.org-chip-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.org-chip .org-chip-kicker {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
}
.org-chip .org-chip-label {
  font-size: 0.8125rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.org-chip .material-icons:last-child {
  font-size: 20px;
  opacity: 0.85;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .org-chip {
    width: 34px;
    max-width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }
}

/* Botões redondos do header (busca, avisos, ajuda) - pill translúcido
 * sobre navy, igual ao .app-header-tool-btn real. */
.app-header-tool-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgb(241, 245, 249);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}
.app-header-tool-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.2);
}
.app-header-search-kbd {
  font: 600 0.6875rem Inter, sans-serif;
  opacity: 0.8;
}
@media (max-width: 900px) {
  .app-header-search-kbd {
    display: none;
  }
}
.bell-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--error);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgb(226, 232, 240);
  font-size: 0.75rem;
  font-weight: 600;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}
.count-pill,
.mini-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Conta - avatar com gradiente + nome, igual ao .user-account-trigger real. */
.avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px 3px 3px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  max-width: 12rem;
}
.avatar:hover {
  background: rgba(255, 255, 255, 0.12);
}
.avatar-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
}
.avatar-name {
  font-size: 0.75rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .avatar-name {
    display: none;
  }
  .avatar {
    padding: 3px;
  }
}

/* Conta e ajuda - mesmas classes da CoE (user-account / help-menu). */
.user-account {
  position: relative;
  min-width: 0;
}
.user-account--loading {
  min-height: 2.25rem;
  min-width: 8rem;
}
.user-account-skeleton {
  display: block;
  height: 2.25rem;
  width: 10rem;
  border-radius: 0.5rem;
  background: rgb(255 255 255 / 0.1);
}
.user-account-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: min(100%, 18rem);
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  margin: 0;
  list-style: none;
  cursor: pointer;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  color: inherit;
  background: transparent;
  font: inherit;
}
.user-account-trigger::-webkit-details-marker {
  display: none;
}
.user-account-trigger:hover,
.user-account[open] .user-account-trigger {
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.12);
}
.user-account-avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgb(37 99 235), rgb(14 165 233));
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}
.user-account-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.user-account-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}
.user-account-role {
  font-size: 0.6875rem;
  font-weight: 500;
  color: rgb(186 230 253);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.user-account-chevron {
  flex-shrink: 0;
  font-size: 1.125rem !important;
  opacity: 0.85;
}
.user-account-panel,
.help-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 15.5rem;
  padding: 0.35rem;
  border-radius: 0.5rem;
  background: rgb(15 23 42);
  border: 1px solid rgb(51 65 85);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.45);
  z-index: 90;
}
.user-account-panel-identity {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem 0.65rem;
}
.user-account-panel-identity strong {
  color: #fff;
  font-size: 0.875rem;
}
.user-account-panel-identity span {
  color: rgb(148 163 184);
  font-size: 0.75rem;
}
.user-account-logout {
  display: block;
  width: 100%;
  min-height: 2.25rem;
  padding: 0.4rem 0.65rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: rgb(226 232 240);
  font: inherit;
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
}
.user-account-logout:hover {
  background: rgb(51 65 85);
  color: #fff;
}
.user-account-logout:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: -2px;
}
.user-account-panel-divider,
.help-menu-divider {
  height: 1px;
  margin: 0.25rem 0.35rem;
  background: rgb(51 65 85);
}
.help-menu {
  position: relative;
}
.help-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.08);
  color: rgb(226 232 240);
  cursor: pointer;
  list-style: none;
  border: 1px solid rgb(255 255 255 / 0.1);
  flex-shrink: 0;
}
.help-menu-trigger::-webkit-details-marker {
  display: none;
}
.help-menu-trigger:hover,
.help-menu[open] .help-menu-trigger {
  background: rgb(255 255 255 / 0.18);
  color: #fff;
}
.help-menu-icon {
  font-size: 1.2rem !important;
}
.help-menu-panel {
  width: 17rem;
  padding: 0.5rem;
}
.help-menu-section-label {
  margin: 0 0 0.25rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(100 116 139);
}
.help-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: rgb(226 232 240);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
}
.help-menu-item:hover {
  background: rgb(255 255 255 / 0.07);
  color: #fff;
}
.help-menu-item .material-icons {
  font-size: 1.2rem !important;
  flex-shrink: 0;
}
.help-menu-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.help-menu-item-title {
  font-size: 0.875rem;
  font-weight: 600;
}
.help-menu-item-sub {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.7;
}
.help-menu-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.65rem;
}
.help-menu-status-icon {
  font-size: 0.9rem !important;
  color: rgb(110 231 183);
}
.help-menu-status-text {
  font-size: 0.75rem;
  color: rgb(100 116 139);
}
@media (max-width: 720px) {
  .user-account-text {
    display: none;
  }
}

/* ---------- corpo: sidebar + conteúdo ---------- */
.app-below-header {
  display: flex;
  flex: 1;
  min-height: 0;
}
.app-sidebar {
  flex-shrink: 0;
  width: 14.5rem;
  background: rgb(252, 252, 253);
  border-right: 1px solid rgb(228, 231, 236);
  overflow: hidden;
}
.app-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.75rem 0.85rem 1rem;
  overflow: hidden;
}
.app-sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-nav-section {
  margin: 0;
  padding: 0;
}
.app-nav-section--spaced {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgb(237, 240, 244);
}
.app-nav-section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  margin: 0 0 0.4rem;
  padding: 0.2rem 0.3rem;
  font: inherit;
  font-weight: 600;
}
.app-nav-section-title-icon {
  font-size: 0.95rem !important;
  width: 0.95rem;
  height: 0.95rem;
  color: rgb(148, 163, 184);
  flex-shrink: 0;
  opacity: 0.9;
}
.app-nav-section-title-text {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(100, 116, 139);
  line-height: 1.2;
  white-space: nowrap;
}
/* Collapsible section header (rendered as a button; canCollapse groups only). */
.app-nav-section-toggle {
  width: auto;
  max-width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  border-radius: 0.45rem;
  transition: background-color 0.15s ease;
}
.app-nav-section-toggle:hover {
  background: rgb(241, 245, 249);
}
.app-nav-section-chevron {
  margin-left: 0.1rem;
  font-size: 1rem !important;
  width: 1rem;
  height: 1rem;
  color: rgb(148, 163, 184);
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.app-nav-section--collapsed .app-nav-section-chevron {
  transform: rotate(-90deg);
}
.app-nav-section-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.app-nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: rgb(51, 65, 85);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  width: 100%;
}
.app-nav-link:hover {
  background: #fff;
  border-color: rgb(226, 232, 240);
  color: rgb(15, 23, 42);
}
.app-nav-link--active {
  /* Accessible deep brand ink on soft brand tint (6.1:1 WCAG AA contrast). */
  background: var(--tint-brand);
  border-color: rgba(8, 121, 97, 0.32);
  color: var(--brand-ink-active);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(8, 121, 97, 0.12), 0 1px 3px rgba(0, 43, 73, 0.06);
}
.app-nav-link-icon {
  font-size: 1.125rem !important;
  flex-shrink: 0;
  color: rgb(100, 116, 139);
  transition: color 0.12s ease;
}
.app-nav-link:hover .app-nav-link-icon {
  color: rgb(51, 65, 85);
}
.app-nav-link-label {
  min-width: 0;
  flex: 1;
}
.app-nav-link--active .app-nav-link-icon {
  color: var(--brand-ink-active);
}
.app-sidebar-footer {
  flex-shrink: 0;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgb(228, 231, 236);
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgb(249, 250, 251);
  overflow: hidden;
}
/* Mesma marcação e classes do components/Breadcrumbs.tsx real:
 * <ol> + separador "/" via ::before, sem ícone entre os itens. */
.app-breadcrumbs {
  padding: 0.65rem 1.5rem 0;
  flex-shrink: 0;
}
.app-breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.app-breadcrumbs-list li {
  display: flex;
  align-items: center;
}
.app-breadcrumbs-list li + li::before {
  content: '/';
  margin: 0 0.4rem;
  opacity: 0.4;
}
.app-breadcrumbs-link {
  color: var(--text-secondary);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.app-breadcrumbs-link:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}
.app-breadcrumbs-current {
  color: var(--brand-dark);
  font-weight: 600;
}
.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 14px;
  font-weight: 600;
  line-height: 1;
  transition: 0.18s ease;
  white-space: nowrap;
}
.app-btn .material-icons {
  display: block;
  font-size: 18px;
  width: 18px;
  height: 18px;
  line-height: 1;
}
.app-btn--primary {
  color: #fff;
  background: var(--brand-cta);
  border-color: var(--brand-cta);
}
.app-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.app-btn--primary:hover:not(:disabled) {
  background: var(--brand-cta-hover);
  border-color: var(--brand-cta-hover);
}
.app-btn--primary:active:not(:disabled) {
  background: var(--brand-cta-active);
  border-color: var(--brand-cta-active);
}
.app-btn--secondary {
  color: var(--brand-dark);
  background: white;
  border-color: var(--line-strong);
}
.app-btn--secondary:hover:not(:disabled) {
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
}
.app-btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}
.app-btn--ghost:hover:not(:disabled) {
  color: var(--brand-dark);
  background: #edf4f5;
}
.app-btn--ghost-danger {
  background: transparent;
  color: var(--error);
}
.app-btn--danger {
  color: white;
  background: var(--error);
}
.app-btn--sm {
  min-height: 32px;
  padding: 0 11px;
  font-size: 0.75rem;
  gap: 5px;
}
.app-btn--sm .material-icons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}
.app-btn--icon {
  width: 34px;
  min-width: 34px;
  padding: 0;
}
.app-btn--sm.app-btn--icon {
  width: 32px;
  min-width: 32px;
}
.view {
  min-width: 0;
  flex: 1;
}
.builder {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  overflow: hidden;
  position: relative;
}
.builder.has-details {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(280px, 440px);
}
/* The architecture review carries a meter, a ROI table and one card per
   step. minmax(0, …) lets the pane shrink instead of overflowing the
   canvas on a laptop with the sidebar open. Below 1100px it becomes a
   drawer (same idea as the 900px IDE). */
.builder.has-arch {
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
}
.builder.has-arch.has-details {
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr) minmax(0, 360px);
}
.assistant-pane,
.details-pane {
  overflow-y: auto;
  background: white;
  min-width: 0;
}
.assistant-pane {
  border-right: 1px solid var(--line);
  padding: var(--ds-space-5);
  display: flex;
  flex-direction: column;
}
.pane-heading {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-5);
}
.pane-heading__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: white;
  background: var(--brand-dark);
  display: grid;
  place-items: center;
}
.pane-heading h1,
.pane-heading h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--brand-dark);
}
.pane-heading p {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.entry-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-2);
  margin-bottom: var(--ds-space-4);
}
.entry-tab {
  padding: var(--ds-space-2);
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  text-align: left;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.2;
}
.entry-tab .material-icons {
  color: var(--brand-primary);
  font-size: 18px;
}
/* O hint só cabia com o card grande; a versão compacta some com ele -
 * continua no DOM para quem lê por leitor de tela. */
.entry-tab small {
  display: none;
}
.entry-tab.active {
  color: var(--brand-dark);
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand-primary);
}
.chat-stream {
  display: grid;
  gap: var(--ds-space-4);
  overflow-y: auto;
  padding-right: 2px;
  flex: 1;
  min-height: 0;
  align-content: start;
}
.chat-message {
  font-size: 0.8125rem;
  line-height: 1.5;
  padding: var(--ds-space-3);
  border-radius: 10px;
}
.chat-message.agent {
  background: #f2f7f8;
  color: #425568;
  border-top-left-radius: 2px;
}
.chat-message.user {
  background: #e0faf3;
  color: var(--brand-deepest);
  border-top-right-radius: 2px;
  margin-left: var(--ds-space-5);
}
.chat-message strong {
  color: var(--brand-dark);
}
.chat-input {
  margin-top: auto;
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
}
.chat-input textarea {
  resize: none;
  width: 100%;
  min-height: 78px;
  border: 1px solid #bccfd4;
  border-radius: 9px;
  padding: var(--ds-space-3);
  outline-color: var(--brand-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
}
.chat-input__spec {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
}
.chat-input__spec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}
.chat-input__spec-head .field-label {
  margin-bottom: 0;
}
.chat-input .spec-box {
  min-height: 72px;
  max-height: 8rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  background: var(--surface-subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.input-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--ds-space-2);
  color: var(--text-secondary);
  font-size: 0.6875rem;
}
.chat-input__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.chat-input__spec-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand-deep);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.chat-input__spec-toggle .material-icons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}
.chat-input__spec-toggle:hover,
.chat-input__spec-toggle.is-open {
  color: var(--brand-deepest);
  text-decoration: underline;
}
.chat-input__spec-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  text-decoration: none;
}
.chat-input__spec-toggle.has-spec:not(.is-open) {
  color: var(--brand-deepest);
}

/* Etapas - a real toolbar: short, grouped, scannable, instead of one long
 * flat list of buttons stretched full-width (that read as a plain link
 * list, not a palette). Icon-first tiles in a 2-col grid, one small-caps
 * label per group. */
.step-palette-fold {
  border: 0;
  padding: 0;
}
.step-palette-fold > summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 4px 0;
}
.step-palette-fold > summary::-webkit-details-marker {
  display: none;
}
.step-palette {
  display: grid;
  gap: var(--ds-space-2);
}
.step-palette-group + .step-palette-group {
  margin-top: var(--ds-space-1);
}
.step-palette-group-label {
  display: block;
  margin: var(--ds-space-2) 0 6px;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.step-tile-grid {
  /* The palette lives in the builder's fixed-width side column
   * (`.assistant-pane`, capped ~260px regardless of window width) - two
   * columns there always cramps labels like "Esperar resposta de...", so
   * this stays one column at every breakpoint. */
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.step-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  padding: 8px 10px;
  text-align: left;
  color: var(--text-primary);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.step-tile-icon {
  flex: none;
  font-size: 18px;
  color: var(--brand-primary);
}
.step-tile-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.step-tile-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}
.step-tile-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 500;
}
.step-tile:hover:not(:disabled),
.step-tile:focus-visible:not(:disabled) {
  border-color: var(--brand-primary);
  background: var(--mint-bg);
  outline: none;
}
.step-tile:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
/* A link that carries its own icon (external-open, etc.) inline with text -
 * lighter weight than an .app-btn, meant for a table cell or a card body. */
/* Used on both <a> and <button> - the button case needs its own reset,
 * otherwise it keeps the browser's default button chrome (border,
 * background, padding) underneath these color/type rules and comes out
 * looking like a stray pill button instead of a plain text link. */
.link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand-deep);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.link-with-icon .material-icons {
  font-size: 15px;
}
.link-with-icon:hover {
  text-decoration: underline;
}

/* Conectores → Braços: one panel, two equal-height columns. Fields stack
 * full-width (property-group). Actions sit on a shared footer so the
 * buttons line up even when Roberty has more fields. */
.arm-bindings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  border-top: 1px solid var(--line);
}
.arm-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.25rem;
  background: var(--surface-color);
}
.arm-card + .arm-card {
  border-left: 1px solid var(--line);
}
.arm-card-head {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-5);
}
.arm-card-head-copy {
  min-width: 0;
  flex: 1;
}
.arm-card-head h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 1rem;
  line-height: 1.3;
}
.arm-card-head-copy > p {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
}
.arm-card-head .mini-status {
  flex-shrink: 0;
  margin-top: 2px;
}
.arm-card-tested {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  line-height: 1.4;
}
.arm-card-form {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.arm-card-form .property-group {
  margin-bottom: var(--ds-space-4);
}
.arm-card-form .property-group:last-of-type {
  margin-bottom: 0;
}
.arm-card-hint {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
}
.arm-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-2);
  margin-top: auto;
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--line);
}
.arm-card-toast {
  flex: 1 1 100%;
  margin: 4px 0 0;
}
.arm-card-found {
  margin-top: var(--ds-space-4);
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--line);
}
.arm-card-found > summary {
  display: flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
  margin-bottom: 0;
}
.arm-card-found > summary::-webkit-details-marker {
  display: none;
}
.arm-card-found[open] > summary {
  margin-bottom: var(--ds-space-2);
}
.arm-card-found > summary::after {
  content: 'expand_more';
  font-family: 'Material Icons Round';
  font-weight: normal;
  font-style: normal;
  font-size: 1.125rem;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  color: var(--text-secondary);
}
.arm-card-found[open] > summary::after {
  content: 'expand_less';
}
.attention-icon--mint {
  background: var(--tint-brand);
  color: var(--brand-deep);
}
.attention-icon--navy {
  background: var(--surface-sunken);
  color: var(--brand-dark);
}
.arm-discovery-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  max-height: 11rem;
  overflow: auto;
}
.arm-discovery-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-2);
  padding: 8px 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--surface-muted);
}
.arm-discovery-list li:last-child {
  border-bottom: 0;
}
@media (max-width: 900px) {
  .arm-bindings {
    grid-template-columns: 1fr;
  }
  .arm-card + .arm-card {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* Canvas node inspector - n8n/Roberty arm state. Unlinked: one primary
 * action plus a dropdown of what's already provisioned, no raw slot typing.
 * Linked: a compact read-only summary, never an editable URI field. */
.arm-picker {
  display: grid;
  gap: var(--ds-space-2);
}
.arm-picker-existing {
  display: grid;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
}
.arm-linked-card {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  border: 1px solid var(--tint-brand-border);
  background: var(--tint-brand-soft);
  border-radius: 9px;
  padding: 10px 12px;
}
.arm-linked-card .material-icons {
  color: var(--brand-deep);
}
.arm-linked-card-body {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}
.arm-linked-card-body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--brand-dark);
  font-size: 0.8125rem;
}
.arm-linked-card-body span {
  color: var(--text-secondary);
  font-size: 0.6875rem;
}
.arm-linked-card .header-actions {
  margin-left: 0;
}

/* Designer n8n picker (N8nWorkflowPicker) */
.n8n-picker {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.n8n-status {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: start;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f7f9fb;
  font-size: 0.8125rem;
}
.n8n-status--loading {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}
.n8n-status--loading .material-icons {
  font-size: 18px;
  color: var(--brand-primary);
}
.n8n-status__icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 18px;
  background: white;
  color: var(--brand-deep);
  border: 1px solid var(--line);
}
.n8n-status__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.n8n-status__body strong {
  color: var(--brand-dark);
}
.n8n-status__body span {
  color: var(--text-secondary);
  line-height: 1.45;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}
.n8n-status > .app-btn,
.n8n-status__actions {
  grid-column: 1 / -1;
  margin-top: 6px;
}
.n8n-status > .app-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.n8n-status > .app-btn .material-icons {
  font-size: 16px;
}
.n8n-status__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.n8n-status--empty {
  border-style: dashed;
  border-color: var(--tint-brand-border);
  background: var(--tint-brand-soft);
}
.n8n-status--warn {
  border-color: #f3d19c;
  background: #fff8ec;
}
.n8n-status--warn .n8n-status__icon {
  color: #b26a00;
  border-color: #f3d19c;
}
.n8n-instance {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 0.75rem;
}
.n8n-instance select {
  flex: 1;
  min-width: 0;
}
.n8n-conn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 10px;
  border-radius: 10px;
  background: #f1fbf6;
  border: 1px solid #cdeedb;
  font-size: 0.75rem;
  color: var(--text-secondary);
  min-width: 0;
}
.n8n-conn__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1f9d55;
  box-shadow: 0 0 0 3px rgba(31, 157, 85, 0.18);
  flex: 0 0 auto;
}
.n8n-conn__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.n8n-conn__text strong {
  color: var(--brand-dark);
}
.n8n-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  flex: 0 0 auto;
  text-decoration: none;
}
.n8n-icon-btn:hover:not([disabled]) {
  background: rgba(0, 40, 70, 0.07);
  color: var(--brand-dark);
}
.n8n-icon-btn .material-icons {
  font-size: 17px;
}
.n8n-browser {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.n8n-browser__note {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}
.n8n-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 4px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.n8n-search:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 153, 140, 0.16);
}
.n8n-search > .material-icons {
  font-size: 18px;
  color: var(--text-secondary);
}
.n8n-picker .n8n-search input {
  flex: 1;
  width: auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  border: 0;
  outline: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.8125rem;
  box-shadow: none;
}
.n8n-search input::-webkit-search-cancel-button {
  display: none;
}
.n8n-chips {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 1px;
}
.n8n-chips::-webkit-scrollbar {
  display: none;
}
.n8n-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.n8n-chip:hover {
  border-color: var(--tint-brand-border);
  color: var(--brand-dark);
}
.n8n-chip.is-on {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: white;
}
.n8n-chip__n {
  font-weight: 500;
  opacity: 0.7;
}
.n8n-chip--tag .material-icons {
  font-size: 12px;
}
.n8n-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}
.n8n-results-head > span {
  white-space: nowrap;
}
.n8n-picker .n8n-results-head select {
  flex: 0 0 auto;
  width: auto;
  height: 26px;
  min-height: 0;
  padding: 0 24px 0 8px;
  border-radius: 7px;
  font-size: 0.6875rem;
}
.n8n-results {
  display: grid;
  align-content: start;
  gap: 2px;
  max-height: min(340px, 46vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
}
.n8n-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 6px 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  scroll-margin: 4px;
}
.n8n-row.is-active {
  background: white;
  box-shadow: 0 0 0 1px var(--tint-brand-border), 0 2px 8px rgba(0, 30, 50, 0.06);
}
.n8n-row.is-busy {
  opacity: 0.7;
  pointer-events: none;
}
.n8n-row.is-busy .n8n-row__go {
  animation: ff-spin 0.9s linear infinite;
}
.n8n-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c3cbd3;
  flex: 0 0 auto;
}
.n8n-row__dot.is-on {
  background: #1f9d55;
}
.n8n-row__body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.n8n-row__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--brand-dark);
  font-size: 0.8125rem;
  font-weight: 600;
}
.n8n-row__name mark {
  background: #fff1b8;
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
.n8n-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}
.n8n-row__meta .is-warn {
  color: #b26a00;
}
.n8n-row__tag {
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 40, 70, 0.06);
}
.n8n-row__badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--tint-brand-soft);
  color: var(--brand-deep);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.n8n-row .n8n-icon-btn {
  opacity: 0;
}
.n8n-row.is-active .n8n-icon-btn,
.n8n-row .n8n-icon-btn:focus-visible {
  opacity: 1;
}
.n8n-row__go {
  flex: 0 0 auto;
  font-size: 18px;
  color: var(--brand-primary);
  opacity: 0;
}
.n8n-row.is-active .n8n-row__go,
.n8n-row.is-busy .n8n-row__go {
  opacity: 1;
}
.n8n-results__empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 22px 10px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.n8n-results__empty .material-icons {
  font-size: 22px;
  opacity: 0.6;
}
.n8n-results__more {
  margin: 4px 0 2px;
  text-align: center;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}
.n8n-keys {
  margin: 0;
  font-size: 0.625rem;
  color: var(--text-secondary);
}
.n8n-keys kbd {
  display: inline-block;
  min-width: 16px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: white;
  font: inherit;
  font-weight: 600;
  text-align: center;
}
.n8n-create {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.n8n-create .app-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.n8n-create .material-icons {
  font-size: 16px;
}
.modal-backdrop.n8n-connect-backdrop {
  z-index: 200;
  backdrop-filter: blur(2px);
}
.modal.n8n-connect {
  width: min(500px, 100%);
  gap: 14px;
}
.n8n-connect__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.n8n-connect__head p {
  margin: 4px 0 0;
  font-size: 0.8125rem;
}
.n8n-connect__logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: linear-gradient(135deg, #ea4b71, #ff8a5b);
  color: white;
  font-size: 22px;
}
.n8n-connect__steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.n8n-connect__steps li {
  display: grid;
  gap: 6px;
  padding-left: 32px;
  position: relative;
  counter-increment: step;
}
.n8n-connect__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tint-brand-soft);
  color: var(--brand-deep);
  font-size: 0.6875rem;
  font-weight: 700;
}
.n8n-connect__steps label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-dark);
}
.n8n-connect input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong-alt, var(--line));
  border-radius: 10px;
  background: white;
  color: var(--brand-dark);
  font: inherit;
  font-size: 0.875rem;
  outline: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.n8n-connect input:hover {
  border-color: var(--tint-brand-border);
}
.n8n-connect input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 153, 140, 0.16);
}
.n8n-connect input[aria-invalid='true'] {
  border-color: #d64545;
}
.n8n-connect .field-hint a {
  color: var(--brand-deep);
  font-weight: 600;
}
.n8n-connect__more summary {
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
@media (max-width: 640px) {
  .n8n-search {
    height: 44px;
  }
  .n8n-search input {
    font-size: 16px;
  }
  .n8n-row {
    padding-block: 11px;
  }
  .n8n-row .n8n-icon-btn,
  .n8n-row__go {
    opacity: 1;
  }
  .n8n-keys {
    display: none;
  }
  .n8n-connect input {
    height: 48px;
    font-size: 16px;
  }
}
.canvas-column {
  min-width: 0;
  display: grid;
  /* Without an explicit column the implicit one sizes to MAX-CONTENT, so
   * the toolbar's row of buttons (≈850px) set the width of the titlebar,
   * the canvas, the dock and the footer alike - they all shot past a
   * phone's viewport by ~480px. The canvas has its own pan/zoom and the
   * bars scroll on their own; none of them may widen the column. */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr auto;
  background: var(--canvas);
}
.canvas-titlebar {
  grid-row: 1;
}
.toolbar {
  grid-row: 2;
}
.edit-bar {
  grid-row: 3;
}
.canvas-wrap {
  grid-row: 4;
  position: relative;
  overflow: hidden;
  min-height: 0;
  background-image: radial-gradient(#cfdbdf 1px, transparent 1px);
  background-size: 18px 18px;
}
.canvas-footer {
  grid-row: 5;
}
.canvas-titlebar {
  padding: var(--ds-space-4) var(--ds-space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  background: white;
  border-bottom: 1px solid var(--line);
}
.canvas-titlebar > div:first-child {
  min-width: 140px;
  flex: 1 1 140px;
}
.canvas-titlebar .header-actions {
  flex-wrap: nowrap;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.canvas-titlebar .header-actions::-webkit-scrollbar {
  display: none;
}
.canvas-titlebar .header-actions > * {
  flex-shrink: 0;
  white-space: nowrap;
}
.canvas-titlebar h2 {
  font-size: 1rem;
  color: var(--brand-dark);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.draft-state {
  color: var(--text-secondary);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 5px;
}
.draft-state .material-icons {
  font-size: 1rem;
  color: var(--success);
}
.toolbar {
  position: relative;
  z-index: 5;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: var(--ds-space-1);
  padding: var(--ds-space-2) var(--ds-space-4);
  background: var(--surface-color);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.toolbar::-webkit-scrollbar {
  display: none;
}
.toolbar > * {
  flex-shrink: 0;
}
.toolbar.is-pop-open {
  overflow: visible;
  z-index: 30;
}
.toolbar-divider {
  height: 24px;
  width: 1px;
  background: var(--line);
  margin: 0 var(--ds-space-2);
}
.toolbar-spacer {
  flex: 1 1 auto;
  min-width: 8px;
}
.canvas-wrap.is-loading .canvas {
  visibility: hidden;
}
.canvas-loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--ds-space-4);
  background: rgba(246, 250, 251, 0.94);
}
.canvas-loading p {
  margin: 0;
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 0.875rem;
}
.canvas-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--tint-brand-strong);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .canvas-spinner {
    animation: none;
  }
}
.canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 1200px;
  height: 720px;
  transform-origin: 0 0;
  touch-action: none;
}
/* Raia - faixa horizontal atrás dos nós, mostrando de quem é a etapa
 * (departamento ou sistema). Zebra sutil só para separar uma raia da
 * seguinte sem disputar atenção com os nós, que continuam o protagonista. */
.lane-band {
  position: absolute;
  left: 0;
  border-top: 1px dashed var(--line-strong-alt);
  border-bottom: 1px dashed var(--line-strong-alt);
  pointer-events: none;
}
.lane-band--a {
  background: rgba(0, 191, 154, 0.04);
}
.lane-band--b {
  background: rgba(0, 43, 73, 0.03);
}
.lane-band-label {
  position: sticky;
  left: 12px;
  top: 8px;
  display: inline-block;
  margin: 8px 0 0 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line-strong-alt);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}
.node-help--rule {
  color: var(--brand-primary);
  box-shadow: 0 0 0 2px var(--tint-brand-soft);
  border-radius: 999px;
}
.canvas svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.canvas svg .edge-hit {
  pointer-events: stroke;
}
.edge {
  stroke: #8ea0a6;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.edge--back {
  stroke: #7d93a0;
}
.edge.active {
  stroke: var(--brand-primary);
  stroke-width: 3;
  stroke-dasharray: 8 6;
  animation: dash 1s linear infinite;
}
.edge-build {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: draw 0.5s ease forwards;
}
.node {
  position: absolute;
  z-index: 2;
  width: 168px;
  min-height: 93px;
  padding: var(--ds-space-3);
  border: 1px solid var(--line-strong-alt);
  border-radius: 11px;
  background: white;
  box-shadow: 0 3px 10px rgba(0, 43, 73, 0.07);
  user-select: none;
  cursor: grab;
  touch-action: none;
}
.node:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 3px;
}
.node:active {
  cursor: grabbing;
}
.node.selected {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 1px var(--brand-primary), 0 0 0 4px rgba(0, 191, 154, 0.15), var(--shadow);
}
.node.selected.multi {
  box-shadow: 0 0 0 1px var(--brand-primary), 0 0 0 5px rgba(0, 120, 212, 0.18), var(--shadow);
}
.canvas-marquee {
  position: absolute;
  border: 1.5px solid #0f766e;
  background: rgba(15, 118, 110, 0.12);
  border-radius: 6px;
  pointer-events: none;
  z-index: 4;
}

/* Sticky notes + sections (canvas chrome, not executable steps). */
.canvas-sticky,
.canvas-section {
  position: absolute;
  z-index: 1;
  box-sizing: border-box;
  color: var(--anno-ink, #5c4f3a);
  background: var(--anno-bg, #fbf6d9);
  border: 1px solid var(--anno-accent, #e0d07a);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  touch-action: none;
  user-select: none;
}
.canvas-sticky {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.canvas-sticky.is-selected,
.canvas-section.is-selected {
  box-shadow: 0 0 0 2px var(--anno-accent, #7dcdb8), 0 10px 24px rgba(15, 23, 42, 0.1);
}
.canvas-sticky__bar,
.canvas-section__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  border-bottom: 1px solid color-mix(in srgb, var(--anno-accent) 55%, transparent);
  cursor: grab;
}
.canvas-sticky__bar .material-icons,
.canvas-section__bar .material-icons {
  font-size: 0.95rem;
  opacity: 0.75;
}
.canvas-sticky__text {
  flex: 1;
  width: 100%;
  border: 0;
  resize: none;
  background: transparent;
  color: inherit;
  padding: 10px 12px 14px;
  font: 500 0.875rem/1.45 "IBM Plex Sans", "Segoe UI", sans-serif;
  outline: none;
}
.canvas-sticky__text::placeholder {
  color: color-mix(in srgb, var(--anno-ink) 45%, transparent);
}
.canvas-section {
  background: color-mix(in srgb, var(--anno-bg) 72%, transparent);
  border-style: dashed;
  border-width: 1.5px;
}
.canvas-section.is-collapsed {
  border-style: solid;
  background: var(--anno-bg);
}
.canvas-section__title {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: 650 0.8rem/1.2 inherit;
  outline: none;
}
.canvas-section__count {
  opacity: 0.7;
  font-weight: 600;
  white-space: nowrap;
}
.canvas-section__steps {
  list-style: none;
  margin: 0;
  padding: 0 10px 6px;
  pointer-events: none;
}
.canvas-section__steps li {
  height: 18px;
  line-height: 18px;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.anno-colors {
  display: inline-flex;
  gap: 3px;
  margin-left: auto;
}
.anno-color {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--anno-ring) 70%, #64748b);
  background: var(--anno-swatch);
  padding: 0;
  cursor: pointer;
}
.anno-color.is-on {
  outline: 2px solid var(--anno-ring);
  outline-offset: 1px;
}
.anno-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
.anno-icon-btn:hover {
  background: color-mix(in srgb, var(--anno-accent) 35%, white);
}
.anno-icon-btn .material-icons {
  font-size: 0.95rem;
}
.anno-resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 55%, color-mix(in srgb, var(--anno-ink) 35%, transparent) 55%);
  border-radius: 0 0 10px 0;
}
.arrange-bar__btn--label {
  gap: 4px;
  padding: 0 10px;
  width: auto;
  font-size: 0.7rem;
  font-weight: 650;
}
.arrange-bar {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: min(720px, calc(100% - 24px));
  padding: 6px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(10px);
}
.arrange-bar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.arrange-bar__row--pin .arrange-bar__tidy {
  margin-left: auto;
}
.arrange-bar__count {
  font-size: 0.72rem;
  font-weight: 650;
  color: #0f766e;
  padding: 0 6px;
  white-space: nowrap;
}
.arrange-bar__group {
  display: flex;
  gap: 2px;
  padding: 0 4px;
  border-left: 1px solid #e2e8f0;
}
.arrange-bar__btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.arrange-bar__btn:hover:not(:disabled) { background: #ecfdf5; color: #0f766e; }
.arrange-bar__btn:disabled { opacity: 0.35; cursor: default; }
.arrange-bar__btn .material-icons { font-size: 1.05rem; }
.arrange-bar__gap {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
}
.arrange-bar__gap input { width: 72px; accent-color: #0f766e; }
.arrange-bar__tidy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 9px;
  background: #0f766e;
  color: white;
  font-size: 0.75rem;
  font-weight: 650;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.arrange-bar__tidy:disabled { opacity: 0.45; cursor: default; }
.arrange-bar__tidy .material-icons { font-size: 1rem; }
.node.added {
  border-color: var(--success);
  background: #f2fffb;
}
.node.running {
  border-color: var(--brand-primary);
  background: #ecfffa;
  box-shadow: 0 0 0 1px var(--brand-primary), 0 0 0 5px rgba(0, 191, 154, 0.18);
}
.node.building {
  animation: nodeIn 0.4s both;
}
.node-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--ds-space-1);
}
.node-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #e8f9f5;
  color: #008d75;
}
.node h3 {
  margin: var(--ds-space-2) 0 3px;
  font-size: 0.8125rem;
  color: var(--brand-dark);
  overflow-wrap: anywhere;
}
.node p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.node-help {
  border: 0;
  padding: 0;
  color: var(--text-secondary);
  background: transparent;
}
.node-help:hover {
  color: var(--brand-primary);
}
.node-handle {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  padding: 0;
  border: 2px solid var(--brand-dark);
  border-radius: 50%;
  background: white;
}
.node-handle:hover,
.node-handle:focus-visible {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  outline: none;
}
.node-handle--in {
  left: -9px;
  pointer-events: none;
}
.node-handle--out {
  right: -9px;
}
.canvas-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  padding: var(--ds-space-3) var(--ds-space-5);
  background: var(--surface-color);
  border-top: 1px solid var(--line);
}
.edit-bar {
  margin: var(--ds-space-3) var(--ds-space-5);
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  padding: 9px var(--ds-space-3);
  border: 1px solid var(--tint-brand-border);
  border-radius: 9px;
  background: var(--tint-brand-soft);
  color: var(--brand-deepest);
  font-size: 0.8125rem;
}
.edit-bar.hidden {
  display: none;
}
.edit-bar .toolbar-spacer {
  min-width: 4px;
}
.details-pane {
  border-left: 1px solid var(--line);
}
.details-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.details-head > div:first-child {
  min-width: 0;
}
.details-head-actions {
  display: flex;
  flex-shrink: 0;
}
.details-head h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--brand-dark);
}
.details-head p {
  margin: var(--ds-space-2) 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.details-body {
  padding: 1rem 1.1rem 1.15rem;
}

/* Propriedades vs. Execução, no mesmo painel direito. */
.details-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.details-tab {
  padding: 7px 11px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.details-tab:hover {
  color: var(--brand-dark);
  background: var(--surface-subtle);
}
.details-tab.is-active {
  color: var(--brand-deep);
  background: var(--tint-brand);
  box-shadow: inset 0 -2px 0 var(--brand-primary);
}
.details-tab-badge {
  min-width: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #04231d;
  font-size: 0.625rem;
  line-height: 16px;
  text-align: center;
}
.details-tab:not(.is-active) .details-tab-badge {
  background: var(--surface-muted);
  color: var(--text-secondary);
}

/* ── inspetor de execução de uma etapa ────────────────────────────── */
.node-run {
  padding: 0.9rem 1.1rem 1.15rem;
}
.node-run__summary {
  display: flex;
  gap: var(--ds-space-4);
  margin-bottom: var(--ds-space-3);
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.node-run__summary strong {
  color: var(--brand-dark);
}
.node-run__io {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: var(--ds-space-3);
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--surface-sunken);
}
.node-run__io-label {
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--tint-brand);
  color: var(--brand-deep);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.node-run__io code {
  color: var(--brand-deepest);
  font-size: 0.6875rem;
  word-break: break-word;
}
.node-run__preview {
  margin-bottom: var(--ds-space-3);
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px dashed var(--warning);
  background: var(--tint-warning);
}
.node-run__preview-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--warning-fg);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.node-run__preview-head .material-icons {
  font-size: 0.9375rem;
}
.node-run__preview-summary {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
}
.node-run__preview .node-run__detail {
  margin-left: 0;
}
.node-run__preview .ask-card__call {
  display: block;
  margin-top: 6px;
}
.node-run__list {
  list-style: none;
  margin: 0 0 var(--ds-space-3);
  padding: 0;
  border-left: 2px solid var(--line);
}
.node-run__row {
  position: relative;
  padding: 7px 0 7px 14px;
  margin-left: -1px;
  border-left: 2px solid var(--line-strong-alt);
}
.node-run__row--ok {
  border-left-color: var(--success);
}
.node-run__row--warn {
  border-left-color: var(--warning);
}
.node-run__row--error {
  border-left-color: var(--error);
}
.node-run__row-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.node-run__row .trace-time {
  color: var(--text-secondary);
}
.node-run__row .trace-icon {
  font-size: 1rem !important;
  align-self: center;
}
.node-run__row--ok .trace-icon {
  color: var(--success-fg);
}
.node-run__row--warn .trace-icon {
  color: var(--warning-fg);
}
.node-run__row--error .trace-icon {
  color: var(--error-fg);
}
.node-run__msg {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.8125rem;
}
.node-run__row .trace-token {
  color: var(--text-secondary);
  font-size: 0.625rem;
}
.node-run__detail {
  margin: 3px 0 0 24px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.4;
}
.node-run__resp {
  margin: 6px 0 0 0;
}
.node-run .http-ex {
  margin-bottom: var(--ds-space-3);
}

/* ── HTTP exchange inspector (pedido / resposta / JSON) ────────────── */
.http-ex {
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid var(--line-strong-alt);
  background: var(--brand-dark);
  color: #d7f5ec;
  overflow: hidden;
}
/* The global `code` chip is a light box: inside this dark panel it reads
   as a hole punched in the surface. Colour alone carries the meaning. */
.http-ex code {
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.http-ex__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-align: left;
  cursor: default;
}
.http-ex--compact .http-ex__bar:not(:disabled) {
  cursor: pointer;
}
.http-ex__bar:disabled {
  cursor: default;
  opacity: 1;
}
.http-ex__verb {
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(0, 191, 154, 0.22);
  color: #7dffe0;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.http-ex__verb--post,
.http-ex__verb--put,
.http-ex__verb--patch {
  background: rgba(47, 155, 255, 0.22);
  color: #9fd0ff;
}
.http-ex__verb--delete {
  background: rgba(239, 68, 68, 0.22);
  color: #ffb3b3;
}
.http-ex__status {
  flex: 0 0 auto;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.http-ex__status--ok {
  background: rgba(16, 185, 129, 0.22);
  color: #7dffe0;
}
.http-ex__status--error {
  background: rgba(239, 68, 68, 0.22);
  color: #ffb3b3;
}
.http-ex__status--warn {
  background: rgba(245, 158, 11, 0.22);
  color: #ffd79a;
}
.http-ex__status--info {
  background: rgba(255, 255, 255, 0.08);
  color: #9ec5d8;
}
.http-ex__ms {
  flex: 0 0 auto;
  color: #7d98a5;
  font-size: 0.625rem;
  font-variant-numeric: tabular-nums;
}
.http-ex__req {
  flex: 1 1 auto;
  min-width: 0;
  color: #cfe3ea;
  font-size: 0.6875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.http-ex__chev {
  margin-left: auto;
  font-size: 1.125rem !important;
  color: #7d98a5;
}
.http-ex__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 8px;
}
.http-ex__chip {
  display: inline-flex;
  gap: 5px;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d7f5ec;
  font-size: 0.625rem;
  overflow: hidden;
}
.http-ex__chip em {
  color: #7d98a5;
  font-style: normal;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.http-ex__tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
  /* Four tabs plus "Copiar JSON" do not fit the wait card at its
     narrowest, and a wrapped tab row beats a clipped one. */
  flex-wrap: wrap;
}
.http-ex__tab {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #7d98a5;
  font-size: 0.6875rem;
  font-weight: 600;
}
.http-ex__tab em {
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-style: normal;
  font-size: 0.5625rem;
}
.http-ex__tab:hover {
  color: #d7f5ec;
}
.http-ex__tab.is-on {
  color: #7dffe0;
  border-bottom-color: var(--brand-primary);
}
.http-ex__copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 4px 8px;
  white-space: nowrap;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9ec5d8;
  font-size: 0.625rem;
  font-weight: 600;
}
.http-ex__copy:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #d7f5ec;
}
.http-ex__copy .material-icons {
  font-size: 0.875rem;
}
.http-ex__empty {
  margin: 0;
  padding: 12px 12px 14px;
  color: #7d98a5;
  font-size: 0.75rem;
}
.http-ex__mapped,
.http-ex__headers {
  list-style: none;
  margin: 0;
  padding: 8px 10px 12px;
  display: grid;
  gap: 6px;
}
.http-ex__mapped li,
.http-ex__headers li {
  display: grid;
  grid-template-columns: minmax(72px, 0.9fr) minmax(64px, 0.8fr) 1.3fr;
  gap: 8px;
  align-items: baseline;
  font-size: 0.75rem;
}
.http-ex__mapped code,
.http-ex__headers code,
.http-ex__mapped strong,
.http-ex__headers span {
  min-width: 0;
}
.http-ex__headers li {
  grid-template-columns: minmax(90px, 0.8fr) 1.4fr;
}
.http-ex__mapped code,
.http-ex__headers code {
  color: #9fd0ff;
  font-size: 0.6875rem;
}
.http-ex__from {
  min-width: 0;
  color: #7d98a5;
  font-size: 0.625rem;
  /* `location.coordinates.0` is longer than its column: without this it
     prints straight over the value next to it. */
  overflow-wrap: anywhere;
}
.http-ex__mapped strong {
  color: #7dffe0;
  font-weight: 600;
  word-break: break-word;
}
.http-ex__headers span {
  color: #d7f5ec;
  word-break: break-all;
}
.http-ex__note {
  margin: 0;
  padding: 0 12px 12px;
  color: #7d98a5;
  font-size: 0.6875rem;
  line-height: 1.5;
}

/* ── the outbound half (o que vai na chamada) ─────────────────────── */
.http-req {
  padding: 8px 0 4px;
}
.http-req__line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 0 10px 8px;
}
.http-req__line code {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #cfe3ea;
  font-size: 0.6875rem;
  line-height: 1.5;
  word-break: break-all;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.http-req__line .http-ex__copy {
  flex: 0 0 auto;
  margin-left: 0;
}
.http-req__missing {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 10px 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.14);
  color: #ffd79a;
  font-size: 0.6875rem;
  line-height: 1.45;
}
.http-req__missing .material-icons {
  font-size: 0.9375rem;
}
.http-req__group {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.http-req__label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 0;
  color: #7d98a5;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.http-req__label em {
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-style: normal;
  letter-spacing: 0;
}
.http-req__group .http-ex__empty {
  padding: 4px 10px 10px;
}
.http-req__group .http-ex__headers {
  padding: 6px 10px 10px;
}
.http-req__group .json-tree {
  max-height: 200px;
}
.http-req__secret {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9ec5d8;
}
.http-req__secret em {
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #7d98a5;
  font-style: normal;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
}

.json-tree {
  padding: 8px 10px 12px;
  max-height: 280px;
  overflow: auto;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1.55;
}
.http-ex--compact .json-tree {
  max-height: 200px;
}
.json-node {
  min-width: 0;
}
.json-node--string .json-val,
.json-val--string {
  color: #7dffe0;
}
.json-val--number {
  color: #ffd79a;
}
.json-val--boolean {
  color: #9fd0ff;
}
.json-val--null {
  color: #7d98a5;
  font-style: italic;
}
.json-key {
  margin-right: 8px;
  color: #9ec5d8;
}
.json-key::after {
  content: ':';
  color: #4f6b78;
}
.json-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
.json-toggle .material-icons {
  font-size: 1rem;
  color: #7d98a5;
}
.json-meta {
  color: #7d98a5;
  font-size: 0.6875rem;
}
.json-meta em {
  margin-left: 6px;
  font-style: normal;
  color: #9ec5d8;
}
.json-kids {
  margin-left: 14px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.json-more {
  margin: 4px 0 0;
  color: #7d98a5;
  font-size: 0.6875rem;
}
.vars-json {
  display: block;
  max-height: 180px;
  overflow: auto;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}
.vars-json .json-tree {
  padding: 0;
  max-height: none;
}

.property-group {
  margin-bottom: 0.875rem;
}
.assignee-sub {
  margin-top: 8px;
  width: 100%;
}
.property-group:last-child {
  margin-bottom: 0;
}
.property-group label,
.field-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.property-group input,
.property-group select,
.property-group textarea {
  width: 100%;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  min-height: 35px;
  padding: 0 9px;
  color: var(--text-primary);
  background: white;
}
.property-group textarea {
  padding: 9px;
  resize: vertical;
  font: inherit;
}
.hint-card {
  padding: var(--ds-space-4);
  border-radius: 9px;
  background: #eff8fb;
  color: #335a6f;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.hint-card .material-icons {
  color: var(--brand-light);
  margin-right: 5px;
}
.info-line {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: var(--ds-space-3) 0;
  border-bottom: 1px solid var(--surface-muted);
  font-size: 0.8125rem;
}
.info-line .material-icons {
  color: var(--brand-primary);
  flex: none;
  width: 20px;
  height: 20px;
  font-size: 20px;
}
.sim-card {
  margin-top: var(--ds-space-5);
  padding: var(--ds-space-4);
  border: 1px solid var(--tint-brand-border);
  border-radius: 10px;
  background: var(--tint-brand-soft);
}
.sim-card h3 {
  margin: 0 0 var(--ds-space-2);
  font-size: 0.875rem;
  color: var(--brand-dark);
}
.sim-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.45;
}
.sim-progress {
  height: 5px;
  margin: var(--ds-space-3) 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--tint-brand-strong);
}
.sim-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand-primary);
  transition: width 0.35s ease;
}
.sim-progress.p1 > span {
  width: 24%;
}
.sim-progress.p2 > span {
  width: 48%;
}
.sim-progress.p3 > span {
  width: 72%;
}
.sim-progress.p4 > span {
  width: 100%;
}
.page {
  width: 100%;
  max-width: none;
  padding: 1.25rem 1.5rem 5.5rem;
  margin: 0;
}
/* Antes disto o "narrow" não fazia nada - repetia o `max-width: none` do
 * `.page` base, então uma tela com um painel curto (Cofre, Permissões,
 * Regras…) esticava até a largura toda do conteúdo principal e sobrava uma
 * folha de página em branco embaixo. Largura real aqui: o painel some do
 * jeito que devia - do tamanho do que tem dentro, não do tamanho da tela. */
.page.narrow {
  max-width: 720px;
}
.page--inbox {
  max-width: 68rem;
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-4);
  margin: 0 0 1.125rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--line);
}
.page-header h1 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.page-header p {
  margin: 4px 0 0;
  max-width: 62ch;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
/* Título + status à esquerda; botões sempre em `.header-actions` à direita.
 * Chip nunca entra no mesmo grupo que Devolver/Aprovar. */
.page-header-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ds-space-2);
}
.page-header-copy p {
  margin: 0;
}
.page-header > .header-actions {
  flex-shrink: 0;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-5);
}
.summary-card {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  row-gap: 2px;
  align-items: center;
  min-height: 4.75rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 3px 10px rgba(0, 43, 73, 0.03);
}
.summary-card--action {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.summary-card--action:hover,
.summary-card--action.is-active {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}
.summary-card--action.is-active {
  background: color-mix(in srgb, var(--brand) 6%, white);
}
.templates-toggle {
  gap: 0.4rem;
}
.templates-toggle__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, white);
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.panel--templates {
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--brand) 8%, transparent);
}
.flow-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.45rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  text-transform: lowercase;
}
.flow-badge--template {
  background: color-mix(in srgb, var(--brand) 12%, white);
  color: var(--brand-dark);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
}
.task-row.is-muted {
  opacity: 0.62;
}
.task-row h3 .flow-badge {
  position: relative;
  top: -1px;
}
.summary-card .material-icons {
  grid-row: 1 / span 2;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--brand-deep);
  background: var(--tint-brand);
  font-size: 1.125rem;
}
.summary-card strong {
  display: block;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--brand-dark);
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.summary-card span {
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.3;
}
.summary-grid--compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 0.625rem;
  margin-bottom: 1rem;
}
.summary-grid--compact .summary-card {
  width: auto;
  max-width: none;
  min-height: 0;
  min-width: 0;
  padding: 0.55rem 0.8rem;
  column-gap: 0.6rem;
}
.summary-grid--compact .summary-card .material-icons {
  width: 1.85rem;
  height: 1.85rem;
  font-size: 1rem;
}
.summary-grid--compact .summary-card strong {
  font-size: 1.05rem;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-3);
  flex-wrap: wrap;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}
.panel-head:not(:has(+ *)) {
  border-bottom: 0;
}
.panel-head .header-actions {
  margin-left: auto;
}
.panel-head-copy {
  min-width: 0;
}
.panel-head h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 1rem;
}
.panel-kicker {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
}
.panel-head--tools {
  align-items: flex-start;
  row-gap: 0.65rem;
}
.panel-head--tools .inbox-toolbar {
  flex: 1 1 16rem;
  justify-content: flex-end;
}
.filter-row {
  padding: var(--ds-space-3) var(--ds-space-5);
  border-bottom: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  align-items: center;
}
.page > .filter-row {
  padding-left: 0;
  padding-right: 0;
  border-bottom: 0;
  margin-bottom: var(--ds-space-5);
}
.filter-chip {
  color: var(--brand-deep-alt);
  padding: 5px 9px;
  background: var(--tint-brand);
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font: inherit;
  cursor: pointer;
}
button.filter-chip {
  color: var(--text-secondary);
  background: var(--surface-color);
  border: 1px solid var(--line);
}
button.filter-chip.is-on {
  color: var(--brand-deep-alt);
  background: var(--tint-brand);
  border-color: transparent;
}
button.filter-chip em {
  margin-left: 0.3rem;
  font-style: normal;
  font-weight: 700;
  color: inherit;
  opacity: 0.72;
}
.flow-groups {
  display: grid;
  gap: var(--ds-space-5);
}
.flow-group {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 43, 73, 0.03);
}
.flow-group-head {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  width: 100%;
  padding: 0.85rem 1.15rem;
  background: var(--surface-color);
  border: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.flow-group-head:hover {
  background: var(--surface-subtle);
}
.flow-group-head h2 {
  margin: 0;
  flex: 1;
  color: var(--brand-dark);
  font-size: 1rem;
}
.flow-group-count {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
}
.flow-group-chevron {
  color: var(--brand-primary);
  transition: transform 0.16s ease;
}
.flow-group.is-collapsed .flow-group-chevron {
  transform: rotate(-90deg);
}
.flow-group.is-collapsed .flow-group-body {
  display: none;
}
.flow-group-body {
  border-top: 1px solid var(--line);
}
.flow-group-head:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: -2px;
}
.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  column-gap: 1.25rem;
  padding: 0.95rem 1.25rem;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--surface-muted);
  cursor: pointer;
}
.task-row:has(.header-actions),
.task-row:has(.task-actions) {
  grid-template-columns: minmax(0, 1fr) max-content max-content;
}
.task-row:last-child {
  border-bottom: 0;
}
.task-row:hover {
  background: var(--surface-subtle);
}
.task-row__main {
  min-width: 0;
}
.task-row h3 {
  margin: 0 0 3px;
  font-size: 0.875rem;
  color: var(--brand-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-row p,
.task-row time {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.task-row p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-row__meta {
  display: grid;
  grid-template-columns: 10.75rem 9.25rem;
  align-items: center;
  column-gap: 0.75rem;
}
.task-row__meta .mini-status {
  justify-self: start;
  max-width: 100%;
}
.task-row__meta time {
  white-space: nowrap;
}
.task-row .task-actions,
.task-row .header-actions {
  justify-self: end;
  flex-wrap: nowrap;
}
.task-row .app-btn--primary.app-btn--sm {
  min-width: 10.25rem;
}
.inbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.75rem;
  padding: 0;
  border: 0;
}
.inbox-toolbar .filter-row {
  padding: 0;
  margin: 0;
  border: 0;
  gap: 0.4rem;
}
.inbox-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 1 15rem;
  min-width: 11rem;
  padding: 0 0.65rem;
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-secondary);
}
.inbox-search .material-icons {
  font-size: 1.05rem;
}
.inbox-search input,
.panel .inbox-search input {
  flex: 1;
  min-width: 0;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.35rem 0;
  color: var(--text-primary);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.inbox-search input[type='search']::-webkit-search-decoration,
.inbox-search input[type='search']::-webkit-search-cancel-button,
.inbox-search input[type='search']::-webkit-search-results-button,
.inbox-search input[type='search']::-webkit-search-results-decoration {
  appearance: none;
  -webkit-appearance: none;
}
.inbox-row {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.7rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--surface-muted);
  cursor: pointer;
}
a.inbox-row {
  text-decoration: none;
  color: inherit;
}
.inbox-list .inbox-row:last-child {
  border-bottom: 0;
}
.inbox-row:hover {
  background: var(--surface-subtle);
}
.inbox-row__icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--brand-deep);
  background: var(--tint-brand);
}
.inbox-row__icon .material-icons {
  font-size: 1.1rem;
}
.inbox-row__main {
  min-width: 0;
}
.inbox-row h3 {
  margin: 0 0 2px;
  font-size: 0.875rem;
  color: var(--brand-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox-row p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox-row__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.3rem;
}
.inbox-fact {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-sunken);
  color: var(--text-secondary);
  white-space: nowrap;
}
.inbox-fact--source,
.inbox-fact--money {
  background: var(--tint-brand);
  color: var(--brand-deep);
}
.inbox-fact--muted {
  font-weight: 500;
  background: transparent;
  padding-left: 0;
}
.inbox-row__side {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}
.inbox-row__side .mini-status {
  max-width: 11.5rem;
}
.inbox-row__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
}
.inbox-row__actions .app-btn--primary.app-btn--sm {
  min-width: 0;
}
.task-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-3);
}
.mini-status {
  padding: 4px 10px;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-status.warning {
  color: #9a5700;
  background: var(--tint-warning);
}
.mini-status.danger {
  color: #b52525;
  background: var(--tint-error);
}
.mini-status.success {
  color: var(--brand-deep);
  background: var(--tint-brand);
}
/* Fresh islands (islands/CaseDetail.tsx): inline result of the last
 * command run, next to the action buttons - no fixed-corner toast stack
 * hookup from an island yet, so this stays a simple inline banner. */
.inline-status {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  background: var(--tint-brand);
  color: var(--brand-deep);
}
.inline-status--danger {
  background: var(--tint-error);
  color: #b52525;
}
.attention-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--ds-space-3);
  padding: 0.9rem 1.25rem;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--line);
}
.attention-row:last-child {
  border-bottom: 0;
}
.attention-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--tint-warning-alt);
  color: #c57000;
}
.attention-row h3 {
  font-size: 0.875rem;
  margin: 0 0 3px;
  color: var(--brand-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attention-row p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attention-row .task-actions {
  flex-wrap: nowrap;
  justify-self: end;
}
.history {
  position: relative;
  padding-left: 34px;
}
.history::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #c9ddd9;
}
.history-item {
  position: relative;
  padding: 0 0 var(--ds-space-6);
}
.history-dot {
  position: absolute;
  left: -30px;
  top: 2px;
  width: 12px;
  height: 12px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 0 1px var(--brand-primary);
}
.history-item h3 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--brand-dark);
}
.history-item p,
.history-item time {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.45;
}
.modal-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--ds-space-5);
  background: rgba(0, 30, 48, 0.48);
}
.modal {
  width: min(540px, 100%);
  /* Item de grade nasce com `min-width: auto`, então o min-content do
   * conteúdo (a fileira de botões que não quebra) esticava a caixa para
   * além do `width` declarado - num telefone o botão principal ficava
   * fora da tela, inalcançável. */
  min-width: 0;
  max-width: 100%;
  max-height: min(88vh, 920px);
  padding: var(--ds-space-6);
  border-radius: 15px;
  background: white;
  box-shadow: 0 24px 70px rgba(0, 20, 40, 0.3);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}
.modal--wide {
  width: min(820px, 100%);
}
.modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 calc(var(--ds-space-6) * -1);
  padding: 0 var(--ds-space-6);
}
.modal h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 1.25rem;
  flex: 0 0 auto;
}
.modal p {
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 0 0 auto;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  /* Quebra em vez de empurrar a caixa: três botões não cabem lado a lado
   * em 375px. */
  flex-wrap: wrap;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-5);
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
}
.modal-summary {
  padding: var(--ds-space-4);
  border-left: 3px solid var(--brand-primary);
  background: #f1fbfa;
  font-size: 0.875rem;
  line-height: 1.55;
}
#toast-stack {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: var(--ds-space-2);
}
.toast {
  min-width: 260px;
  padding: 12px 14px;
  border-radius: 9px;
  color: white;
  background: var(--brand-dark);
  box-shadow: var(--shadow);
  font-size: 0.8125rem;
  animation: toastIn 0.2s ease both;
}
@keyframes nodeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes dash {
  to {
    stroke-dashoffset: -14;
  }
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
@media (max-width: 1100px) {
  .builder,
  .builder.has-details {
    grid-template-columns: 245px minmax(0, 1fr);
  }
  .builder.has-details .details-pane,
  .builder.has-arch.has-details .details-pane {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 92vw);
    z-index: 8;
    box-shadow: -12px 0 28px rgba(15, 23, 42, 0.12);
  }
}
/* --- Menu da sidebar como gaveta, abaixo de 1024px --- igual ao
 * #app-nav-toggle/.app-nav-backdrop reais (checkbox puro, sem JS): o rail de
 * ícones antigo (.rail, .rail-nav, .rail-bottom) que morava aqui era da
 * chrome de antes da Parte V - ficou travando a barra lateral aberta em
 * qualquer largura de tela, porque nenhuma dessas classes existe mais no
 * HTML. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.app-header-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -0.375rem;
  margin-right: var(--ds-space-2);
  padding: 8px;
  border-radius: 7px;
  color: inherit;
  cursor: pointer;
}
.app-header-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
@media (min-width: 1024px) {
  .app-header-menu-btn {
    display: none;
  }
}
.app-nav-backdrop {
  display: none;
  position: fixed;
  inset: var(--app-header-bar) 0 0 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
@media (max-width: 1023px) {
  #app-nav-toggle:checked ~ .app-below-header .app-nav-backdrop {
    display: block;
  }
  .app-sidebar {
    position: fixed;
    top: var(--app-header-bar);
    left: 0;
    z-index: 50;
    width: min(16.5rem, 100vw - 1.5rem);
    height: calc(100dvh - var(--app-header-bar));
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.2s ease-out;
  }
  #app-nav-toggle:checked ~ .app-below-header .app-sidebar {
    transform: translateX(0);
  }
}

@media (max-width: 1100px) {
  .task-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0.5rem;
  }
  .task-row__meta {
    grid-column: 1 / -1;
    grid-template-columns: 10.75rem 9.25rem;
  }
  .inbox-row {
    grid-template-columns: 2.1rem minmax(0, 1fr);
    row-gap: 0.4rem;
  }
  .inbox-row__side {
    grid-column: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .list-row__meta {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .status-pill {
    display: none;
  }
  /* The builder's own small-screen layout lives at the end of this file
   * (search "IDE em tela pequena"). It used to be here, stacking the
   * assistant pane above the canvas, but `.canvas-column, .assistant-pane,
   * .details-pane { min-height: 0 }` further down the file quietly beat
   * every min-height set here (same specificity, later wins), so the pane
   * collapsed to 178px with a zero-height palette and the rules read as
   * if they worked. Keeping the layout after that rule is what makes it
   * actually apply. */
  .page {
    padding: var(--ds-space-5) var(--ds-space-5) 5.5rem;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .task-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0.55rem;
    column-gap: 0.75rem;
    align-items: start;
  }
  .task-row__meta {
    grid-column: 1 / -1;
    grid-template-columns: auto 1fr;
  }
  .task-row .task-actions,
  .task-row .header-actions {
    padding-top: 0;
  }
  .task-row .app-btn--primary.app-btn--sm {
    min-width: 0;
  }
  .inbox-row {
    grid-template-columns: 2.1rem minmax(0, 1fr);
    row-gap: 0.4rem;
  }
  .inbox-row__side {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
  .summary-grid--compact .summary-card {
    flex: 1 1 9.5rem;
  }
  .panel-head--tools .inbox-toolbar {
    flex-basis: 100%;
    justify-content: flex-start;
  }
  .list-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .list-row:has(.attention-icon),
  .attention-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .list-row__meta,
  .attention-row .task-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .page-header {
    flex-wrap: wrap;
  }
  .page-header-copy,
  .page-header > div:first-child {
    flex: 1 1 100%;
  }
  .page-header > .header-actions {
    flex: 1 1 100%;
    justify-content: flex-end;
  }
}

/* --- Conexões clicáveis, rótulo do caminho e cursor de deslocamento --- */
.edge-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
  cursor: pointer;
  pointer-events: stroke;
}

.edge-hit:hover + .edge-label,
.edge-hit:hover {
  stroke: rgba(239, 68, 68, 0.18);
}

.edge-label {
  fill: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--canvas);
  stroke-width: 4px;
  pointer-events: none;
}

#canvas-wrap,
.canvas-wrap {
  cursor: grab;
}

.canvas-wrap.is-select-mode {
  cursor: default;
}

.canvas-wrap.is-marquee {
  cursor: crosshair;
}

.canvas-wrap.space-pan {
  cursor: grab;
}

#canvas-wrap.panning,
.canvas-wrap.is-panning {
  cursor: grabbing;
}

/* Alças aparecem no bloco em foco, para o canvas ficar calmo em repouso. */
.node-handle {
  opacity: 0;
  transition: opacity 0.12s ease;
}

.node:hover .node-handle,
.node.selected .node-handle,
.node-handle:focus-visible {
  opacity: 1;
}

.sim-hint {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* --- Altura do app: a janela manda, a página nunca rola --- */
html,
body {
  height: 100%;
}

.app-shell {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.main {
  min-height: 0;
  overflow: hidden;
}

/* Em vez de calcular a altura com vh, deixar o flex resolver:
   assim o construtor acompanha a janela em qualquer contexto. */
.view {
  min-height: 0;
}

.builder {
  height: auto;
  flex: 1;
  min-height: 0;
}

.canvas-column,
.assistant-pane,
.details-pane {
  min-height: 0;
}

/* Telas de lista rolam por dentro, não empurram a página. */
.view.page {
  overflow-y: auto;
}

.picker {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
  overflow: hidden;
}
.picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-2);
}
.picker-head h2 {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--brand-dark);
}
.picker-grid {
  overflow-y: auto;
  display: grid;
  gap: var(--ds-space-2);
  padding-right: 2px;
  flex: 1;
  min-height: 0;
  align-content: start;
}
.picker-card {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: var(--ds-space-3);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-color);
  color: var(--text-primary);
}
.picker-card:hover,
.picker-card:focus-visible {
  border-color: var(--brand-primary);
  background: var(--mint-bg);
  outline: none;
}
.picker-org {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--brand-primary);
}
.picker-card strong {
  font-size: 0.8125rem;
  color: var(--brand-dark);
}
.picker-card small {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.add-wrap {
  position: relative;
}
.add-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  width: 240px;
  padding: var(--ds-space-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-color);
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
}
.add-menu button {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: var(--ds-space-2) var(--ds-space-3);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.8125rem;
  text-align: left;
}
.add-menu button:hover,
.add-menu button:focus-visible {
  background: var(--mint-bg);
  outline: none;
}

.empty-canvas {
  position: absolute;
  inset: 18% 12%;
  display: grid;
  place-content: center;
  gap: var(--ds-space-2);
  text-align: center;
  color: var(--text-secondary);
  pointer-events: none;
}
.empty-canvas strong {
  color: var(--brand-dark);
}

.node.connect-source {
  box-shadow: 0 0 0 3px rgba(0, 182, 214, 0.28);
}
.canvas.connecting .node-handle--in {
  opacity: 1;
}

.empty-state {
  padding: var(--ds-space-7);
  text-align: center;
  color: var(--text-secondary);
}
.empty-state strong {
  display: block;
  margin-bottom: var(--ds-space-2);
  color: var(--brand-dark);
}

.attention-row.is-done,
.task-row.is-done {
  opacity: 0.45;
}

.row-title-link {
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
button.row-title-link {
  display: inline;
  background: none;
  border: 0;
  padding: 0;
  text-align: inherit;
}
.row-title-link:hover {
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header-actions:empty {
  display: none;
}
.action-stack {
  display: grid;
  gap: var(--ds-space-4);
}
.action-stack .property-group {
  margin-bottom: 0;
}
.action-field {
  display: grid;
  gap: var(--ds-space-2);
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--ds-space-3);
  padding: var(--ds-space-4);
}
.page > .tile-grid {
  padding: 0;
}
.tile {
  display: grid;
  justify-items: start;
  gap: 6px;
  text-align: left;
  padding: var(--ds-space-5);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: inherit;
  font: inherit;
  box-shadow: 0 3px 10px rgba(0, 43, 73, 0.03);
}
.tile:hover {
  border-color: var(--brand-primary);
}
.tile .material-icons {
  color: var(--brand-primary);
}
.tile strong {
  color: var(--brand-dark);
}
.tile span {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ds-space-5);
  margin-bottom: var(--ds-space-5);
}
/* O composer da Início é o primeiro caminho (agêntico) - por isso o único
 * bloco colorido da tela, antes de qualquer card ou atalho manual. */
.home-composer {
  background: linear-gradient(135deg, var(--brand-dark), #013f68);
  border-radius: 14px;
  padding: 1.15rem 1.25rem 1.2rem;
  color: white;
  margin-bottom: var(--ds-space-5);
}
.home-composer-head {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  margin-bottom: var(--ds-space-4);
}
.home-composer-head .material-icons {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  flex: none;
}
.home-composer-head h2 {
  margin: 0;
  font-size: 1.0625rem;
}
.home-composer-head p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8125rem;
}
.home-composer-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.home-composer-row input {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 10px;
  padding: 0 var(--ds-space-4);
  min-height: 42px;
  font-size: 0.875rem;
  color: var(--text-primary);
  font-family: inherit;
}
.home-composer-row .app-btn {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.875rem;
  gap: 8px;
  flex: none;
}
.home-composer .header-actions {
  padding-top: 10px;
}
.home-composer-row input:focus-visible {
  outline: 3px solid rgba(0, 191, 154, 0.5);
  outline-offset: 1px;
}
.home-composer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  margin-top: var(--ds-space-3);
}
.home-composer-chips button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: white;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.home-composer-chips button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
}
.home-composer-chips button:disabled {
  opacity: 0.55;
  cursor: default;
}

/* ---------- Nexo - copiloto flutuante ----------
 * Mesmo componente que já existe em toda a suíte (islands/AiContextButton.tsx
 * real, .nexo-float-btn no styles.css real) - aqui simplificado (sem os
 * skills contextuais por tela), mas com a mesma aparência e posição, porque
 * é o mesmo assistente, disponível em qualquer tela do Flow, não uma versão
 * separada. Esse botão - não o composer da Início - é o primeiro caminho de
 * verdade: funciona de qualquer lugar, o resto do produto é o caminho manual
 * de reserva. */
.nexo-float-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 60;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(0, 191, 154, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nexo-float-btn:hover {
  transform: scale(1.08) translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 191, 154, 0.5), 0 2px 6px rgba(0, 0, 0, 0.12);
}
.nexo-float-btn--active {
  background: var(--brand-dark);
}
.nexo-float-btn .material-icons {
  font-size: 1.375rem;
}
.nexo-panel {
  position: fixed;
  bottom: 5.25rem;
  right: 1.5rem;
  z-index: 60;
  width: min(23rem, calc(100vw - 2rem));
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  animation: nexo-slide-up 0.16s ease;
}
@keyframes nexo-slide-up {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nexo-panel {
    animation: none;
  }
}
.nexo-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ds-space-4) var(--ds-space-4) var(--ds-space-3);
  border-bottom: 1px solid var(--line);
}
.nexo-panel-head-title {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
}
.nexo-panel-head-title .material-icons {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: white;
  background: var(--brand-dark);
  display: grid;
  place-items: center;
  font-size: 1.125rem;
}
.nexo-panel-head-title strong {
  display: block;
  color: var(--brand-dark);
  font-size: 0.875rem;
}
.nexo-panel-head-title span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.6875rem;
}
.nexo-panel-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 7px;
  padding: 5px;
  display: flex;
}
.nexo-panel-close:hover {
  background: var(--surface-color);
}
.nexo-panel-body {
  padding: var(--ds-space-4);
}
.nexo-panel-body > p {
  margin: 0 0 var(--ds-space-3);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.nexo-panel-body .chat-input {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}
.nexo-panel-links {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2);
  margin-top: var(--ds-space-3);
  padding-top: var(--ds-space-3);
  border-top: 1px solid var(--line);
}
.nexo-panel-links button {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.8125rem;
  text-align: left;
}
.nexo-panel-links button:hover {
  background: var(--tint-brand-soft);
}
.nexo-panel-links .material-icons {
  color: var(--brand-primary);
  font-size: 18px;
}
@media (max-width: 480px) {
  .nexo-panel {
    right: 1rem;
    bottom: 4.75rem;
  }
  .nexo-float-btn {
    right: 1rem;
    bottom: 1rem;
  }
  .home-composer-row {
    flex-direction: column;
  }
  .home-composer-row .app-btn {
    width: 100%;
  }
}
.panel + .panel {
  margin-top: var(--ds-space-4);
}
.panel-body {
  display: flex;
  flex-direction: column;
  padding: 16px 20px 18px;
}
.panel-body > p,
.panel-body > .muted {
  margin: 0 0 10px;
}
.panel-body > .property-group:last-child,
.panel-body > p:last-child,
.panel-body > .muted:last-child {
  margin-bottom: 0;
}
.panel-body > .app-btn {
  align-self: flex-start;
  margin-top: 2px;
}
.panel-body > .task-actions {
  padding: 4px 0 0;
}
.panel-body > .info-line:first-child {
  padding-top: 0;
}
.panel-body > .info-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.panel-body > .list-row,
.panel-body > .filter-row,
.panel-body > .tile-grid,
.panel-body > .table-wrap,
.panel-body > .data-table,
.panel-body > .bar-list,
.panel-body > .spark {
  margin-left: -20px;
  margin-right: -20px;
}
.panel-body > .list-row:first-child,
.panel-body > .filter-row:first-child,
.panel-body > .tile-grid:first-child,
.panel-body > .table-wrap:first-child,
.panel-body > .bar-list:first-child,
.panel-body > .spark:first-child {
  margin-top: -16px;
}
.panel-body > .list-row:last-child,
.panel-body > .tile-grid:last-child,
.panel-body > .table-wrap:last-child,
.panel-body > .bar-list:last-child {
  margin-bottom: -18px;
}
.panel-pad-btn {
  margin: var(--ds-space-3) var(--ds-space-5);
}
.muted {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th,
.data-table td {
  padding: var(--ds-space-3) var(--ds-space-4);
  text-align: left;
  border-bottom: 1px solid var(--surface-muted);
  vertical-align: middle;
}
.data-table th {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
}
.data-table tr.is-click {
  cursor: pointer;
}
.data-table tr.is-click:hover,
.list-row:hover {
  background: var(--surface-subtle);
}
.data-table tr.is-highlighted {
  background: #fff7e6;
}
.data-table code,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-sunken);
}
.table-wrap {
  overflow: auto;
}
.page-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--surface-muted);
}
.page-bar p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}
.page-bar .header-actions {
  margin: 0;
}
.page-bar .app-btn .material-icons {
  font-size: 18px;
}
.page-bar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.page-bar__size {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.page-bar__size select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 8px;
  background: white;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--text-primary);
}
.list-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 16rem;
  min-width: 10rem;
  max-width: 24rem;
  height: 36px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 8px;
  background: white;
}
.list-search .material-icons {
  font-size: 18px;
  color: var(--text-secondary);
}
.list-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  color: var(--text-primary);
}
.list-search input:focus {
  outline: none;
}
.list-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid var(--surface-muted);
}
@media (max-width: 640px) {
  .page-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .page-bar__actions {
    justify-content: space-between;
  }
  .page-bar__actions .header-actions {
    flex: 1 1 auto;
    justify-content: space-between;
  }
  .list-search {
    max-width: none;
  }
  .list-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}
.list-row {
  display: grid;
  /* 8rem floor: in narrow columns (Calendário lateral, painéis divididos)
     the two `auto` edges could otherwise starve the middle to ~0 and hide
     the row's title entirely. */
  grid-template-columns: auto minmax(8rem, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  padding: 0.85rem 1.25rem;
  min-height: 4.25rem;
  border-bottom: 1px solid var(--surface-muted);
}
.list-row:last-child {
  border-bottom: 0;
}
/* When the middle floor leaves no room, the meta wraps instead of pushing
   the title out - chips/buttons stack and the row grows a line. */
.list-row__meta {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 6px;
}
.list-row h3 {
  margin: 0 0 3px;
  font-size: 0.875rem;
  color: var(--brand-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-row p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-row > div:not(.list-row__meta) {
  min-width: 0;
}
.list-row:not(:has(.attention-icon)) {
  grid-template-columns: minmax(0, 1fr) auto;
}
.list-row__meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.list-row__stat {
  width: 8.5rem;
  text-align: right;
  color: var(--text-secondary);
  font-size: 0.75rem;
  white-space: nowrap;
}
.list-row__meta .source-pill {
  width: 5.75rem;
  justify-content: center;
  text-align: center;
}
.list-row__meta .mini-status {
  width: 7.25rem;
}
.list-row__meta .app-btn {
  min-width: 7.25rem;
}
.bar-list {
  display: grid;
  gap: 10px;
  padding: var(--ds-space-5);
}
.bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 48px;
  gap: 10px;
  align-items: center;
  font-size: 0.8125rem;
}
.bar-row i {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: #e8eef0;
}
.bar-row b {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--brand-primary);
}
.bar-row em {
  font-style: normal;
  color: var(--text-secondary);
  text-align: right;
}
.spark {
  width: 100%;
  height: 72px;
  color: var(--brand-primary);
  padding: var(--ds-space-4) var(--ds-space-5) 0;
}
.toggle {
  width: 40px;
  height: 22px;
  border: 0;
  border-radius: 99px;
  background: #c5d4d8;
  position: relative;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: 0.18s ease;
}
.toggle.is-on {
  background: var(--brand-primary);
}
.toggle.is-on::after {
  left: 21px;
}
.form-studio {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--ds-space-5);
  margin-bottom: var(--ds-space-5);
}
.form-palette {
  display: grid;
  align-content: start;
  gap: var(--ds-space-2);
}
.form-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--brand-dark);
  font-size: 0.8125rem;
}
.form-canvas {
  background: white;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: var(--ds-space-6);
  display: grid;
  gap: var(--ds-space-4);
}
.form-canvas h3 {
  margin: 0;
  color: var(--brand-dark);
}
.form-canvas label,
.field-label {
  display: grid;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-canvas input:not([type='file']),
.form-canvas select,
.panel input:not([type='checkbox']):not([type='search']):not([type='radio']):not([type='hidden']):not([type='file']) {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.viewer-bar {
  margin-bottom: var(--ds-space-4);
}
.live-form .property-group {
  margin-bottom: 12px;
}
/* .portal-card / .portal-steps do protótipo saíram: nenhuma tela usava, e o
 * "text-align: center" delas vazava para a tela real do portal, centrando
 * rótulo de campo. O portal vivo está em ".portal-*" mais abaixo. */
.search-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--ds-space-5);
  padding: 0 var(--ds-space-4);
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.search-hero input {
  flex: 1;
  border: 0;
  outline: none;
  min-height: 48px;
}
.ctx-menu {
  position: fixed;
  z-index: 80;
  min-width: 220px;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.ctx-menu button {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-dark);
  font-size: 0.8125rem;
  text-align: left;
}
.ctx-menu button:hover,
.palette-item.active,
.palette-item:hover {
  background: #f0f7f8;
}
.ctx-menu button.is-danger {
  color: var(--error);
}
.ctx-sep {
  margin: 6px 8px;
  border: 0;
  border-top: 1px solid var(--line);
}
.palette-backdrop {
  position: fixed;
  z-index: 75;
  inset: 0;
  background: rgba(0, 43, 73, 0.28);
  display: grid;
  align-content: start;
  justify-content: center;
  padding-top: 12vh;
}
.palette {
  width: min(560px, calc(100vw - 32px));
  background: white;
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.palette-search {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-3) var(--ds-space-4);
  border-bottom: 1px solid var(--line);
  color: var(--text-secondary);
}
.palette-search input {
  flex: 1;
  border: 0;
  outline: none;
  min-height: 36px;
}
.palette-list {
  max-height: 360px;
  overflow: auto;
  padding: 6px;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}
.palette-item small,
.palette-hint,
.palette-empty {
  display: block;
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.palette-hint {
  margin: 0;
  padding: 8px 16px 14px;
}
.modal .tile-grid {
  padding: var(--ds-space-3) 0 var(--ds-space-4);
  grid-template-columns: repeat(3, 1fr);
}
.modal-scroll .field-label {
  display: block;
  margin-top: var(--ds-space-3);
}
.modal kbd,
.panel kbd {
  font: 600 0.75rem Inter, sans-serif;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
}
.list-row.is-selected {
  background: var(--tint-brand-soft);
  box-shadow: inset 3px 0 0 var(--brand-primary);
}
.pack-switch {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  margin-bottom: var(--ds-space-4);
}
.pack-switch button {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-color);
  color: var(--text-secondary);
  font-weight: 600;
}
.pack-switch button.is-on {
  color: var(--brand-dark);
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand-primary);
}
.source-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand-dark);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: var(--ds-space-1) var(--ds-space-2);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .split-grid,
  .form-studio {
    grid-template-columns: 1fr;
  }
  .search-chip span,
  .search-chip kbd {
    display: none;
  }
}

/* --- Canvas vazio: fora da transformação, com ação clara --- */
.empty-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-3);
  padding: var(--ds-space-6);
  text-align: center;
  pointer-events: none;
}

.empty-canvas > * {
  pointer-events: auto;
}

.empty-canvas__icon .material-icons {
  font-size: 40px;
  color: var(--tint-brand-border);
}

.empty-canvas strong {
  font-size: 1.05rem;
  color: var(--text-primary);
}

.empty-canvas__lead {
  max-width: 42ch;
  color: var(--text-secondary);
}

.ctx-menu button small {
  margin-left: auto;
  padding-left: 12px;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
}
.org-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.org-option {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  text-align: left;
}
.org-option span {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.org-option small {
  color: var(--text-secondary);
  font-weight: 400;
}
.org-option:hover {
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
}
.org-option.is-current {
  border-color: var(--brand-primary);
  background: var(--tint-brand);
}
.org-option .material-icons:first-child {
  color: var(--brand-primary);
}
.org-option .material-icons:last-child {
  color: var(--success);
}

@media (max-width: 720px) {
  .org-chip-text {
    display: none;
  }
}

/* --- Rastro (inspetor de instância): mesmo desenho do Fluxo, só leitura,
   com status por nó - a resposta visual pra "onde travou". --- */
.trace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--ds-space-4);
  align-items: start;
  padding: var(--ds-space-5);
}
.trace-canvas-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--canvas);
  background-image: radial-gradient(#cfdbdf 1px, transparent 1px);
  background-size: 18px 18px;
  overflow: auto;
  max-height: 70vh;
}
.trace-canvas {
  position: relative;
  transform: scale(0.62);
  transform-origin: top left;
}
.trace-svg {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}
.trace-edge {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 2;
}
.trace-edge--walked {
  stroke: var(--brand-primary);
  stroke-width: 2.5;
}
.trace-node {
  position: absolute;
  width: 168px;
  min-height: 93px;
  padding: var(--ds-space-3);
  border: 1px solid var(--line-strong-alt);
  border-radius: 11px;
  background: white;
  box-shadow: 0 3px 10px rgba(0, 43, 73, 0.07);
}
.trace-node-icon {
  display: inline-flex;
  color: var(--text-secondary);
}
.trace-node-badge {
  float: right;
  display: inline-flex;
}
.trace-node h3 {
  font-size: 0.8125rem;
  margin: 8px 0 2px;
  color: var(--brand-dark);
}
.trace-node p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
}
.trace-node--done {
  border-color: var(--tint-brand-border);
  background: var(--tint-brand-soft);
}
.trace-node--done .trace-node-badge {
  color: var(--success);
}
.trace-node--pending {
  opacity: 0.55;
  border-style: dashed;
}
.trace-node--pending .trace-node-badge {
  color: var(--neutral);
}
.trace-node--current {
  border-color: var(--warning);
  border-width: 2px;
  box-shadow: 0 0 0 4px var(--tint-warning);
  animation: trace-pulse 1.8s ease-in-out infinite;
}
.trace-node--current .trace-node-badge {
  color: var(--warning);
}
@media (prefers-reduced-motion: reduce) {
  .trace-node--current {
    animation: none;
  }
}
@keyframes trace-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px var(--tint-warning);
  }
  50% {
    box-shadow: 0 0 0 8px var(--tint-warning);
  }
}
.trace-side {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
}
.trace-current h3 {
  margin: 0 0 4px;
  padding: 0 20px;
  color: var(--brand-dark);
  font-size: 0.9375rem;
}
.trace-current p {
  margin: 0 0 8px;
  padding: 0 20px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

/* ---------- Slice 3 a 4: canvas, Início, calendário ---------- */
.canvas-title-input {
  display: block;
  min-width: 140px;
  width: min(420px, 100%);
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-dark);
  padding: 0;
  min-height: 28px;
}
.canvas-title-input:focus-visible {
  outline: none;
  box-shadow: 0 1px 0 var(--brand-primary);
}
/* The publish code is a Fluxo-level setting, not a node one - it lives here,
 * always reachable, instead of inside the per-node inspector (which can now
 * be collapsed or empty with nothing selected). */
.draft-state--code {
  flex-wrap: wrap;
}
.code-inline-input {
  min-width: 90px;
  max-width: 220px;
  border: 0;
  border-bottom: 1px dashed var(--line-strong-alt);
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0 2px;
}
.code-inline-input:focus-visible {
  outline: none;
  border-bottom-style: solid;
  border-bottom-color: var(--brand-primary);
}
.draft-state--code .link-with-icon {
  margin-top: 0;
}
.add-menu--inline {
  position: static;
  width: auto;
  box-shadow: none;
  border: 0;
  padding: 0;
  background: transparent;
}
.edge-label {
  font-size: 11px;
  fill: var(--text-secondary);
  text-anchor: middle;
}
a.task-row {
  text-decoration: none;
  color: inherit;
}
button.tile {
  font: inherit;
  cursor: pointer;
}
.home-composer-match {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 12px;
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0, 43, 73, 0.14);
  animation: composer-match-in 0.18s ease-out;
}
@keyframes composer-match-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.home-composer-match > p:first-child:not(:only-child) {
  font-size: 0.9375rem;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.home-composer-match strong {
  color: var(--brand-dark);
}
.home-composer-match a {
  color: var(--brand-deep);
  font-weight: 600;
}
.home-composer-match p {
  margin: 0;
}
.home-composer-match:has(.property-group) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
}
.home-composer-match > :not(.property-group),
.home-composer-match > .property-group:has(textarea, .form-file, .form-field-choices) {
  grid-column: 1 / -1;
}
.home-composer-match .property-group {
  margin-bottom: 12px;
}
.home-composer-match .property-group input,
.home-composer-match .property-group select,
.home-composer-match .property-group textarea {
  border-radius: 9px;
  font-size: 0.875rem;
}
@media (max-width: 720px) {
  .home-composer-match:has(.property-group) {
    grid-template-columns: minmax(0, 1fr);
  }
}
.home-composer-match .header-actions {
  justify-content: flex-end;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.home-composer-note {
  margin: 8px 0 0 !important;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.home-composer-valor {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.home-composer-valor input {
  max-width: 180px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 8px;
  min-height: 36px;
  padding: 0 12px;
  color: var(--text-primary);
  font: inherit;
}
/* Medida curta (calendário, portal público) centrada: encostada à
 * esquerda ela deixava meia tela de vazio à direita e lia como layout
 * quebrado, não como escolha. */
.page--narrow {
  max-width: 880px;
  margin-inline: auto;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 12px 16px 16px;
}
.cal-dow {
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 0;
}
.cal-cell {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px;
  text-align: left;
  color: inherit;
  font: inherit;
}
.cal-cell.is-empty {
  border: 0;
  background: transparent;
  min-height: 0;
}
.cal-cell.is-weekend {
  background: var(--surface-color);
}
.cal-cell.is-today {
  box-shadow: inset 0 0 0 2px var(--brand-primary);
}
.cal-cell.is-holiday {
  background: #fff4e8;
  border-color: #f0c48a;
}
.cal-cell:hover:not(.is-empty) {
  border-color: var(--brand-primary);
}
.cal-num {
  font-weight: 700;
  color: var(--brand-dark);
  font-size: 0.875rem;
}
.cal-name {
  font-size: 0.6875rem;
  color: #9a5b12;
  line-height: 1.3;
}
.cal-form {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px 20px 20px;
}
.cal-form label {
  display: grid;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.cal-form input {
  min-height: 38px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  color: var(--text-primary);
}
@media (max-width: 720px) {
  .cal-form {
    grid-template-columns: 1fr;
  }
  .cal-cell {
    min-height: 56px;
    padding: 6px;
  }
}

/* ── Acabamento: auditoria visual das telas do kernel ─────────────────
 * Passada de acabamento nas telas novas (Portal, Evidência, Versões,
 * Entradas, Histórico do caso). Nada aqui muda comportamento - só corrige
 * o que estava sem tratamento: <select> cru do browser, botão-link com
 * sublinhado, bolinha da timeline fora do trilho, chip sem tom e JSON
 * solto no branco.
 */

/* Um <a> com cara de botão não pode herdar o sublinhado do link. */
.app-btn {
  text-decoration: none;
}
/* Ghost sem borda nenhuma lia como texto flutuante ("Mais ações",
 * "Abrir no canvas"), então ganha a borda fraca - a diferença com o
 * secondary continua sendo o fundo transparente. */
.app-btn--ghost {
  border-color: var(--line);
}
.app-btn--ghost:hover {
  border-color: var(--line-strong);
}
.app-btn--ghost-danger,
.app-btn--icon.app-btn--ghost {
  border-color: transparent;
}

/* Campos: um único tratamento para input/select/textarea, com seta
 * própria no select - o nativo do Chrome não aceita raio nem altura. */
.form-grid input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']),
.form-grid select,
.form-grid textarea,
.cal-form input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']),
.cal-form select,
.cal-form textarea {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line-strong-alt);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  color: var(--text-primary);
  background: white;
}
.form-grid select,
.cal-form select,
.property-group select,
.main select:not([multiple]):not([size]),
.vagas-page select:not([multiple]):not([size]) {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 16px 16px;
  text-overflow: ellipsis;
}
.form-grid textarea,
.cal-form textarea {
  padding: 9px 10px;
  resize: vertical;
}
.form-grid input:not([type='checkbox']):not([type='radio']):not([type='file']):focus-visible,
.form-grid select:focus-visible,
.form-grid textarea:focus-visible,
.cal-form input:not([type='checkbox']):not([type='radio']):not([type='file']):focus-visible,
.cal-form select:focus-visible,
.cal-form textarea:focus-visible,
.property-group input:focus-visible,
.property-group select:focus-visible,
.property-group textarea:focus-visible {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.16);
}

/* Formulário de uma linha: campos à esquerda; o botão na última linha,
 * encostado à direita - o mesmo canto que `.header-actions`. */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 15rem);
  justify-content: start;
  gap: var(--ds-space-4) var(--ds-space-3);
  align-items: end;
  padding: var(--ds-space-4) 1.25rem 1.25rem;
}
.form-grid > label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
}
.form-grid > button,
.form-grid > .header-actions {
  grid-column: 1 / -1;
  justify-self: end;
}
.people-dir {
  display: flex;
  flex-direction: column;
}
.people-card {
  border-bottom: 1px solid var(--surface-muted);
}
.people-card:last-child {
  border-bottom: 0;
}
.people-card.is-open {
  background: var(--surface-subtle);
}
.people-card__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  width: 100%;
  min-height: 4.25rem;
  padding: 0.9rem 1.25rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.people-card__row:hover {
  background: rgba(0, 43, 73, 0.03);
}
.people-card.is-open > .people-card__row:hover {
  background: transparent;
}
.people-card__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-light));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.people-card__id h3 {
  margin: 0 0 3px;
  font-size: 0.875rem;
  color: var(--brand-dark);
}
.people-card__id p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.people-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 28rem;
}
.people-card__meta .mini-status {
  width: auto;
  max-width: 16rem;
}
.people-card__chev {
  color: var(--neutral);
  transition: transform 0.18s ease;
}
.people-card.is-open .people-card__chev {
  transform: rotate(180deg);
}
.band-chip--admin {
  background: var(--brand-dark);
  color: #fff;
}
.band-chip--supervisor {
  background: #e8f0f8;
  color: var(--brand-dark);
}
.band-chip--worker {
  background: var(--tint-brand);
  color: var(--brand-deep);
}
.people-card__editor {
  display: grid;
  gap: 1.1rem;
  padding: 0 1.25rem 1.25rem 4.85rem;
}
.people-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: 0.85rem 0.75rem;
}
.people-fields > label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
}
.people-fields input,
.people-fields select {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line-strong-alt);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  color: var(--text-primary);
  background: white;
}
.people-fields select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 16px 16px;
}
.people-fields input:focus-visible,
.people-fields select:focus-visible {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.16);
}
.perm-block {
  display: grid;
  gap: 0.65rem;
}
.perm-block header {
  display: grid;
  gap: 4px;
}
.perm-block h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 0.8125rem;
  font-weight: 700;
}
.perm-block p {
  margin: 0;
  max-width: 62ch;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.45;
}
.access-profiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 0.6rem;
}
.access-profile {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.65rem;
  row-gap: 2px;
  align-items: start;
  min-height: 4.5rem;
  padding: 0.75rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.access-profile .material-icons {
  grid-row: 1 / span 2;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--brand-deep);
  background: var(--tint-brand);
  font-size: 1.05rem;
}
.access-profile b {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--brand-dark);
}
.access-profile small {
  grid-column: 2;
  color: var(--text-secondary);
  font-size: 0.7rem;
  line-height: 1.35;
}
.access-profile:hover {
  border-color: var(--line-strong);
}
.access-profile.is-on {
  border-color: var(--brand-primary);
  background: var(--mint-bg);
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.14);
}
.perm-matrix {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  background: #fff;
}
.perm-matrix__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.perm-matrix__head em {
  color: var(--brand-deep);
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
}
.perm-group {
  margin-bottom: 0.75rem;
}
.perm-group:last-child {
  margin-bottom: 0;
}
.perm-group__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0 0.25rem;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 700;
}
.perm-group__title .material-icons {
  color: var(--brand-deep);
  font-size: 1.05rem;
}
.perm-group__all {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}
.perm-group__all:hover {
  color: var(--brand-deep);
}
.perm-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}
.perm-row:hover {
  background: var(--surface-subtle);
}
.perm-row.is-locked {
  cursor: default;
  opacity: 0.72;
}
.perm-row input {
  margin-top: 0.2rem;
  accent-color: var(--brand-primary);
}
.perm-row span {
  display: grid;
  gap: 1px;
}
.perm-row b {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}
.perm-row small {
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.35;
}
.people-card--create .people-card__editor {
  padding-left: 1.25rem;
}
@media (max-width: 720px) {
  .people-card__row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .people-card__meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: none;
  }
  .people-card__editor {
    padding-left: 1.25rem;
  }
}
.cal-form > button {
  justify-self: end;
}
@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Timeline do histórico: a bolinha tem de ficar centrada no trilho.
 * 28px de recuo, trilho em 5px + 2px de largura (centro 6px) e a
 * bolinha de 12px encostada em 0 (centro 6px) - mesma linha. O último
 * item perde o padding para o trilho não sobrar embaixo. */
.history {
  padding-left: 28px;
}
.history::before {
  left: 5px;
  top: 8px;
  bottom: 8px;
}
.history-dot {
  left: -28px;
  top: 3px;
}
.history-item:last-child {
  padding-bottom: 0;
}
/* Evento mais recente em destaque; os anteriores viram trilho passado. */
.history-item:not(:first-child) .history-dot {
  background: #fff;
  box-shadow: 0 0 0 1px #c9ddd9;
}

/* Chip sem tom (ex.: "aposentada" em Versões) precisa parecer chip. */
.mini-status.muted {
  color: var(--text-secondary);
  background: var(--surface-sunken);
}

/* JSON dos campos: bloco de código, não texto solto no branco. */
.code-block {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-sunken);
  color: var(--brand-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1.55;
  overflow: auto;
  max-height: 22rem;
}

/* Painel "Campos" - adapta a leitura ao que chegou: formulário, payload de
 * webhook ou e-mail. .field-grid encaixota valores curtos em colunas;
 * valores longos e blocos JSON quebram a largura toda. */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  background: var(--surface-color);
  border-bottom: 1px solid var(--surface-muted);
}
.field-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.8rem 1.25rem;
  border-top: 1px solid var(--surface-muted);
  border-right: 1px solid var(--surface-muted);
  min-width: 0;
}
.field-grid .field-cell:has(.field-value--block) {
  grid-column: 1 / -1;
}
.field-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.field-value {
  font-size: 0.875rem;
  color: var(--brand-dark);
  word-break: break-word;
}
.field-value--empty {
  color: var(--text-secondary);
}
.field-value--block {
  white-space: pre-wrap;
  line-height: 1.5;
}
.field-email {
  display: flex;
  flex-direction: column;
}
.field-email .field-cell {
  border-right: 0;
}
.field-email .field-cell + .field-cell {
  border-top: 1px solid var(--surface-muted);
}
.field-payload {
  display: flex;
  flex-direction: column;
}
.field-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0.9rem 1.25rem 1.1rem;
  border-top: 1px solid var(--surface-muted);
}
.field-block:first-child {
  border-top: 0;
}

/* Link dentro de linha de lista (caso #12) segue a marca, sem o azul
 * sublinhado do browser. */
.list-row p a,
.list-row h3 a {
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration: none;
}
.list-row p a:hover,
.list-row h3 a:hover {
  text-decoration: underline;
}
.inline-status a {
  color: var(--brand-deep);
  font-weight: 600;
  word-break: break-all;
}

/* Menu lateral rola quando a janela é curta - sem barra visível ele
 * cortava o último item no meio, parecendo tela quebrada. */
.app-sidebar-nav {
  padding-bottom: var(--ds-space-2);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.app-sidebar-nav::-webkit-scrollbar {
  width: 6px;
}
.app-sidebar-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}
.app-sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

/* Menu lateral e cards navegáveis são controles, não links de texto - o
 * sublinhado do browser deixava a tela toda com cara de documento. */
.app-nav-link,
a.tile {
  text-decoration: none;
}

/* Ícone de linha de catálogo (Pessoas, Versões, Conectores, Chaves,
 * Entradas, Evidência…) herdava o âmbar de ".attention-icon", que quer
 * dizer "precisa de você agora". Na mesma tela o summary-card já usava a
 * marca, então a linha ficava com dois tons para a mesma hierarquia.
 * Dentro de .list-row o chip é neutro; em .attention-row o âmbar fica. */
.list-row > .attention-icon {
  background: var(--tint-brand);
  color: var(--brand-deep);
}

/* ── Portal público (islands/PortalPick.tsx) ──────────────────────────
 * Página de quem está fora: sem menu, sem conta. Antes era um textarea de
 * JSON solto no canto; agora é uma coluna centrada com marca, o contexto
 * do caso e os campos que já chegaram, com rótulo.
 */
.portal-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--page-bg);
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--ds-space-5);
  height: 3.25rem;
  background: var(--brand-dark);
  color: #fff;
}
.portal-brand-mark {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: var(--brand-primary);
  color: var(--brand-dark);
  font-weight: 700;
}
.portal-brand strong {
  display: block;
  font-size: 0.875rem;
  line-height: 1.2;
}
.portal-brand small {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.6875rem;
}
.portal-body {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--ds-space-7) var(--ds-space-5);
}
.portal-card {
  width: min(34rem, 100%);
  box-shadow: 0 6px 24px rgba(0, 43, 73, 0.06);
}
.portal-card h1 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
/* Valor e prazo lado a lado: o de fora precisa saber do que se trata antes
 * de digitar. */
.portal-facts {
  display: flex;
  gap: var(--ds-space-7);
  margin: 0;
  padding: var(--ds-space-4) 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}
.portal-facts dt {
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.portal-facts dd {
  margin: 3px 0 0;
  color: var(--brand-dark);
  font-size: 0.9375rem;
  font-weight: 600;
}
.portal-form {
  padding: var(--ds-space-5) 1.25rem 1.25rem;
}
.portal-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-5);
}
.portal-form-foot small {
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.portal-done {
  padding: var(--ds-space-8) var(--ds-space-6);
  text-align: center;
}
.portal-done .material-icons {
  font-size: 2.5rem;
  color: var(--brand-primary);
}
.portal-done h1 {
  margin: var(--ds-space-3) 0 var(--ds-space-2);
}
.portal-done p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.portal-done--error .material-icons {
  color: var(--error);
}

/* Org no topo: só o nome. Sem kicker "Cooperativa". */
.org-chip-text {
  justify-content: center;
}
.org-chip .org-chip-label {
  font-size: 0.875rem;
}

.portal-brand strong {
  font-size: 0.9375rem;
  font-weight: 600;
}

.portal-form-foot {
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .page-header p {
    max-width: none;
  }
  .portal-body {
    padding: var(--ds-space-5) var(--ds-space-4);
  }
  .portal-form-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .portal-form-foot .app-btn {
    width: 100%;
  }
  .cal-form {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-grid > button,
  .cal-form > button {
    width: 100%;
    justify-self: stretch;
  }
}

/* Login - same surface as UniConecta CoE (Microsoft + e-mail/senha). */
.app-header-auth-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid rgb(255 255 255 / 0.25);
  background: rgb(255 255 255 / 0.08);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.app-header-auth-btn:hover {
  background: rgb(255 255 255 / 0.16);
  border-color: rgb(255 255 255 / 0.35);
}
.app-header-auth-btn:disabled,
.app-header-auth-btn.is-loading {
  cursor: default;
  opacity: 0.85;
}
.app-header-auth-btn--accent {
  border-color: rgb(96 165 250 / 0.6);
  background: rgb(37 99 235 / 0.35);
}
.app-header-auth-btn--accent:hover {
  background: rgb(37 99 235 / 0.5);
}
.app-header-auth-ms-icon {
  flex-shrink: 0;
  display: inline-block;
}

.login-page {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgb(37 99 235 / 0.18), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgb(14 165 233 / 0.14), transparent 55%),
    linear-gradient(160deg, rgb(15 23 42) 0%, rgb(0 43 73) 100%);
  color: #fff;
}
.login-page-card {
  width: 100%;
  max-width: 26rem;
  padding: 2.25rem 2rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(255 255 255 / 0.12);
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.login-page-brand {
  display: flex;
  justify-content: center;
}
.login-page-logo {
  display: block;
  height: 2.25rem;
  width: auto;
  margin: 0 auto 1.25rem;
}
.login-page-logo--flow {
  height: 2.5rem;
  width: 2.5rem;
  filter: none;
}
.login-page-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
}
.login-page-hint {
  margin: 0 0 1.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
  color: rgb(203 213 225);
}
.login-page-hint--aside {
  margin: 0;
  text-align: left;
}
.login-page-actions {
  display: flex;
  justify-content: center;
  min-height: 2.5rem;
}
.login-page-footer {
  margin: 1.5rem 0 0;
  font-size: 0.75rem;
  text-align: center;
  color: rgb(148 163 184);
}
.login-page-error {
  margin: 0;
  font-size: 0.875rem;
  color: rgb(252 165 165);
  text-align: center;
}
.app-header-auth--standalone {
  flex-direction: column;
  width: 100%;
  max-width: none;
}
.app-header-auth--standalone .app-header-auth-btn {
  width: 100%;
  justify-content: center;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
}
.app-header-auth--standalone .app-header-auth-btn--accent {
  border-color: rgb(96 165 250 / 0.7);
  background: linear-gradient(180deg, rgb(59 130 246 / 0.55) 0%, rgb(37 99 235 / 0.55) 100%);
  box-shadow: 0 6px 20px rgb(37 99 235 / 0.35);
}
.app-header-auth--standalone .app-header-auth-btn--accent:hover {
  background: linear-gradient(180deg, rgb(59 130 246 / 0.75) 0%, rgb(37 99 235 / 0.75) 100%);
}
.login-page-actions--stack {
  flex-direction: column;
  width: 100%;
  align-items: stretch;
  gap: 0.75rem;
}
.login-demo {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}
.login-demo-label {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgb(148 163 184);
  text-align: center;
}
.login-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.login-demo-seat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(255 255 255 / 0.06);
  color: #fff;
  cursor: pointer;
  text-align: left;
}
.login-demo-seat:hover:not(:disabled) {
  background: rgb(255 255 255 / 0.12);
}
.login-demo-seat:disabled {
  opacity: 0.6;
  cursor: wait;
}
.login-demo-seat strong {
  font-size: 0.8125rem;
  font-weight: 600;
}
.login-demo-seat span {
  font-size: 0.6875rem;
  color: rgb(203 213 225);
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  color: rgb(148 163 184);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgb(255 255 255 / 0.15);
}
.login-email-toggle {
  width: 100%;
  justify-content: center;
  border-color: rgb(255 255 255 / 0.2);
  background: rgb(255 255 255 / 0.06);
  color: rgb(226 232 240);
}
.login-email-toggle:hover {
  background: rgb(255 255 255 / 0.1);
}
.login-email-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
.login-email-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}
.login-email-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(203 213 225);
}
.login-email-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(15 23 42 / 0.55);
  color: #fff;
  font-size: 0.875rem;
}
.login-email-input:focus {
  outline: 2px solid rgb(96 165 250 / 0.65);
  outline-offset: 1px;
}
.login-email-submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}
.login-email-back {
  background: none;
  border: none;
  color: rgb(148 163 184);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.25rem;
  text-decoration: underline;
}

.view-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.35rem;
  color: var(--brand-deep);
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.view-eyebrow .material-icons {
  font-size: 0.95rem;
  letter-spacing: normal;
  text-transform: none;
}
.view-title {
  letter-spacing: -0.035em;
}
.view-subtitle {
  max-width: 48rem;
  line-height: 1.55;
}
/* Light variant once the person already has open cases: the composer
 * stops being the hero, so every white-on-navy color flips to ink. */
.home-composer--secondary {
  margin-top: 1.25rem;
  color: var(--text-primary);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(0, 191, 154, 0.08), transparent 55%),
    white;
  box-shadow: 0 1px 2px rgba(0, 43, 73, 0.05);
}
.home-composer--secondary .home-composer-head .material-icons {
  background: var(--tint-brand);
  color: var(--brand-deep);
}
.home-composer--secondary .home-composer-head h2 {
  color: var(--brand-dark);
}
.home-composer--secondary .home-composer-head p {
  color: var(--text-secondary);
}
.home-composer--secondary .home-composer-row input {
  border: 1px solid var(--line-strong-alt);
  background: var(--surface-subtle);
}
.home-composer--secondary .home-composer-row input:focus-visible {
  outline: none;
  border-color: var(--brand-primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.16);
}
.home-composer--secondary .home-composer-chips button {
  background: var(--tint-brand-soft);
  border-color: var(--tint-brand-border);
  color: var(--brand-deepest);
}
.home-composer--secondary .home-composer-chips button:hover:not(:disabled) {
  background: var(--tint-brand);
  border-color: var(--brand-primary);
}
.home-composer--secondary .home-composer-match {
  box-shadow: none;
  background: var(--surface-subtle);
}
.status-pill--off {
  opacity: 0.65;
}

.flow-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.flow-dashboard--embed {
  margin-bottom: 0.5rem;
}

.agent-kpi-grid {
  display: grid;
  /* 210px floor: cost values like "R$ 0,0003" wrap mid-number below this */
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}
.stat-tile {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-height: 6.35rem;
  padding: 1rem 1.05rem;
  overflow: hidden;
  border: 1px solid #dfeaec;
  border-radius: 0.85rem;
  background: var(--surface-color);
  box-shadow: 0 0.15rem 0.55rem rgb(15 55 75 / 0.04);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.stat-tile::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.2rem;
  background: #8ba7ad;
}
.stat-tile--success::before {
  background: var(--brand-primary);
}
.stat-tile--warning::before {
  background: var(--warning);
}
.stat-tile--danger::before {
  background: #e75a63;
}
.stat-tile--info::before {
  background: var(--brand-light);
}
.stat-tile:hover {
  transform: translateY(-2px);
  border-color: #b9d8d6;
  box-shadow: 0 0.75rem 1.7rem rgb(15 55 75 / 0.1);
}
.stat-tile__icon {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  color: var(--brand-dark);
}
.stat-tile__icon .material-icons {
  font-size: 1.35rem;
}
.stat-tile--danger .stat-tile__icon {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #b91c1c;
}
.stat-tile--success .stat-tile__icon {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #047857;
}
.stat-tile--info .stat-tile__icon {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
}
.stat-tile--warning .stat-tile__icon {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #b45309;
}
.stat-tile__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.stat-tile--interactive .stat-tile__body {
  padding-right: 1.15rem;
}
.stat-tile__label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.stat-tile__value {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-dark);
  line-height: 1.1;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
.stat-tile--danger .stat-tile__value {
  font-size: 1.55rem;
  color: var(--error);
  overflow-wrap: normal;
  word-break: normal;
}
.stat-tile--success .stat-tile__value {
  color: #047857;
}
.stat-tile__hint {
  margin-top: 0.15rem;
  font-size: 0.68rem;
  color: var(--text-secondary);
}
.stat-tile--interactive {
  width: 100%;
  min-width: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.stat-tile--interactive:hover,
.stat-tile--interactive:focus-visible,
.stat-tile--interactive.is-selected {
  border-color: rgba(0, 191, 154, 0.55);
}
.stat-tile--interactive.is-selected {
  background: linear-gradient(145deg, #ffffff, #f0fdfa);
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.18), 0 0.75rem 1.7rem rgb(15 55 75 / 0.1);
}
.stat-tile__drill-icon {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  font-size: 0.95rem;
  color: #94a3b8;
  opacity: 0;
}
.stat-tile--interactive:hover .stat-tile__drill-icon,
.stat-tile--interactive.is-selected .stat-tile__drill-icon {
  opacity: 1;
  color: #009f83;
}

.dashboard-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.75fr);
  align-items: center;
  gap: 2rem;
  min-height: 16rem;
  padding: clamp(1.4rem, 3vw, 2.3rem);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 75% 10%, rgb(0 191 154 / 0.22), transparent 30%),
    linear-gradient(125deg, #032b48 0%, #073b55 54%, #075464 100%);
  box-shadow: 0 24px 60px rgb(0 43 73 / 0.2);
}
.dashboard-hero--danger {
  background:
    radial-gradient(circle at 75% 10%, rgb(231 90 99 / 0.28), transparent 30%),
    linear-gradient(125deg, #3b1018 0%, #5a1a24 54%, #073b55 100%);
}
.dashboard-hero--warning {
  background:
    radial-gradient(circle at 75% 10%, rgb(245 158 11 / 0.24), transparent 30%),
    linear-gradient(125deg, #3a2a0c 0%, #073b55 100%);
}
.dashboard-hero--success {
  background:
    radial-gradient(circle at 75% 10%, rgb(0 191 154 / 0.3), transparent 28%),
    linear-gradient(125deg, #032b48 0%, #075c51 100%);
}
.dashboard-hero__glow {
  position: absolute;
  z-index: -1;
  width: 22rem;
  height: 22rem;
  right: -6rem;
  bottom: -14rem;
  border-radius: 50%;
  background: radial-gradient(circle, #00bf9a, transparent 70%);
  filter: blur(8px);
  opacity: 0.28;
}
.dashboard-hero__content {
  max-width: 46rem;
}
.dashboard-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.75rem 0.38rem 0.55rem;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 999px;
  color: #a7f3e7;
  background: rgb(255 255 255 / 0.08);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dashboard-hero__eyebrow .material-icons {
  letter-spacing: normal;
  text-transform: none;
  font-size: 1rem;
}
.dashboard-hero h2 {
  max-width: 42rem;
  margin: 1rem 0 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}
.dashboard-hero__content > p {
  max-width: 38rem;
  margin: 0.75rem 0 0;
  color: rgb(226 242 247 / 0.75);
  font-size: 0.9rem;
}
.dashboard-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}
.dashboard-hero__button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  color: #003b42;
  background: #7ff4df;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 750;
}
.dashboard-hero__sync {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgb(226 242 247 / 0.64);
  font-size: 0.7rem;
}
.dashboard-hero__sync i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #56e6bd;
}
.dashboard-hero__pulse {
  position: relative;
  min-height: 12rem;
  display: grid;
  place-items: center;
}
.dashboard-hero__ring {
  width: 10.5rem;
  height: 10.5rem;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  box-shadow: 0 0 0 14px rgb(255 255 255 / 0.035), inset 0 1px 18px rgb(255 255 255 / 0.08);
}
.dashboard-hero__ring span {
  font-size: 3.1rem;
  font-weight: 800;
  letter-spacing: -0.07em;
}
.dashboard-hero__ring small {
  margin-top: 0.4rem;
  color: #a7f3e7;
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dashboard-hero__mini {
  position: absolute;
  display: grid;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 14px;
  background: rgb(3 43 72 / 0.66);
}
.dashboard-hero__mini--top {
  top: 0;
  right: 0;
}
.dashboard-hero__mini--bottom {
  left: 0;
  bottom: 0;
}
.dashboard-hero__mini b {
  font-size: 0.9rem;
}
.dashboard-hero__mini small {
  color: rgb(226 242 247 / 0.58);
  font-size: 0.6rem;
}
.dashboard-live-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.dashboard-trend {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
}
.dashboard-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}
.dashboard-section-head > div > span,
.dashboard-panel__eyebrow {
  display: block;
  color: #00a889;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.dashboard-section-head h3,
.dashboard-panel__head h3 {
  margin: 0.18rem 0 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.dashboard-section-head__note {
  color: #94a3b8;
  font-size: 0.68rem;
}
.dashboard-quality-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  overflow: hidden;
  border: 1px solid #e7edf3;
  border-radius: 16px;
  background: #fff;
}
.dashboard-quality-strip .stat-tile {
  min-height: 6.4rem;
  border: 0;
  border-right: 1px solid #edf2f7;
  border-radius: 0;
  box-shadow: none;
}
.dashboard-grid,
.dashboard-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.dashboard-panel {
  min-width: 0;
  padding: 1.15rem 1.2rem;
  border: 1px solid #dfeaec;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 26px rgb(15 51 72 / 0.05);
}
.dashboard-panel__head {
  margin-bottom: 0.85rem;
}
.dashboard-panel__head p {
  margin: 0.2rem 0 0;
  color: #8493a8;
  font-size: 0.7rem;
}
.dash-weeks {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 0.35rem;
  min-height: 9rem;
}
.dash-week__cols {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 7.5rem;
}
.dash-week__cols i,
.dash-week__cols b {
  display: block;
  flex: 1;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
}
.dash-week__cols i {
  background: #00b6d6;
}
.dash-week__cols b {
  background: #00bf9a;
}
.dash-week small {
  display: block;
  margin-top: 0.3rem;
  color: #94a3b8;
  font-size: 0.58rem;
  text-align: center;
}
.dash-legend {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  color: #64748b;
  font-size: 0.72rem;
}
.dash-swatch {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  margin-right: 0.35rem;
  border-radius: 2px;
  vertical-align: -1px;
}
.dash-swatch--start {
  background: #00b6d6;
}
.dash-swatch--done {
  background: #00bf9a;
}
.dash-mix {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.dash-donut {
  width: 7.5rem;
  height: 7.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  mask: radial-gradient(circle, transparent 48%, #000 50%);
}
.dash-mix-list,
.dash-ranks,
.dash-aging,
.dash-items,
.dash-activity {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dash-mix-list li,
.dash-items li a,
.dash-activity li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #edf2f2;
  color: inherit;
  text-decoration: none;
}
.dash-ranks li {
  position: relative;
  padding: 0.55rem 0 0.75rem;
}
.dash-ranks i,
.dash-aging i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, #00b6d6, #00bf9a);
}
.dash-ranks strong,
.dash-items strong,
.dash-activity strong {
  display: block;
}
.dash-ranks span,
.dash-items span,
.dash-activity span {
  color: #8493a8;
  font-size: 0.75rem;
}
.dash-aging li {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0 0.85rem;
}
.dash-team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}
.dash-team article {
  padding: 0.85rem;
  border: 1px solid #e7edf3;
  border-radius: 12px;
  background: #f8fffd;
}
.dash-team b {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.4rem;
}
.dash-team small {
  color: #8493a8;
}
.dash-empty {
  color: #8493a8;
}
.dash-items a.is-late strong {
  color: var(--error);
}
.dashboard-agent-note {
  margin: 0;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--brand-primary);
  border-radius: 10px;
  background: var(--mint-bg);
  color: var(--mint-fg);
  font-size: 0.85rem;
}
.dashboard-sheet {
  padding: 1rem 1.15rem;
  border: 1px solid #dfeaec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgb(15 55 75 / 0.08);
}
.dashboard-sheet header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 960px) {
  .dashboard-hero,
  .dashboard-grid,
  .dashboard-split,
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-hero__pulse {
    min-height: 10rem;
  }
}

.notif-menu-trigger {
  position: relative;
}
.notif-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: #d97706;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
  border: 2px solid rgb(15 23 42);
}
.notif-badge--danger {
  background: #dc2626;
}
.notif-menu-panel {
  width: 22rem;
  max-width: calc(100vw - 2rem);
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.5rem;
}
.notif-empty {
  margin: 0.25rem 0.65rem 0.5rem;
  font-size: 0.8125rem;
  color: rgb(148 163 184);
}
.notif-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0.65rem;
  border-radius: 10px;
  margin-bottom: 0.35rem;
}
.notif-item:last-child {
  margin-bottom: 0;
}
.notif-item--warning {
  background: rgb(217 119 6 / 0.14);
}
.notif-item--danger {
  background: rgb(220 38 38 / 0.16);
}
.notif-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 18px !important;
  flex-shrink: 0;
}
.notif-item--warning .notif-item-icon {
  color: #f59e0b;
}
.notif-item--danger .notif-item-icon {
  color: #f87171;
}
.notif-item-copy {
  min-width: 0;
}
.notif-item-copy strong {
  display: block;
  font-size: 0.8125rem;
  color: #fff;
}
.notif-item-copy p {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: rgb(203 213 225);
}
.notif-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.join-fix-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.join-card {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.join-card:last-child {
  border-bottom: 0;
}
.join-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}
.join-card__head h3 {
  margin: 0;
  font-size: 0.95rem;
}
.join-card__head p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}
.join-leg {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}
.join-leg p {
  margin: 0.1rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}
.join-card__force {
  display: flex;
  gap: 0.4rem;
  padding-top: 0.65rem;
}
@media (max-width: 720px) {
  .join-fix-bar,
  .join-leg {
    grid-template-columns: 1fr;
    display: grid;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   Depurador do canvas
   Executar um Fluxo tem que ser uma coisa que se VÊ: o passo aceso, a
   ligação que a execução escolheu, o ponto de parada que segurou. As
   cores de cada caminho em paralelo existem para que dois ramos
   não virem uma coisa só.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --run-h0: #00bf9a;
  --run-h1: #7c5cff;
  --run-h2: #f5a524;
  --run-h3: #2f9bff;
  --run-h4: #ff5c9d;
  --run-h5: #7dd33f;
  --run-break: #ef4444;
  --run-wait: #f59e0b;
  --dock-bg: #0d1b26;
  --dock-line: #1e3341;
  --dock-fg: #cfe3ea;
  --dock-muted: #7d98a5;
}

.canvas-column {
  grid-template-rows: auto auto auto 1fr auto auto;
}
.canvas-wrap {
  grid-row: 4;
}
.dock {
  grid-row: 5;
}
.canvas-footer {
  grid-row: 6;
}

/* ── barra de controle flutuante ──────────────────────────────────── */
.canvas-overlay {
  position: absolute;
  z-index: 8;
  /* Centrado esticando de ponta a ponta, não com `left:50%`: ali a
   * largura disponível vira metade do canvas, e num telefone a barra do
   * depurador quebrava em três linhas por falta de espaço que existia. */
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ds-space-2);
  padding: 0 10px;
  pointer-events: none;
}
.canvas-overlay--top {
  top: 12px;
}
.assistant-pane.is-locked .step-palette,
.assistant-pane.is-locked .chat-input {
  opacity: 0.72;
}
.assistant-pane.is-locked {
  pointer-events: auto;
}
.canvas-footer .draft-state kbd {
  font-size: 0.6875rem;
}
.link-with-icon:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.detail-run-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.debug-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(9, 26, 37, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cfe3ea;
  font-size: 0.6875rem;
  font-weight: 600;
}
.debug-lock .material-icons {
  font-size: 0.9375rem;
  color: var(--run-h2);
}
.debug-lock kbd {
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.625rem;
}
.canvas-wrap.is-locked .node-handle {
  display: none;
}
.canvas-wrap.is-locked .node {
  cursor: pointer;
}
.details-lock {
  margin: 0 1.1rem 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--tint-warning);
  color: var(--warning-fg);
  font-size: 0.75rem;
  line-height: 1.4;
}
.details-body.is-locked > *:not(.detail-run-row) {
  opacity: 0.55;
  pointer-events: none;
}
.palette__item.is-off {
  opacity: 0.45;
  cursor: not-allowed;
}
.palette__item.is-off:hover,
.palette__item.is-off.is-active {
  background: transparent;
}
.ctx-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.canvas-title-input:disabled,
.code-inline-input:disabled,
.chat-input__prompt:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.canvas-overlay > * {
  pointer-events: auto;
}
.debug-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 12px;
  border-radius: 999px;
  background: rgba(9, 26, 37, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 34px rgba(0, 25, 40, 0.34);
  backdrop-filter: blur(9px);
  color: #e6f2f6;
  font-size: 0.75rem;
  animation: barIn 0.28s cubic-bezier(0.2, 0.9, 0.25, 1) both;
  max-width: min(96%, 900px);
}
@keyframes barIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
}
.debug-bar__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.debug-bar__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--run-h0);
  box-shadow: 0 0 0 0 rgba(0, 191, 154, 0.6);
}
.debug-bar--running .debug-bar__pulse {
  animation: livePulse 1.15s ease-out infinite;
}
.debug-bar--paused .debug-bar__pulse {
  background: var(--run-wait);
}
.debug-bar--done .debug-bar__pulse {
  background: #62d0a8;
}
.debug-bar--stopped .debug-bar__pulse {
  background: var(--neutral);
}
@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 191, 154, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(0, 191, 154, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 191, 154, 0);
  }
}
.debug-bar__where {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #a9c6d1;
}
.debug-bar__sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 2px;
}
.debug-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #e6f2f6;
  transition: background 0.15s ease, transform 0.15s ease;
}
.debug-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}
.debug-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.debug-btn .material-icons {
  font-size: 1.05rem;
}
.debug-btn--go {
  background: var(--run-h0);
  color: #04231d;
}
.debug-btn--go:hover:not(:disabled) {
  background: #23d6b3;
}
.debug-btn--stop:hover {
  background: rgba(239, 68, 68, 0.85);
}
.debug-btn.is-on {
  background: rgba(0, 191, 154, 0.28);
  color: #7ff0d6;
  box-shadow: inset 0 0 0 1px rgba(0, 191, 154, 0.5);
}
.debug-bar__speed {
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e6f2f6;
  font-size: 0.6875rem;
  padding: 0 4px;
}
.debug-bar__speed option {
  color: var(--text-primary);
}
.debug-bar__meta {
  color: #93b2bf;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.debug-bar__legs {
  display: flex;
  gap: 4px;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}
.leg-chip {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  white-space: nowrap;
  color: #04231d;
  background: var(--run-h0);
}
.leg-chip--h1 {
  background: var(--run-h1);
  color: #fff;
}
.leg-chip--h2 {
  background: var(--run-h2);
}
.leg-chip--h3 {
  background: var(--run-h3);
  color: #fff;
}
.leg-chip--h4 {
  background: var(--run-h4);
  color: #fff;
}
.leg-chip--h5 {
  background: var(--run-h5);
}
.leg-chip--more {
  background: rgba(255, 255, 255, 0.16);
  color: #e6f2f6;
}

/* ── faixa do caso real ───────────────────────────────────────────── */
.live-bar {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  padding: 5px 6px 5px 12px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--tint-brand-border);
  box-shadow: 0 10px 26px rgba(0, 43, 73, 0.14);
  font-size: 0.75rem;
  color: var(--brand-dark);
}
.live-bar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--error);
  animation: livePulse 1.4s ease-out infinite;
}
.live-bar__where {
  color: var(--text-secondary);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── estados de execução nos nós ──────────────────────────────────── */
.node {
  transition:
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease,
    opacity 0.3s ease,
    filter 0.3s ease;
}
.node-bp {
  position: absolute;
  left: -9px;
  top: 12px;
  z-index: 3;
  width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: white;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.node:hover .node-bp,
.node-bp:focus-visible {
  opacity: 0.55;
}
.node-bp:hover {
  opacity: 1;
  transform: scale(1.15);
  border-color: var(--run-break);
}
.node-bp.is-set {
  opacity: 1;
  background: var(--run-break);
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}
.node-bp.is-set.is-cond {
  background: #fff;
  border-color: var(--run-break);
  border-width: 4px;
}
.node-bp.is-set.is-off {
  background: #fff;
  border-color: #f4b4b4;
  box-shadow: none;
}
.node-flag {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success-fg);
}
.node-flag .material-icons {
  font-size: 0.75rem;
}
.node-flag--live {
  background: var(--brand-primary);
  color: #04231d;
}
.node.sim-visited {
  border-color: #a9e3d3;
  background: linear-gradient(180deg, #fbfffe, #f4fdfa);
}
.node.sim-here {
  z-index: 4;
  transform: translateY(-2px) scale(1.02);
  border-color: var(--run-h0);
  box-shadow:
    0 0 0 2px var(--run-h0),
    0 0 0 8px rgba(0, 191, 154, 0.16),
    0 14px 32px rgba(0, 43, 73, 0.18);
  animation: hereIn 0.32s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
@keyframes hereIn {
  from {
    transform: translateY(2px) scale(0.97);
  }
}
.node.sim-here.sim-h1 {
  border-color: var(--run-h1);
  box-shadow:
    0 0 0 2px var(--run-h1),
    0 0 0 8px rgba(124, 92, 255, 0.16),
    0 14px 32px rgba(0, 43, 73, 0.18);
}
.node.sim-here.sim-h2 {
  border-color: var(--run-h2);
  box-shadow:
    0 0 0 2px var(--run-h2),
    0 0 0 8px rgba(245, 165, 36, 0.18),
    0 14px 32px rgba(0, 43, 73, 0.18);
}
.node.sim-here.sim-h3 {
  border-color: var(--run-h3);
  box-shadow:
    0 0 0 2px var(--run-h3),
    0 0 0 8px rgba(47, 155, 255, 0.16),
    0 14px 32px rgba(0, 43, 73, 0.18);
}
.node.sim-here.sim-h4 {
  border-color: var(--run-h4);
  box-shadow:
    0 0 0 2px var(--run-h4),
    0 0 0 8px rgba(255, 92, 157, 0.16),
    0 14px 32px rgba(0, 43, 73, 0.18);
}
.node.sim-here.sim-h5 {
  border-color: var(--run-h5);
  box-shadow:
    0 0 0 2px var(--run-h5),
    0 0 0 8px rgba(125, 211, 63, 0.18),
    0 14px 32px rgba(0, 43, 73, 0.18);
}
.node.sim-waiting {
  border-color: var(--run-wait);
  box-shadow:
    0 0 0 2px var(--run-wait),
    0 0 0 8px rgba(245, 158, 11, 0.16),
    0 14px 32px rgba(0, 43, 73, 0.18);
}
.node.sim-waiting .node-flag--live {
  background: var(--run-wait);
  color: #452a02;
}
.node.sim-break {
  border-color: var(--run-break);
  box-shadow:
    0 0 0 2px var(--run-break),
    0 0 0 10px rgba(239, 68, 68, 0.16),
    0 14px 32px rgba(0, 43, 73, 0.2);
  animation: breakPulse 1.1s ease-in-out infinite;
}
@keyframes breakPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 2px var(--run-break),
      0 0 0 8px rgba(239, 68, 68, 0.14),
      0 14px 32px rgba(0, 43, 73, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 2px var(--run-break),
      0 0 0 15px rgba(239, 68, 68, 0),
      0 14px 32px rgba(0, 43, 73, 0.2);
  }
}
.node.sim-cold {
  opacity: 0.42;
  filter: saturate(0.25);
}
/* varredura fina que corre pelo nó ativo - "isto está acontecendo agora" */
.node-scan {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.node-scan::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 255, 255, 0.72),
    transparent
  );
  animation: scanSweep 1.6s linear infinite;
}
@keyframes scanSweep {
  from {
    transform: translateX(-140%);
  }
  to {
    transform: translateX(340%);
  }
}

/* ── ligações ─────────────────────────────────────────────────────── */
.edge {
  transition: stroke 0.25s ease, stroke-width 0.25s ease, opacity 0.3s ease;
}
.edge--hot {
  stroke: var(--brand-primary);
  stroke-width: 2.6;
}
.edge--live {
  stroke: var(--brand-primary);
  stroke-width: 3.4;
  stroke-dasharray: 9 7;
  animation: dash 0.55s linear infinite;
  filter: drop-shadow(0 0 5px rgba(0, 191, 154, 0.5));
}
.edge--cold {
  opacity: 0.3;
  stroke-dasharray: 4 6;
}
.edge-label.is-hot {
  fill: var(--brand-deep);
  font-weight: 700;
}
.flow-token__dot {
  fill: var(--run-h0);
}
.flow-token__halo {
  fill: var(--run-h0);
  opacity: 0.22;
  animation: haloBeat 0.7s ease-in-out infinite;
}
@keyframes haloBeat {
  50% {
    opacity: 0.06;
  }
}
.flow-token--h1 .flow-token__dot,
.flow-token--h1 .flow-token__halo {
  fill: var(--run-h1);
}
.flow-token--h2 .flow-token__dot,
.flow-token--h2 .flow-token__halo {
  fill: var(--run-h2);
}
.flow-token--h3 .flow-token__dot,
.flow-token--h3 .flow-token__halo {
  fill: var(--run-h3);
}
.flow-token--h4 .flow-token__dot,
.flow-token--h4 .flow-token__halo {
  fill: var(--run-h4);
}
.flow-token--h5 .flow-token__dot,
.flow-token--h5 .flow-token__halo {
  fill: var(--run-h5);
}

/* ── pergunta ancorada no nó parado ───────────────────────────────── */
.ask-anchor {
  position: absolute;
  z-index: 9;
  width: 278px;
}
.ask-anchor:has(.ask-card--http) {
  width: 420px;
}
.ask-card {
  border-radius: 13px;
  background: white;
  border: 1px solid var(--line-strong-alt);
  box-shadow: 0 18px 44px rgba(0, 30, 50, 0.2);
  padding: var(--ds-space-4);
  animation: askIn 0.26s cubic-bezier(0.2, 0.9, 0.25, 1) both;
  display: flex;
  flex-direction: column;
  max-height: min(62vh, 420px);
  overflow-y: auto;
}
.ask-card--http {
  width: 420px;
}
@keyframes askIn {
  from {
    opacity: 0;
    transform: translateX(-10px) scale(0.97);
  }
}
.ask-card::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 34px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: white;
  border-left: 1px solid var(--line-strong-alt);
  border-bottom: 1px solid var(--line-strong-alt);
}
.ask-card__instruction {
  margin: 0 0 var(--ds-space-3);
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.45;
}
.property-group .assignee-sub {
  margin-top: 8px;
}
.ask-card__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--ds-space-3);
}
.ask-card__head strong {
  color: var(--brand-dark);
  font-size: 0.875rem;
  line-height: 1.3;
}
.ask-card__kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 2px 8px 2px 5px;
  border-radius: 999px;
  background: var(--tint-warning);
  color: var(--warning-fg);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ask-card__kind .material-icons {
  font-size: 0.875rem;
}
.ask-card__kind--system {
  background: #e7f2ff;
  color: #1b4f8a;
}
.ask-card__kind--subflow {
  background: #f1ecff;
  color: #4b32a8;
}
.ask-card__call {
  display: block;
  padding: 6px 8px;
  margin-bottom: var(--ds-space-3);
  border-radius: 7px;
  background: var(--surface-sunken);
  color: var(--brand-deepest);
  font-size: 0.6875rem;
  word-break: break-all;
}
.ask-card__fields {
  display: grid;
  gap: 6px;
  margin-bottom: var(--ds-space-3);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.ask-card__fields label {
  display: grid;
  gap: 3px;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}
.ask-card__fields input {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
}
.ask-card__choices {
  display: grid;
  gap: 6px;
  flex: 0 0 auto;
}
.ask-choice {
  display: grid;
  gap: 1px;
  text-align: left;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong-alt);
  background: white;
  color: var(--brand-dark);
  font-size: 0.75rem;
  font-weight: 600;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.ask-choice:hover {
  transform: translateX(2px);
}
.ask-choice em {
  font-style: normal;
  font-weight: 400;
  font-size: 0.625rem;
  line-height: 1.35;
  white-space: normal;
  color: var(--text-secondary);
}
.ask-choice--ok:hover {
  border-color: var(--brand-primary);
  background: var(--tint-brand);
}
.ask-choice--error:hover {
  border-color: var(--error);
  background: var(--tint-error);
}
.ask-choice--warn:hover {
  border-color: var(--warning);
  background: var(--tint-warning);
}

/* ── rehearsal: a real (or pasted) response inside the wait card ─── */
.ask-card__rehearse {
  margin-bottom: var(--ds-space-3);
  padding-top: var(--ds-space-2);
  border-top: 1px dashed var(--line-strong-alt);
}
.ask-card__fetch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--tint-brand-border);
  background: var(--tint-brand);
  color: var(--brand-deep);
  font-size: 0.75rem;
  font-weight: 700;
}
.ask-card__fetch:hover:not(:disabled) {
  background: var(--tint-brand-strong);
}
.ask-card__fetch:disabled {
  opacity: 0.7;
  cursor: wait;
}
.ask-card__fetch .material-icons {
  font-size: 1rem;
}
.ask-card__fetch:disabled .material-icons {
  animation: spin 0.8s linear infinite;
}
.ask-card__blocked {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--surface-sunken);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  line-height: 1.4;
}
.ask-card__blocked .material-icons {
  font-size: 0.9375rem;
  flex: 0 0 auto;
}
.ask-card__error {
  margin: 6px 0 0;
  color: var(--error-fg);
  font-size: 0.6875rem;
}
.ask-card__paste-toggle {
  display: block;
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  text-decoration: underline;
  padding: 0;
}
.ask-card__paste-toggle:hover {
  color: var(--brand-deep);
}
.ask-card__paste {
  margin-top: 6px;
  display: grid;
  gap: 6px;
}
.ask-card__paste textarea {
  width: 100%;
  border-radius: 7px;
  border: 1px solid var(--line-strong-alt);
  padding: 6px 8px;
  font-size: 0.6875rem;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.ask-card__resp-head {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  color: var(--success-fg);
  font-size: 0.6875rem;
  font-weight: 700;
}
.ask-card__resp-head .material-icons {
  font-size: 0.9375rem;
}
.ask-card__resp-again {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.625rem;
  text-decoration: underline;
  padding: 0;
}
.ask-card__resp {
  max-height: 160px;
  overflow: auto;
  margin: 0;
  padding: 8px;
  border-radius: 7px;
  background: var(--brand-dark);
  color: #d7f5ec;
  font-size: 0.625rem;
  line-height: 1.5;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.ask-card__resp-map {
  margin: 6px 0 0;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.ask-card__resp-map code {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--tint-brand);
  color: var(--brand-deep);
  font-size: 0.625rem;
}
.ask-card__rehearse .ask-card__choices {
  margin-top: var(--ds-space-2);
}
.ask-card__foot {
  margin: var(--ds-space-3) 0 0;
  font-size: 0.625rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── mapa ─────────────────────────────────────────────────────────── */
.minimap {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 7;
  width: 190px;
  height: 122px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(0, 43, 73, 0.12);
  backdrop-filter: blur(6px);
}
/* A pergunta ancorada tem que ganhar do mapa: o mapa é orientação, a
 * pergunta é o que trava a execução. */
.canvas-wrap.is-asking .minimap {
  opacity: 0;
  pointer-events: none;
}
.minimap {
  transition: opacity 0.2s ease;
}
.minimap svg {
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: block;
}
.mini-edge {
  stroke: #c3d2d7;
  stroke-width: 6;
}
.mini-node {
  fill: #cfe0e5;
}
.mini-node.is-visited {
  fill: #8fd9c6;
}
.mini-node.is-active {
  fill: var(--brand-primary);
}
.mini-view {
  fill: rgba(0, 191, 154, 0.1);
  stroke: var(--brand-primary);
  stroke-width: 6;
}

/* ── dock inferior ────────────────────────────────────────────────── */
.dock {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--dock-bg);
  color: var(--dock-fg);
  border-top: 1px solid var(--dock-line);
  position: relative;
}
.dock-grip {
  position: absolute;
  top: -3px;
  left: 0;
  right: 0;
  height: 7px;
  cursor: ns-resize;
  z-index: 2;
}
.dock-grip:hover {
  background: linear-gradient(180deg, transparent, rgba(0, 191, 154, 0.4));
}
.dock-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  border-bottom: 1px solid transparent;
  flex: 0 0 auto;
}
.dock.is-open .dock-tabs {
  border-bottom-color: var(--dock-line);
}
.dock-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dock-muted);
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.dock-tab:hover {
  color: var(--dock-fg);
  background: rgba(255, 255, 255, 0.05);
}
.dock-tab.is-active {
  color: #fff;
  background: rgba(0, 191, 154, 0.16);
  box-shadow: inset 0 -2px 0 var(--brand-primary);
}
.dock-tab .material-icons {
  font-size: 1rem;
}
.dock-badge {
  min-width: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.625rem;
  line-height: 17px;
  text-align: center;
}
.dock-spacer {
  flex: 1;
}
.dock-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.6875rem;
  color: var(--dock-muted);
  margin-right: var(--ds-space-2);
}
.dock-hint .material-icons {
  font-size: 0.9375rem;
}
.dock-hint--error {
  color: #ff9b9b;
}
.dock .app-btn--ghost {
  color: var(--dock-muted);
  border-color: transparent;
  background: transparent;
}
.dock .app-btn--ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.dock-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dock-empty {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--dock-muted);
  padding: var(--ds-space-5);
  text-align: center;
}
.dock-empty .material-icons {
  font-size: 1.75rem;
  opacity: 0.5;
}
.dock-empty p {
  margin: 0;
  font-size: 0.75rem;
  max-width: 380px;
}
.dock-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: var(--ds-space-3) var(--ds-space-4);
  color: var(--dock-muted);
  font-size: 0.6875rem;
}
.dock-note .material-icons {
  font-size: 0.9375rem;
  color: var(--run-h2);
}

/* execução */
.trace-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  font-size: 0.75rem;
}
.trace-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 12px;
  cursor: pointer;
  border-left: 2px solid transparent;
  animation: traceIn 0.24s ease both;
}
.trace-row__main {
  display: grid;
  grid-template-columns: 52px 20px 1fr auto;
  align-items: baseline;
  gap: 8px;
}
.trace-row--http {
  align-items: stretch;
}
.trace-row .http-ex {
  margin-left: 80px;
}
@keyframes traceIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.trace-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--brand-primary);
}
.trace-time {
  color: #4f6b78;
  font-variant-numeric: tabular-nums;
  font-size: 0.6875rem;
  text-align: right;
}
.trace-icon {
  font-size: 0.9375rem !important;
  color: var(--dock-muted);
  align-self: center;
}
.trace-icon--ok {
  color: #4fd6b0;
}
.trace-icon--warn {
  color: var(--run-h2);
}
.trace-icon--error {
  color: #ff8080;
}
.trace-msg {
  color: var(--dock-fg);
  line-height: 1.45;
}
.trace-detail {
  display: block;
  font-style: normal;
  color: var(--dock-muted);
  font-size: 0.6875rem;
}
.trace-row--warn .trace-msg {
  color: #ffd79a;
}
.trace-row--error .trace-msg {
  color: #ffb3b3;
}
.trace-row--ok .trace-msg {
  color: #b6f2df;
}
.trace-token {
  color: #4f6b78;
  font-size: 0.625rem;
  white-space: nowrap;
}

/* variáveis */
.vars-pane {
  padding: var(--ds-space-2) 0;
}
.vars-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
.vars-table th {
  text-align: left;
  padding: 6px 12px;
  color: var(--dock-muted);
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--dock-line);
}
.vars-table td {
  padding: 4px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.vars-table code {
  color: #7fd8f5;
}
.vars-table input {
  width: 100%;
  max-width: 320px;
  height: 26px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--dock-line);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.75rem;
}
.vars-table input:focus-visible {
  outline: none;
  border-color: var(--brand-primary);
  background: rgba(0, 191, 154, 0.09);
}
.vars-ro {
  color: var(--dock-fg);
}

/* problemas */
.problem-list,
.bp-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  font-size: 0.75rem;
}
.problem-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-3);
  padding: 8px 12px;
  border-bottom: 1px solid var(--dock-line);
  color: var(--dock-muted);
  font-size: 0.6875rem;
}
.problem-agent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 191, 154, 0.4);
  background: rgba(0, 191, 154, 0.12);
  color: #7ff0d6;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}
.problem-agent:hover {
  background: rgba(0, 191, 154, 0.22);
}
.problem-agent .material-icons {
  font-size: 0.9375rem;
}
.problem-fix {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--dock-line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--dock-fg);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}
.problem-fix:hover {
  background: rgba(0, 191, 154, 0.22);
  border-color: rgba(0, 191, 154, 0.5);
  color: #fff;
}
.problem-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.problem-row > span:nth-of-type(2) {
  flex: 1;
}
.problem-row:hover {
  background: rgba(255, 255, 255, 0.05);
}
.problem-row .material-icons {
  font-size: 1rem;
}
.problem-row--error {
  border-left-color: #ff6b6b;
}
.problem-row--error .material-icons {
  color: #ff8080;
}
.problem-row--warn {
  border-left-color: var(--run-h2);
}
.problem-row--warn .material-icons {
  color: var(--run-h2);
}
.problem-node {
  color: var(--dock-muted);
  font-size: 0.6875rem;
  white-space: nowrap;
}

/* pontos de parada */
.bp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
}
.bp-row.is-off {
  opacity: 0.55;
}
.bp-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid #7d3b3b;
  background: transparent;
  padding: 0;
}
.bp-dot.is-on {
  background: var(--run-break);
  border-color: var(--run-break);
}
.bp-name {
  border: 0;
  background: transparent;
  color: var(--dock-fg);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0;
  text-align: left;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bp-name:hover {
  color: #fff;
  text-decoration: underline;
}
.bp-cond {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--dock-muted);
  font-size: 0.6875rem;
}
.bp-cond select,
.bp-cond input {
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--dock-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--dock-fg);
  font-size: 0.6875rem;
  padding: 0 5px;
  max-width: 110px;
}
.bp-cond option {
  color: var(--text-primary);
}

/* ── barra de ferramentas: novos chips ────────────────────────────── */
.run-chip {
  border-color: var(--tint-brand-border);
  background: var(--tint-brand);
  color: var(--brand-deep);
  font-weight: 600;
}
.run-chip:hover {
  background: var(--tint-brand-strong);
}
.bp-chip.has-bp {
  color: var(--run-break);
}
.problem-chip {
  color: var(--warning-fg);
}
.problem-chip.is-error {
  color: var(--error-fg);
}
.kbd-chip {
  color: var(--text-secondary);
  gap: 5px;
}
.kbd-chip kbd,
.palette kbd,
.ctx-item kbd,
.shortcuts kbd {
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--line-strong-alt);
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.625rem;
  font-weight: 600;
}
.app-btn--icon.is-on {
  color: var(--brand-deep);
  background: var(--tint-brand);
}

/* ── paleta de comandos ───────────────────────────────────────────── */
.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  justify-items: center;
  align-items: start;
  padding-top: 12vh;
  background: rgba(0, 30, 48, 0.42);
  backdrop-filter: blur(3px);
}
.palette {
  width: min(620px, 92vw);
  max-height: 66vh;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: white;
  box-shadow: 0 30px 80px rgba(0, 20, 40, 0.34);
  overflow: hidden;
  animation: paletteIn 0.2s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
@keyframes paletteIn {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.98);
  }
}
.palette__input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.palette__input .material-icons {
  color: var(--text-secondary);
}
.palette__input input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 0.9375rem;
  color: var(--brand-dark);
}
.palette__list {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
}
.palette__group {
  padding: 8px 10px 4px;
  color: var(--text-secondary);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.palette__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  color: var(--brand-dark);
  font-size: 0.8125rem;
}
.palette__item .material-icons {
  color: var(--text-secondary);
  font-size: 1.125rem;
}
.palette__item.is-active {
  background: var(--tint-brand);
}
.palette__item.is-active .material-icons {
  color: var(--brand-deep);
}
.palette__label {
  flex: 1;
  display: grid;
}
.palette__label em {
  font-style: normal;
  color: var(--text-secondary);
  font-size: 0.6875rem;
}
.palette__empty {
  padding: 18px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

/* ── menu de contexto ─────────────────────────────────────────────── */
.ctx-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
}
.ctx-menu {
  position: fixed;
  min-width: 214px;
  padding: 5px;
  border-radius: 11px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0, 25, 45, 0.22);
  animation: paletteIn 0.14s ease both;
}
.ctx-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-dark);
  font-size: 0.8125rem;
  text-align: left;
}
.ctx-item kbd {
  margin-left: auto;
}
.ctx-item .material-icons {
  font-size: 1.0625rem;
  color: var(--text-secondary);
}
.ctx-item:hover {
  background: var(--tint-brand);
}
.ctx-item.is-danger:hover {
  background: var(--tint-error);
  color: var(--error-fg);
}
.ctx-item.is-danger:hover .material-icons {
  color: var(--error-fg);
}

/* ── folha de atalhos ─────────────────────────────────────────────── */
.shortcuts__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--ds-space-5);
  margin-top: var(--ds-space-4);
}
.shortcuts__cols ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.shortcuts__cols li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8125rem;
  color: var(--text-primary);
}
.shortcuts__cols kbd {
  min-width: 62px;
  text-align: center;
}

/* ── folha de simulação ───────────────────────────────────────────── */
.launch__head {
  display: flex;
  gap: var(--ds-space-4);
  align-items: flex-start;
  flex: 0 0 auto;
  margin-bottom: var(--ds-space-3);
}
.launch__icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--tint-brand);
  color: var(--brand-deep);
}
.launch__head p {
  margin: 5px 0 0;
  font-size: 0.8125rem;
}
.launch__fields {
  margin-top: var(--ds-space-5);
}
.launch__extra {
  margin-top: var(--ds-space-4);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.launch__extra summary {
  cursor: pointer;
}
.launch__extra textarea {
  width: 100%;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid var(--line-strong-alt);
  padding: 8px;
}
.launch__warn {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: var(--ds-space-4);
  padding: var(--ds-space-3);
  border-radius: 9px;
  background: var(--tint-warning);
  color: var(--warning-fg);
  font-size: 0.75rem;
  line-height: 1.45;
}
.launch__warn .material-icons {
  font-size: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .node-scan::after,
  .debug-bar__pulse,
  .live-bar__dot,
  .edge--live,
  .node.sim-break,
  .flow-token__halo {
    animation: none;
  }
  .debug-bar,
  .ask-card,
  .palette,
  .ctx-menu,
  .trace-row,
  .node.sim-here {
    animation: none;
  }
}

/* Depuração dentro das propriedades da etapa - o caminho de quem não
 * descobriu a bolinha do ponto de parada no próprio nó. */
.detail-run-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--ds-space-4);
}
.detail-run-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong-alt);
  background: white;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
}
.detail-run-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-deep);
}
.detail-run-btn .material-icons {
  font-size: 0.9375rem;
}
.detail-run-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
}
.detail-run-btn.is-on {
  border-color: var(--run-break);
  color: var(--error-fg);
  background: var(--tint-error);
}
.detail-run-btn.is-on .detail-run-dot {
  background: var(--run-break);
  border-color: var(--run-break);
}

/* ── inspetor de etapa (bindings, REST, tabelas) ─────────────────── */
.insp-section {
  margin: 0 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-subtle, #f8fafc);
  overflow: hidden;
}
.insp-section > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-dark);
  list-style: none;
}
.insp-section > summary::-webkit-details-marker {
  display: none;
}
.insp-section > summary .material-icons {
  font-size: 1rem;
  color: var(--brand-light);
}
.insp-section[open] > summary {
  border-bottom: 1px solid var(--line);
  background: white;
}
.insp-section > *:not(summary) {
  padding: 10px;
  background: white;
}
.insp-count {
  margin-left: auto;
  min-width: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--tint-brand);
  color: var(--brand-deep);
  font-size: 0.625rem;
  line-height: 16px;
  text-align: center;
}
.insp-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.bind-field {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.bind-field input,
.bind-field textarea {
  flex: 1;
  min-width: 0;
  width: auto;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  min-height: 35px;
  padding: 0 9px;
  color: var(--text-primary);
  background: white;
  font: inherit;
}
.bind-field textarea {
  padding: 9px;
  resize: vertical;
}
.bind-field--stack {
  flex-wrap: wrap;
}
.bind-field--stack .bind-bolt {
  position: absolute;
  top: 6px;
  right: 6px;
}
.bind-bolt {
  flex: none;
  width: 35px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  background: white;
  color: var(--brand-primary);
  display: grid;
  place-items: center;
}
.bind-bolt .material-icons {
  font-size: 1.05rem;
}
.bind-bolt:hover,
.bind-bolt.is-on {
  background: var(--tint-brand);
  border-color: var(--brand-primary);
  color: var(--brand-deep);
}
.bind-chip {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 35px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--tint-brand-border, #b7e6dc);
  background: var(--tint-brand);
  color: var(--brand-deep);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: left;
}
.bind-chip .material-icons {
  font-size: 0.95rem;
}
.bind-chip-x {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 99px;
  color: var(--text-secondary);
}
.bind-chip-x:hover {
  background: white;
  color: var(--error-fg);
}
.bind-chip-x .material-icons {
  font-size: 0.85rem;
}

.bind-menu {
  position: fixed;
  z-index: 40;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--line-strong-alt);
  background: white;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
.bind-menu-search {
  width: 100%;
  min-height: 32px;
  margin-bottom: 6px;
  padding: 0 8px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  font: inherit;
  font-size: 0.75rem;
}
.bind-menu-empty {
  margin: 8px 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.bind-menu-label {
  margin: 8px 4px 4px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.bind-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  color: var(--text-primary);
}
.bind-menu-item:hover {
  background: var(--tint-brand);
}
.bind-menu-item .material-icons {
  font-size: 1rem;
  color: var(--brand-light);
}
.bind-menu-item strong {
  display: block;
  font-size: 0.8125rem;
}
.bind-menu-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 10px 4px;
  border-bottom: 1px solid var(--line-soft, #e2e8f0);
}
.bind-menu-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.bind-menu-chip .material-icons {
  font-size: 0.85rem;
}
.bind-menu-chip:hover {
  background: #ccfbf1;
}
.bind-menu-item.is-return {
  background: #f0fdfa;
}
.gate-field-shortcuts {
  margin: 0 0 8px;
}
.code-studio__var-chip.is-output {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}
.bind-menu-item em {
  display: block;
  font-size: 0.6875rem;
  font-style: normal;
  color: var(--text-secondary);
}

.vault-bolt {
  width: 100%;
  justify-content: center;
  gap: 6px;
}
.vault-chip {
  background: var(--success-bg, #ecfdf5);
  border-color: var(--success, #059669);
  color: var(--success, #059669);
}
.vault-menu {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vault-new {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.vault-new input {
  width: 100%;
}

.kv-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kv-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.9fr) minmax(0, 1.3fr) 32px;
  gap: 6px;
  align-items: start;
}
.kv-name,
.kv-row input {
  width: 100%;
  min-height: 35px;
  padding: 0 8px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  font: inherit;
  font-size: 0.8125rem;
}
.kv-name--locked {
  display: flex;
  align-items: center;
  background: var(--surface-subtle, #f8fafc);
  color: var(--brand-dark);
  font-size: 0.75rem;
  font-weight: 700;
}
.kv-empty {
  margin: 0 0 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.form-schema {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-schema-row {
  border: 1px solid var(--line-strong-alt);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-subtle, #f8fafc);
}
.form-schema-row__main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 32px;
  gap: 6px;
  align-items: start;
}
.form-schema-row__main input,
.form-schema-row__main select {
  width: 100%;
  min-height: 35px;
  padding: 0 8px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  font: inherit;
  font-size: 0.8125rem;
  background: white;
}
.form-schema-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-schema-check input,
.form-field-check input,
.property-group input[type='checkbox'],
.property-group input[type='radio'] {
  width: auto;
  min-height: 0;
  height: auto;
}
.form-schema-extra,
.form-schema-help {
  margin-top: 6px;
}
.form-schema-extra textarea,
.form-schema-extra input,
.form-schema-help {
  width: 100%;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  padding: 8px;
  font: inherit;
  font-size: 0.8125rem;
  background: white;
}
/* ── Form fields (FormFieldInput) ──────────────────────────────────
 * One skin for every in-app form: home composer, case step, portal,
 * simulator. Same language as the public link form (`.vagas-*`). */
.property-group.ff {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.property-group--half.ff {
  display: inline-grid;
}
.property-group.ff .ff__label {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-primary);
}
.ff__req {
  color: #e11d48;
  font-weight: 700;
}
.property-group.ff input:not([type='checkbox']):not([type='radio']):not([type='file']),
.property-group.ff select,
.property-group.ff textarea,
.property-group.ff .form-field-affix {
  min-height: 42px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 10px;
  background-color: white;
  font-size: 0.9rem;
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(15, 40, 60, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.property-group.ff input:not([type='checkbox']):not([type='radio']):not([type='file']),
.property-group.ff select {
  padding-left: 12px;
}
.property-group.ff textarea {
  min-height: 92px;
  padding: 10px 12px;
  line-height: 1.5;
}
.property-group.ff input::placeholder,
.property-group.ff textarea::placeholder {
  color: #9aa9b5;
}
.property-group.ff input:not([type='checkbox']):not([type='radio']):not([type='file']):hover,
.property-group.ff select:hover,
.property-group.ff textarea:hover,
.property-group.ff .form-field-affix:hover {
  border-color: var(--line-strong);
}
.property-group.ff input:not([type='checkbox']):not([type='radio']):not([type='file']):focus-visible,
.property-group.ff select:focus-visible,
.property-group.ff textarea:focus-visible,
.property-group.ff .form-field-affix:focus-within {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(0, 191, 154, 0.14);
}
.property-group.ff .form-field-affix input {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.property-group.ff .form-field-affix span {
  border-right: 1px solid var(--line);
}
.property-group.ff .form-field-affix--suffix span {
  border-right: 0;
  border-left: 1px solid var(--line);
}
.property-group.ff .form-field-help {
  margin: 0;
}

/* Choices: radio and multiselect as option cards. */
.ff-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
  gap: 8px;
}
.property-group.ff .ff-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 10px;
  background: white;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.property-group.ff .ff-choice:hover {
  border-color: var(--brand-primary);
}
.property-group.ff .ff-choice.is-on {
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand-primary);
  color: var(--brand-dark);
  font-weight: 600;
}
.property-group.ff .ff-choice:has(input:focus-visible) {
  outline: 3px solid rgba(0, 191, 154, 0.3);
  outline-offset: 2px;
}
.ff-choice__text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.property-group.ff .ff-choice__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  background-color: white;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.property-group.ff .ff-choice__mark:focus-visible {
  outline: none;
}
.ff-choice__mark--radio {
  border-radius: 50%;
}
.ff-choice__mark--check {
  border-radius: 5px;
}
.property-group.ff .ff-choice__mark:checked {
  border-color: var(--brand-primary);
  background-color: var(--brand-primary);
}
.ff-choice__mark--radio:checked {
  box-shadow: inset 0 0 0 3.5px white;
}
.ff-choice__mark--check:checked {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  background-position: center;
  background-repeat: no-repeat;
}

/* Yes/no: a row with a switch. */
.property-group.ff .ff-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 10px;
  background: white;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.property-group.ff .ff-toggle:hover {
  border-color: var(--line-strong);
}
.property-group.ff .ff-toggle.is-on {
  border-color: var(--tint-brand-border);
  background: var(--tint-brand-soft);
}
.property-group.ff .ff-toggle:has(input:focus-visible) {
  outline: 3px solid rgba(0, 191, 154, 0.3);
  outline-offset: 2px;
}
.ff-toggle__text {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
}
.property-group.ff .ff-switch {
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cbd5dc;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 0.18s ease;
}
.property-group.ff .ff-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(15, 40, 60, 0.3);
  transition: transform 0.18s ease;
}
.property-group.ff .ff-switch:checked {
  background: var(--brand-primary);
}
.property-group.ff .ff-switch:checked::after {
  transform: translateX(16px);
}
.property-group.ff .ff-switch:focus-visible {
  outline: none;
}

/* File: a drop zone; once chosen, the same box becomes the file card. */
.ff-drop {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface-subtle);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.ff-drop:hover,
.ff-drop.is-drag {
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
}
.ff-drop.is-drag {
  box-shadow: 0 0 0 4px rgba(0, 191, 154, 0.14);
}
.ff-drop.is-set,
.ff-drop.is-ok {
  border-style: solid;
  border-color: var(--tint-brand-border);
  background: white;
}
.ff-drop.is-ok {
  border-color: var(--brand-primary);
}
.ff-drop.is-error {
  border-style: solid;
  border-color: #fca5a5;
  background: #fff7f7;
}
.ff-drop:has(input:focus-visible) {
  outline: 3px solid rgba(0, 191, 154, 0.3);
  outline-offset: 2px;
}
.property-group.ff .ff-drop input[type='file'] {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.ff-drop.is-busy input[type='file'] {
  cursor: progress;
}
.ff-drop__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: white;
  color: var(--brand-primary);
  font-size: 22px !important;
  box-shadow: 0 1px 3px rgba(0, 43, 73, 0.1);
}
.ff-drop.is-set .ff-drop__icon {
  background: var(--tint-brand-soft);
  box-shadow: none;
}
.ff-drop.is-error .ff-drop__icon {
  background: #fee2e2;
  color: #dc2626;
  box-shadow: none;
}
.ff-drop.is-busy .ff-drop__icon {
  animation: ff-spin 0.9s linear infinite;
}
@keyframes ff-spin {
  to {
    transform: rotate(360deg);
  }
}
.ff-drop__text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.ff-drop__text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-dark);
}
.ff-drop__text strong span {
  font-weight: 500;
  color: var(--text-secondary);
}
.ff-drop__text small {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
}
.ff-drop.is-set .ff-drop__text small {
  color: var(--brand-deep);
}
.ff-drop.is-error .ff-drop__text small {
  color: #b91c1c;
}
.ff-drop__remove {
  position: relative;
  z-index: 2;
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.ff-drop__remove:hover {
  border-color: #fca5a5;
  background: #fff1f2;
  color: #dc2626;
}
.ff-meter {
  flex: 1 0 100%;
  display: grid;
  gap: 6px;
}
.ff-meter__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-muted, #e7eef2);
  overflow: hidden;
}
.ff-meter__bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-primary);
  transition: width 0.15s ease;
}
.ff-meter__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.ff-meter.is-ok .ff-meter__label {
  color: var(--brand-deep, var(--brand-primary));
}
.ff-meter.is-fail .ff-meter__bar > span {
  background: #dc2626;
}
.ff-meter.is-fail .ff-meter__label {
  color: #b91c1c;
}
.ff-drop__remove .material-icons {
  font-size: 18px;
}

.property-group.ff textarea {
  field-sizing: content;
  max-height: 22rem;
}
.property-group.ff.is-invalid input:not([type='checkbox']):not([type='radio']):not([type='file']),
.property-group.ff.is-invalid .form-field-affix {
  border-color: #f87171;
  background-color: #fffafa;
}
.property-group.ff.is-invalid input:focus-visible,
.property-group.ff.is-invalid .form-field-affix:focus-within {
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18);
}
.ff__error {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #b91c1c;
}
.ff__error::before {
  content: 'error';
  font-family: 'Material Icons';
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
}

/* One-tap values under date and time fields. */
.ff-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ff-quick button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.ff-quick button:hover {
  border-color: var(--brand-primary);
  color: var(--brand-dark);
}
.ff-quick button.is-on {
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
  color: var(--brand-deep);
}
.ff-quick button:focus-visible {
  outline: 3px solid rgba(0, 191, 154, 0.3);
  outline-offset: 1px;
}

/* Copy that only makes sense with a mouse, or only with a finger. */
.ff-touch {
  display: none;
}
@media (pointer: coarse) {
  .ff-fine {
    display: none;
  }
  .ff-touch {
    display: inline;
  }
  strong.ff-touch {
    display: block;
  }
}

/* Footer of a form: progress, shortcut, actions. */
.ff-actions {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.ff-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.ff-progress__bar {
  position: relative;
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}
.ff-progress__bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--brand-primary);
  transition: width 0.25s ease;
}
.ff-progress.is-done {
  color: var(--brand-deep);
}
.ff-kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.ff-kbd-hint kbd {
  min-width: 20px;
  padding: 1px 5px;
  border: 1px solid var(--line-strong-alt);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: white;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
}
@media (pointer: coarse) {
  .ff-kbd-hint {
    display: none;
  }
}

/* Phones: one column, thumb-size targets, 16px text so iOS does not
 * zoom into the field, and the actions stay under the thumb. */
@media (max-width: 640px) {
  .property-group--half.ff {
    display: grid;
    width: 100%;
  }
  .property-group--half.ff + .property-group--half.ff {
    margin-left: 0;
  }
  .property-group.ff input:not([type='checkbox']):not([type='radio']):not([type='file']),
  .property-group.ff select,
  .property-group.ff textarea {
    min-height: 48px;
    font-size: 16px;
  }
  .property-group.ff .ff-choice,
  .property-group.ff .ff-toggle {
    min-height: 50px;
  }
  .ff-choices {
    grid-template-columns: minmax(0, 1fr);
  }
  .ff-drop {
    padding: 14px;
  }
  .ff-drop__remove {
    width: 40px;
    height: 40px;
  }
  .ff-quick button {
    min-height: 34px;
    padding: 0 12px;
  }
  .home-composer-match:has(.ff) {
    padding: 16px;
  }
  .home-composer-match .ff-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 6px -16px -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-radius: 0 0 12px 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 -6px 18px rgba(0, 43, 73, 0.08);
  }
  .ff-progress {
    flex-basis: 100%;
  }
  .ff-actions .app-btn {
    flex: 1;
    min-height: 44px;
    justify-content: center;
  }
}
.form-field-help {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.form-field-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-field-choices {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-field-affix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  background: white;
  overflow: hidden;
}
.form-field-affix span {
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: var(--surface-subtle, #f8fafc);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
}
.form-field-affix input {
  border: 0;
  min-height: 35px;
  border-radius: 0;
}
.ask-card__fields .property-group {
  margin-bottom: 0;
}
.ask-card__fields textarea {
  height: auto;
  min-height: 64px;
}
.ask-card__fields input[type='checkbox'],
.ask-card__fields input[type='radio'] {
  height: auto;
  width: auto;
}
.hint-card--warn {
  background: var(--tint-warning, #fff7ed);
  color: var(--warning-fg, #9a3412);
}
/* `.field-hint` era usada em dez lugares sem regra base, herdando o
 * tamanho do corpo. É uma legenda de campo, não um parágrafo. */
.field-hint {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.45;
}
.hint-card code,
.field-hint code {
  font-size: 0.75em;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface-muted, #eef2f6);
}
.hint-sample {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-muted, #eef2f6);
  font-size: 0.75rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow: auto;
}
.assignee-sub {
  margin-top: 8px;
}
.wait-ttl {
  display: flex;
  gap: 8px;
  align-items: center;
}
.wait-ttl input {
  width: 5.5rem;
  flex: 0 0 5.5rem;
}
.wait-ttl select {
  flex: 1;
}
.portal-instruction {
  margin: 0 0 16px;
  padding: 0 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.portal-readonly {
  margin: 0;
  padding: 0 1.25rem;
}
.portal-readonly div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}
.portal-readonly dt {
  color: var(--text-secondary);
}
.portal-readonly dd {
  margin: 0;
  color: var(--brand-dark);
  font-weight: 600;
  text-align: right;
}
.portal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.portal-once {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════════
   IDE em tela pequena
   Num telefone o canvas é a tela - não cabe dividi-la em três colunas.
   As duas laterais viram gavetas sobre o canvas (o painel de
   propriedades já era uma, abaixo de 1100px), e as barras que não
   cabem rolam na horizontal em vez de esticar a coluna.

   Este bloco vive no fim do arquivo de propósito: `.canvas-column,
   .assistant-pane, .details-pane { min-height: 0 }` lá em cima anulava,
   por ordem, qualquer regra de mesma especificidade escrita antes dele.
   ═══════════════════════════════════════════════════════════════════ */
/* O véu atrás da gaveta. Fica ANTES do @media que o liga: uma regra de
   mesma especificidade escrita depois venceria por ordem e o véu nunca
   apareceria. Sem layout de gaveta ele não existe - senão viraria uma
   célula solta na grade de três colunas do desktop. */
.builder-scrim {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  border: 0;
  padding: 0;
  background: rgba(0, 30, 48, 0.32);
  cursor: pointer;
}

@media (max-width: 900px) {
  /* Uma coluna só: o canvas. `.builder.has-details` / `.builder.has-arch`
     (mais classes) ganhavam de `.builder` e reimpunham 340px+360px numa
     tela de 375px, jogando o canvas para fora e recortando o painel. */
  .builder,
  .builder.has-details,
  .builder.has-arch,
  .builder.has-arch.has-details {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    position: relative;
    overflow: hidden;
  }

  .assistant-pane {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: min(330px, 88vw);
    border-right: 1px solid var(--line);
    box-shadow: 12px 0 28px rgba(15, 23, 42, 0.14);
    transform: translateX(-100%);
    transition: transform 0.2s ease-out;
  }
  .assistant-pane.is-open {
    transform: translateX(0);
  }

  /* Propriedades e o inspetor de execução viram uma folha de baixo, não
     uma gaveta lateral: numa pausa do depurador a gaveta cobria o canvas
     inteiro e a pessoa perdia justamente a etapa acesa que foi ver. A
     folha deixa o canvas à mostra em cima e ainda dá largura cheia aos
     campos do formulário. */
  .builder.has-details .details-pane,
  .details-pane {
    position: absolute;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: auto;
    height: min(58%, 460px);
    border-top: 1px solid var(--line);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -14px 30px rgba(15, 23, 42, 0.16);
  }

  .builder-scrim {
    display: block;
  }

  /* Barras: rolam em vez de esticar a coluna. */
  .canvas-titlebar {
    flex-wrap: wrap;
    row-gap: var(--ds-space-2);
    padding: var(--ds-space-3) var(--ds-space-4);
  }
  .canvas-titlebar > div:first-child {
    flex: 1 1 100%;
  }
  .canvas-titlebar .header-actions {
    flex: 1 1 100%;
    /* Uma faixa que rola, não duas linhas de botões: o título já custa
       uma linha, e o canvas é o que a pessoa veio ver. E alinhada ao
       INÍCIO: com `justify-content: flex-end` (o padrão desta classe) o
       excesso transborda para a esquerda, fora do alcance da rolagem -
       o botão "Montar", que é a única porta para a paleta no telefone,
       simplesmente não dava para alcançar. */
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .canvas-titlebar .header-actions > * {
    flex: 0 0 auto;
  }
  .canvas-titlebar .header-actions::-webkit-scrollbar {
    display: none;
  }
  .toolbar,
  .dock-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .toolbar::-webkit-scrollbar,
  .dock-tabs::-webkit-scrollbar {
    display: none;
  }
  .toolbar > *,
  .dock-tabs > * {
    flex: 0 0 auto;
  }
  .toolbar-spacer {
    flex: 1 0 var(--ds-space-2);
  }
  /* Sem espaço para um mapa que só orienta; o canvas já enquadra sozinho. */
  .minimap {
    display: none;
  }
  .canvas-footer {
    padding: var(--ds-space-2) var(--ds-space-4);
  }
  .canvas-footer .draft-state:first-child {
    display: none;
  }
  /* A pergunta encostada na base do canvas, fora do pan/zoom: sempre
     visível, sempre alcançável, sem precisar arrastar o desenho. */
  .ask-dock {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 9;
    max-height: min(62%, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 13px;
    box-shadow: 0 18px 44px rgba(0, 30, 50, 0.24);
  }
  .ask-dock .ask-card {
    box-shadow: none;
  }
  .ask-dock .ask-card::before {
    display: none;
  }
  .debug-bar {
    max-width: calc(100vw - 20px);
    flex-wrap: wrap;
    row-gap: 4px;
    border-radius: 14px;
  }
  .debug-bar__where,
  .debug-bar__meta,
  .debug-bar__legs {
    display: none;
  }
  .node-run__resp pre,
  .ask-card__resp {
    max-height: 150px;
  }
}

/* O botão que abre a gaveta do agente só existe onde há gaveta. */
.assistant-toggle {
  display: none;
}
@media (max-width: 900px) {
  .assistant-toggle {
    display: inline-flex;
  }
}

/* Arquitetura aberta: a revisão não cabe ao lado do canvas com a
   sidebar (14.5rem) abaixo de ~1100px. Vira a mesma gaveta do IDE
   pequeno, um pouco mais larga, para os cartões por etapa. */
@media (max-width: 1100px) {
  .builder.has-arch,
  .builder.has-arch.has-details {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    position: relative;
    overflow: hidden;
  }
  .builder.has-arch .assistant-pane {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: min(400px, 92vw);
    border-right: 1px solid var(--line);
    box-shadow: 12px 0 28px rgba(15, 23, 42, 0.14);
    transform: translateX(-100%);
    transition: transform 0.2s ease-out;
  }
  .builder.has-arch .assistant-pane.is-open {
    transform: translateX(0);
  }
  .builder.has-arch .builder-scrim {
    display: block;
  }
  .builder.has-arch .assistant-toggle {
    display: inline-flex;
  }
}

@media (max-width: 560px) {
  /* Título e código ocupam a linha toda; as ações rolam embaixo. */
  .canvas-titlebar h2,
  .canvas-title-input {
    font-size: 0.9375rem;
  }
  .dock {
    font-size: 0.75rem;
  }
  .details-tabs {
    padding-left: var(--ds-space-4);
    padding-right: var(--ds-space-4);
  }
  .node-run,
  .details-body {
    padding-left: var(--ds-space-4);
    padding-right: var(--ds-space-4);
  }
}

/* Um caminho longo (URL, código de fluxo, chave) não pode empurrar a
   página: quebra dentro da própria caixa. */
code,
.arm-linked-card strong,
.trace-detail,
.node-run__io code {
  overflow-wrap: anywhere;
}

/* ── Construtor de formulários ──────────────────────────────────────
 * Três colunas: paleta, formulário, propriedades do campo escolhido.
 * A mesma peça serve a tela Formulários e o modal do canvas, então
 * ela nunca fixa altura - quem hospeda decide. */
.fb {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 360px;
  gap: 1px;
  background: var(--line);
  min-height: 440px;
}
.fb-palette,
.fb-props {
  background: var(--surface-subtle);
  padding: var(--ds-space-4);
  overflow-y: auto;
  max-height: 62vh;
}
.fb-palette-group {
  margin-bottom: var(--ds-space-4);
}
.fb-palette-group__name {
  display: block;
  margin-bottom: 4px;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fb-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-bottom: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  background: white;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.fb-chip:hover {
  border-color: var(--brand-primary);
  color: var(--brand-dark);
}
.fb-chip .material-icons {
  font-size: 16px;
  color: var(--text-secondary);
}
.fb-stage {
  background: white;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fb-tabs {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  padding: 0 var(--ds-space-4);
  border-bottom: 1px solid var(--line);
}
.fb-tabs__spacer {
  flex: 1 1 auto;
}
.fb-tab {
  padding: 10px 4px;
  margin-right: var(--ds-space-3);
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}
.fb-tab.is-on {
  color: var(--brand-dark);
  border-bottom-color: var(--brand-primary);
}
.fb-count {
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.fb-list {
  padding: var(--ds-space-4);
  overflow-y: auto;
  max-height: 62vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fb-card {
  display: grid;
  grid-template-columns: 20px 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 9px;
  background: white;
  cursor: pointer;
}
.fb-card:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 1px;
}
.fb-card.is-selected {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(0, 191, 154, 0.16);
}
.fb-card.is-dragging {
  opacity: 0.45;
}
.fb-card.is-drop {
  border-top: 2px solid var(--brand-primary);
}
.fb-card__grip {
  color: var(--line-strong-alt);
  cursor: grab;
  font-size: 18px;
}
.fb-card__icon {
  color: var(--text-secondary);
  font-size: 18px;
}
.fb-card__body {
  min-width: 0;
}
.fb-card__body h4 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fb-card__body p {
  margin: 1px 0 0;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fb-card__tools {
  display: flex;
  gap: 2px;
}
.fb-req {
  margin-left: 3px;
  color: #d94a4a;
  font-weight: 700;
}
.fb-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: var(--ds-space-5);
  padding: var(--ds-space-5);
  overflow-y: auto;
  max-height: 62vh;
}
.fb-preview__paper {
  padding: var(--ds-space-5);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-subtle);
}
.fb-preview__paper h3 {
  margin: 0 0 var(--ds-space-4);
  color: var(--brand-dark);
  font-size: 1rem;
}
.fb-errors {
  margin: 0 0 var(--ds-space-3);
  padding-left: 1.1rem;
  color: #a33;
  font-size: 0.75rem;
  line-height: 1.5;
}
.fb-props .property-group input,
.fb-props .property-group select,
.fb-props .property-group textarea,
.fb-cond select,
.fb-cond input {
  font-size: 0.8125rem;
}
.fb-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.fb-cond {
  margin-top: var(--ds-space-4);
  padding-top: var(--ds-space-4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fb-cond select,
.fb-cond input {
  width: 100%;
  min-height: 35px;
  padding: 0 9px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  background: white;
  font: inherit;
}
/* Metade da linha, sem exigir que o container vire flex - o formulário
 * é renderizado em cinco telas diferentes. */
.property-group--half {
  display: inline-block;
  width: calc(50% - 5px);
  vertical-align: top;
}
.property-group--half + .property-group--half {
  margin-left: 8px;
}
.modal--builder {
  width: min(1240px, 95vw);
  max-width: 1240px;
}
.modal--builder .fb {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  margin-top: var(--ds-space-4);
}
.panel--flush {
  padding: 0;
}
.panel-head-search {
  min-width: 220px;
  min-height: 35px;
  padding: 0 10px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  background: white;
  font: inherit;
  font-size: 0.8125rem;
}
.form-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--ds-space-4);
  padding: var(--ds-space-5);
}

/* Editor estreito do painel do canvas: cartão fechado por padrão,
 * propriedades dobradas dentro do escolhido. */
.form-schema-row__head {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 2px;
}
.form-schema-row__grip {
  color: var(--line-strong-alt);
  cursor: grab;
  font-size: 16px;
}
.form-schema-row__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 2px;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.form-schema-row__toggle .material-icons {
  font-size: 16px;
  color: var(--text-secondary);
}
.form-schema-row__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--brand-dark);
  font-size: 0.8125rem;
  font-weight: 600;
}
.form-schema-row__kind {
  color: var(--text-secondary);
  font-size: 0.6875rem;
  white-space: nowrap;
}
.form-schema-row.is-open {
  border-color: var(--brand-primary);
}
.form-schema-row.is-dragging {
  opacity: 0.45;
}
.form-schema-row.is-drop {
  border-top: 2px solid var(--brand-primary);
}
.form-schema-body {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-schema-body textarea,
.form-schema-pair input {
  width: 100%;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  padding: 8px;
  font: inherit;
  font-size: 0.8125rem;
  background: white;
}
.form-schema-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.form-schema-pair input {
  min-height: 35px;
  padding: 0 8px;
}
.form-schema-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 1100px) {
  .fb {
    grid-template-columns: minmax(0, 1fr);
  }
  .fb-palette,
  .fb-props,
  .fb-list {
    max-height: none;
  }
  .fb-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--ds-space-3);
  }
  .fb-preview {
    grid-template-columns: minmax(0, 1fr);
    max-height: none;
  }
  .form-meta {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Dados: a tabela de um processo ─────────────────────────────────
 * Cabeçalho e primeira coluna fixos, porque um processo com vinte
 * campos rola nos dois eixos e a pessoa precisa saber de que caso é a
 * linha que está lendo. */
.records-toolbar {
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}
.records-picker,
.records-search,
.records-toolbar > .app-btn {
  box-sizing: border-box;
  height: 36px;
  min-height: 36px;
  border-radius: 8px;
}
.records-picker {
  flex: 0 1 22rem;
  min-width: 14rem;
  padding: 0 10px;
  border: 1px solid var(--line-strong-alt);
  background: white;
  font: inherit;
  font-weight: 600;
  color: var(--brand-dark);
}
.records-search {
  flex: 1 1 14rem;
  min-width: 10rem;
  padding: 0 10px;
  border: 1px solid var(--line-strong-alt);
  background: white;
  font: inherit;
  font-size: 0.8125rem;
  appearance: none;
  -webkit-appearance: none;
}
.records-toolbar > .app-btn {
  flex: 0 0 auto;
  padding: 0 12px;
}
.records-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px var(--ds-space-4);
  padding: var(--ds-space-4) 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}
.records-columns .form-field-check {
  min-height: 26px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
}
.records-columns__kind {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 0.6875rem;
}
.records-note {
  margin: 0;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.records-scroll {
  overflow: auto;
  max-height: 62vh;
}
.records-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: 0.8125rem;
}
.records-table th,
.records-table td {
  border-bottom: 1px solid var(--line);
  padding: 0;
  text-align: left;
  white-space: nowrap;
}
.records-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line-strong-alt);
}
.records-table thead tr.records-filters th {
  top: 33px;
  z-index: 2;
}
/* A coluna do número acompanha a rolagem horizontal. */
.records-table th:first-child,
.records-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: white;
  border-right: 1px solid var(--line);
}
.records-table thead th:first-child {
  z-index: 3;
  background: var(--surface-subtle);
}
.records-th {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 33px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--brand-dark);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.records-th .material-icons {
  font-size: 14px;
  color: var(--brand-primary);
}
.records-th__old {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--surface-muted, #eef2f6);
  color: var(--text-secondary);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
}
.records-filters input,
.records-filters select {
  width: 100%;
  min-width: 110px;
  min-height: 28px;
  padding: 0 6px;
  border: 0;
  border-top: 1px solid var(--line);
  background: white;
  font: inherit;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.records-filters input:focus,
.records-filters select:focus {
  outline: 2px solid var(--brand-primary);
  outline-offset: -2px;
}
.records-table tbody td {
  padding: 7px 10px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.records-table tbody tr {
  cursor: pointer;
}
.records-table tbody tr:hover td {
  background: var(--surface-subtle);
}
.records-more {
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
  flex-wrap: wrap;
  padding: var(--ds-space-4) 1.25rem;
}
.records-more .field-hint {
  margin: 0;
}

@media (max-width: 900px) {
  .records-picker,
  .records-search {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }
  .records-toolbar > .app-btn {
    margin-left: auto;
  }
  .records-scroll {
    max-height: none;
  }
}

/* ── Architecture agent review (BPMN → Flow) ─────────────────────── */
.modal--arch {
  width: min(1120px, 96vw);
  height: min(840px, 92vh);
  max-height: min(92vh, 920px);
}
.arch-modal__scroll {
  display: grid;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-2);
}
.arch-review {
  display: grid;
  gap: var(--ds-space-3);
  background: #f4f8f9;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-primary);
}
.arch-review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
}
.modal--arch .arch-review__head h2 {
  margin: 0;
}
.arch-review .draft-review__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  position: sticky;
  bottom: 0;
  background: #f4f8f9;
  padding: 8px 0 2px;
  margin-top: 4px;
}
.verify-ok,
.verify-warn,
.verify-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
}
.verify-ok {
  color: var(--success);
}
.verify-ok .material-icons {
  font-size: 1rem;
}
.verify-warn {
  color: var(--error-fg, #b91c1c);
}
.verify-note {
  color: var(--text-secondary);
}
.arch-review__src {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7f8c;
  background: #e6eef0;
  padding: 2px 8px;
  border-radius: 999px;
}
.arch-review__rationale {
  margin: 0;
  color: #3d4f5c;
}
.arch-review__hint {
  margin: 0;
  font-size: 0.75rem;
  color: #55697a;
}
.arch-meter {
  display: grid;
  gap: 6px;
}
.arch-meter__bar {
  height: 8px;
  border-radius: 999px;
  background: #dde7ea;
  overflow: hidden;
}
.arch-meter__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #00bf9a, #35d0b4);
  transition: width 0.4s ease;
}
.arch-meter__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2) var(--ds-space-4);
  font-size: 0.75rem;
  color: #55697a;
}
.arch-meter__stats b {
  color: var(--brand-dark);
}
.arch-moves {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
.arch-moves li {
  font-size: 0.75rem;
  color: #3d4f5c;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.arch-move__tag {
  flex: none;
  font-weight: 600;
  color: var(--brand-dark);
  background: #dff5ef;
  border-radius: 4px;
  padding: 1px 6px;
}
.arch-cards {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  padding-right: 2px;
}
.arch-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
  border-left: 3px solid #cdd9dd;
}
.arch-card.conf--high {
  border-left-color: #00bf9a;
}
.arch-card.conf--medium {
  border-left-color: #f0b429;
}
.arch-card.conf--low {
  border-left-color: #e2856e;
}
.arch-card.is-locked {
  background: #f3fbf8;
  border-color: #9fe0ce;
}
.arch-card__top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.arch-card__name {
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arch-card__actor {
  font-size: 0.6875rem;
  color: #6b7f8c;
  background: #eef3f4;
  border-radius: 999px;
  padding: 1px 7px;
  flex: none;
}
.arch-card__row {
  display: flex;
  gap: 6px;
}
.arch-card__row select {
  flex: 1;
  min-width: 0;
  border: 1px solid #bccfd4;
  border-radius: 7px;
  padding: 5px 7px;
  font-size: 0.75rem;
  background: #fff;
  color: var(--text-primary);
}
.arch-card__path,
.arch-card__alts {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.arch-card__path-label {
  flex: none;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7f8c;
  min-width: 3.6rem;
}
.arch-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.arch-path {
  border: 1px solid #9fe0ce;
  background: #f3fbf8;
  color: #04785f;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}
.arch-path:hover:not(:disabled) {
  background: #dff5ef;
}
.arch-path.is-picked {
  background: #00bf9a;
  border-color: #00bf9a;
  color: #fff;
}
.arch-path--alt {
  background: #fff;
  border-color: #bccfd4;
  color: #3d4f5c;
  font-weight: 500;
}
.arch-path--alt.is-picked {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}
.arch-card__more {
  font-size: 0.72rem;
  color: #55697a;
}
.arch-card__more summary {
  cursor: pointer;
}
.arch-card__more select {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 1px solid #bccfd4;
  border-radius: 7px;
  padding: 5px 7px;
  font-size: 0.75rem;
  background: #fff;
  color: var(--text-primary);
}
.arch-card__why {
  margin: 0;
  font-size: 0.72rem;
  color: #64778a;
}
.arch-card__note {
  border: 1px solid #bccfd4;
  border-radius: 7px;
  padding: 5px 7px;
  font-size: 0.72rem;
}
.conf {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: 999px;
  flex: none;
}
.conf.conf--high {
  background: #dff5ef;
  color: #04785f;
}
.conf.conf--medium {
  background: #fdf0d5;
  color: #8a5a05;
}
.conf.conf--low {
  background: #fbe6e0;
  color: #9c4527;
}
.arch-roi summary,
.arch-lint summary {
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--brand-dark);
  font-weight: 600;
}
.arch-roi ul,
.arch-lint ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 5px;
}
.arch-roi li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 0.72rem;
  color: #55697a;
}
.arch-roi__name {
  font-weight: 600;
  color: var(--text-primary);
}
.arch-roi__pill {
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 0.625rem;
}
.arch-roi__pill.impact-alto {
  background: #dff5ef;
  color: #04785f;
}
.arch-roi__pill.impact-médio {
  background: #eef3f4;
  color: #4b5f6c;
}
.arch-roi__pill.impact-baixo {
  background: #f1f4f5;
  color: #7c8b96;
}
.arch-roi__pill.effort-baixo {
  background: #dff5ef;
  color: #04785f;
}
.arch-roi__pill.effort-médio {
  background: #fdf0d5;
  color: #8a5a05;
}
.arch-roi__pill.effort-alto {
  background: #fbe6e0;
  color: #9c4527;
}
.arch-roi__note {
  color: #7c8b96;
}
.arch-lint li {
  font-size: 0.72rem;
}
.arch-lint__error {
  color: #a3341c;
}
.arch-lint__warn,
.arch-lint__warning {
  color: #8a5a05;
}
.arch-lint__info {
  color: #55697a;
}
.app-btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.arch-move__accept {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.arch-move__accept input {
  margin: 0;
}

/* Architecture review is a focused decision workspace, not another
   inspector squeezed beside the canvas. */
.modal-backdrop--arch {
  background: rgba(6, 28, 40, 0.62);
  backdrop-filter: blur(6px);
}
.modal--arch {
  width: min(1080px, calc(100vw - 40px));
  height: min(800px, calc(100vh - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  box-shadow: 0 32px 90px rgba(0, 25, 38, 0.34);
}
.modal--arch .arch-review__head {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e8edef;
  background: #fff;
  flex: 0 0 auto;
}
.arch-review__title,
.arch-review__head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.arch-review__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #063f4c, #00a985);
  box-shadow: 0 8px 20px rgba(0, 169, 133, 0.22);
}
.arch-review__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: #6d7f88;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.modal--arch .arch-review__head h2 {
  color: #102f3a;
  font-size: 1.3rem;
  line-height: 1.2;
}
.arch-review__close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #627681;
  background: #f2f5f6;
  cursor: pointer;
}
.arch-review__close:hover {
  color: #102f3a;
  background: #e7edef;
}
.modal--arch .arch-review__src {
  padding: 5px 9px;
  color: #3d5964;
  background: #eef3f4;
}
.arch-review__intro {
  padding: 14px 24px 10px;
  background: #fff;
}
.modal--arch .arch-review__rationale {
  font-size: 0.84rem;
  line-height: 1.45;
}
.modal--arch .arch-review__hint {
  margin-top: 4px;
}
.modal--arch .arch-meter {
  padding: 0 24px 14px;
  background: #fff;
}
.modal--arch .arch-meter__bar {
  height: 6px;
  background: #e7edee;
}
.modal--arch .arch-meter__stats {
  padding-top: 4px;
}
.modal--arch > .arch-moves {
  margin: 0;
  padding: 10px 24px;
  border-top: 1px solid #eef2f3;
  border-bottom: 1px solid #e5ebed;
  background: #f7faf9;
}
.modal--arch .arch-modal__scroll {
  margin: 0;
  padding: 18px 24px 26px;
  background: #f4f7f8;
}
.modal--arch .arch-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.modal--arch .arch-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 310px);
  grid-template-areas:
    'title choice'
    'reason more'
    'note note';
  align-items: center;
  gap: 7px 24px;
  padding: 15px 18px;
  border: 1px solid #e1e8ea;
  border-left: 3px solid #cbd7da;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(20, 54, 66, 0.04);
}
.modal--arch .arch-card:hover {
  border-color: #bfd0d5;
  box-shadow: 0 8px 22px rgba(20, 54, 66, 0.08);
}
.modal--arch .arch-card.is-locked {
  border-color: #78ceb8;
  background: #fbfffe;
  box-shadow: 0 6px 18px rgba(0, 169, 133, 0.08);
}
.modal--arch .arch-card__top {
  grid-area: title;
}
.modal--arch .arch-card__name {
  overflow: visible;
  color: #183b46;
  font-size: 0.9rem;
  white-space: normal;
}
.modal--arch .arch-card__why {
  grid-area: reason;
  color: #657984;
  font-size: 0.75rem;
  line-height: 1.4;
}
.modal--arch .arch-card__path {
  grid-area: choice;
  justify-content: flex-end;
}
.modal--arch .arch-card__path-label {
  display: none;
}
.modal--arch .arch-path {
  flex: 1;
  max-width: 250px;
  padding: 7px 12px;
  border: 1px solid #8bd6c2;
  border-radius: 9px;
  text-align: left;
}
.modal--arch .arch-card__more {
  grid-area: more;
  justify-self: stretch;
}
.modal--arch .arch-card__more summary {
  color: #536b76;
  font-weight: 600;
  text-align: right;
}
.modal--arch .arch-card__more select {
  margin-top: 7px;
  padding: 8px 10px;
}
.modal--arch .arch-card__note {
  grid-area: note;
  margin-top: 3px;
  padding: 8px 10px;
}
.modal--arch .arch-roi,
.modal--arch .arch-lint {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #dde6e8;
  border-radius: 11px;
  background: #fff;
}
.modal--arch > .modal-actions {
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 24px;
  border-top: 1px solid #e2e9eb;
  background: #fff;
  box-shadow: 0 -8px 24px rgba(20, 54, 66, 0.05);
}
.modal--arch > .modal-actions .app-btn {
  min-height: 40px;
  padding-inline: 16px;
  border-radius: 10px;
}
@media (max-width: 720px) {
  .modal-backdrop--arch {
    padding: 0;
  }
  .modal--arch {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .modal--arch .arch-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      'title'
      'reason'
      'choice'
      'more'
      'note';
  }
  .modal--arch .arch-card__path,
  .modal--arch .arch-card__more summary {
    justify-content: flex-start;
    text-align: left;
  }
  .modal--arch .arch-review__src,
  .modal--arch .arch-review__hint,
  .modal--arch .arch-shell__shortcut {
    display: none;
  }
}

/* Import from UniConecta CoE (catalog browser). */
.coe-modal-backdrop {
  padding: 10px;
}
.modal--coe {
  width: min(1760px, 96vw);
  max-width: 96vw;
  height: min(960px, 94vh);
  max-height: 94vh;
  padding: 14px 18px;
}
.coe-top-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  flex: 0 0 auto;
}
.coe-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.coe-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.coe-head__hint {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-left: 4px;
}
.coe-src {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7f8c;
  background: #e6eef0;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.coe-src--live {
  color: #04785f;
  background: #dff5ef;
}
.coe-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
  margin-bottom: 0;
}
.coe-org-select {
  flex: 0 1 260px;
  min-width: 180px;
  border: 1px solid #bccfd4;
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 0.84rem;
  color: var(--text-primary);
  background: var(--surface, #fff);
}
.coe-search {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #bccfd4;
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 0.84rem;
  color: var(--text-primary);
}
.coe-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}
@media (max-width: 900px) {
  .coe-body {
    grid-template-columns: 1fr;
  }
}
.coe-list {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 6px;
  align-content: start;
  padding-right: 4px;
}
.coe-list-item {
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  border-left: 3px solid #cdd9dd;
  background: #fff;
  cursor: pointer;
  font: inherit;
}
.coe-list-item:hover {
  border-color: #9fc8c2;
  background: #f7fbfb;
}
.coe-list-item.is-selected {
  border-left-color: var(--brand-primary);
  background: #f1fbfa;
}
.coe-list-item.is-cursor {
  box-shadow: 0 0 0 2px rgba(0, 191, 154, 0.35) inset;
}
.coe-list-item__name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.82rem;
}
.coe-list-item__org {
  font-size: 0.7rem;
  color: #6b7f8c;
}
.coe-list-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.coe-pill {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef3f4;
  color: #55697a;
  flex: none;
}
.coe-pill--ai {
  background: #eaf1fd;
  color: #2158b8;
}
.coe-pill--system {
  background: #f4f1fd;
  color: #5a3fb0;
}
.coe-empty {
  padding: var(--ds-space-5);
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
}
.coe-detail {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.coe-detail-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
  padding: var(--ds-space-5);
}
.coe-detail__header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  padding: 2px 4px;
}
.coe-detail__header-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}
.coe-detail__title {
  margin: 0;
  color: var(--brand-dark);
  font-size: 1rem;
  font-weight: 700;
}
.coe-detail__sub {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
}
.coe-detail__stats {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.coe-detail__stage {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.coe-xml {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  overflow: auto;
  background: #10262b;
  color: #d3f2ec;
  border-radius: 9px;
  padding: var(--ds-space-3);
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}
.modal--coe > .modal-actions {
  margin-top: 10px;
  padding-top: 10px;
}

/* Roteiro: the code editor field in its inspector. */
.code-field {
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  tab-size: 2;
  background: #10262b;
  color: #d3f2ec;
  border-radius: 9px;
  border: 1px solid #0b1c20;
  padding: var(--ds-space-3);
  resize: vertical;
}

/* ---------- Loading skeleton ---------- */
.skeleton-page {
  display: grid;
  gap: 14px;
}
.skeleton-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface-muted), #f7fafb, var(--surface-muted));
  background-size: 200% 100%;
  animation: vagas-shimmer 1.2s linear infinite;
}
.skeleton--title {
  width: 14rem;
  height: 30px;
  border-radius: 8px;
}
.skeleton--line {
  width: 22rem;
  max-width: 70%;
  height: 14px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.skeleton--card {
  height: 72px;
}
.skeleton--panel {
  height: 120px;
}
.skeleton--tall {
  height: 220px;
}
.list-loading {
  display: grid;
  gap: 4px;
  padding: 8px 16px 16px;
}
.list-loading__row {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line, #e6eef2);
}
.list-loading__title {
  width: 36%;
  height: 16px;
  border-radius: 6px;
}
.list-loading__line {
  width: 58%;
  height: 12px;
  border-radius: 6px;
}
.list-loading__num {
  display: inline-block;
  width: 1.75rem;
  height: 1.35rem;
  border-radius: 6px;
  vertical-align: -2px;
}

/* ---------- Segmented control (Dados: Quadro | Tabela) ---------- */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.segmented button .material-icons {
  font-size: 17px;
}
.segmented button:hover:not(.is-on) {
  color: var(--brand-dark);
}
.segmented button.is-on {
  background: white;
  color: var(--brand-dark);
  box-shadow: 0 1px 3px rgba(0, 43, 73, 0.12);
}

.assignee-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.assignee-check:has(input:checked) {
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
}

/* ============================================================
   Banco de talentos (Dados · candidatura)
   ============================================================ */
.talent-board {
  --stage-bank: #64748b;
  --stage-pre: #00a882;
  --stage-interview: #2f7fd6;
  --stage-out: #b45309;
  padding: 1rem 1.25rem 1.25rem;
  display: grid;
  gap: 14px;
}
.talent-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.talent-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.talent-stat > .material-icons {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--stage-bank);
  font-size: 20px;
}
.talent-stat--pre > .material-icons {
  background: #e3f8f1;
  color: var(--stage-pre);
}
.talent-stat--interview > .material-icons {
  background: #e6f0fc;
  color: var(--stage-interview);
}
.talent-stat--rating > .material-icons {
  background: #fff4d6;
  color: #d97706;
}
.talent-stat div {
  display: grid;
  line-height: 1.15;
}
.talent-stat strong {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
}
.talent-stat span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.talent-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.talent-tools__spacer {
  flex: 1 1 0;
}
.talent-search,
.talent-select {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 9px;
  background: white;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.talent-search:focus-within,
.talent-select:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.16);
}
.talent-search {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 22rem;
}
.talent-select {
  flex: 0 1 auto;
  min-width: 0;
}
.talent-select select {
  max-width: 12rem;
  text-overflow: ellipsis;
}
.talent-search > .material-icons,
.talent-select > .material-icons {
  position: absolute;
  left: 10px;
  font-size: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}
.talent-search input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  padding: 0 12px 0 36px;
  background: transparent;
  font-size: 0.8125rem;
  color: var(--text-primary);
}
.talent-select select {
  height: 100%;
  border: 0;
  outline: none;
  padding: 0 30px 0 34px;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.talent-saving {
  position: fixed;
  right: 5.5rem;
  bottom: 1.6rem;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-dark);
  box-shadow: 0 10px 24px rgba(0, 43, 73, 0.25);
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  animation: composer-match-in 0.15s ease-out;
}
.talent-saving__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  animation: talent-pulse 0.9s ease-in-out infinite;
}
@keyframes talent-pulse {
  50% {
    opacity: 0.3;
    transform: scale(0.7);
  }
}
.talent-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
}
.talent-filter-note {
  margin: -4px 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.talent-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(16rem, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.talent-column {
  --stage: var(--stage-bank);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 22rem;
  border-radius: 14px;
  background: var(--surface-sunken);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.talent-column--pre {
  --stage: var(--stage-pre);
}
.talent-column--interview {
  --stage: var(--stage-interview);
}
.talent-column--out {
  --stage: var(--stage-out);
}
.talent-column.is-drop {
  background: color-mix(in srgb, var(--stage) 9%, white);
  border-color: color-mix(in srgb, var(--stage) 55%, white);
  border-style: dashed;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stage) 25%, white);
}
.talent-column__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 10px;
  border-top: 3px solid var(--stage);
  border-radius: 14px 14px 0 0;
}
.talent-column__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 16px !important;
  color: var(--stage);
  background: color-mix(in srgb, var(--stage) 14%, white);
}
.talent-column__head h3 {
  flex: 1;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.talent-column__count {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: white;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--stage);
  box-shadow: 0 0 0 1px var(--line);
}
.talent-column__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 10px 12px;
}
.talent-column__empty {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 9rem;
  padding: 1rem;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.talent-column__empty .material-icons {
  font-size: 22px;
  color: var(--neutral);
}
.talent-column.is-drop .talent-column__empty {
  border-color: var(--stage);
  color: var(--stage);
}
.talent-column.is-drop .talent-column__empty .material-icons {
  color: var(--stage);
}

.talent-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0, 43, 73, 0.05);
  cursor: grab;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease, opacity 0.18s;
}
.talent-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 22px rgba(0, 43, 73, 0.1);
  transform: translateY(-1px);
}
.talent-card.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
  transform: rotate(1deg);
}
.talent-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.talent-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: white;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.talent-card__who {
  display: grid;
  min-width: 0;
  flex: 1;
}
.talent-card__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--brand-dark);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.talent-card__name:hover {
  color: var(--brand-deep);
  text-decoration: underline;
}
.talent-card__mail {
  font-size: 0.75rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.talent-prio {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: var(--surface-muted);
  color: var(--text-secondary);
}
.talent-prio--1 {
  background: #fee4e2;
  color: #b42318;
}
.talent-prio--2 {
  background: #ffedd5;
  color: #c2410c;
}
.talent-prio--3 {
  background: #fef7c3;
  color: #a15c07;
}
.talent-card__vaga {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-self: start;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 7px;
  background: var(--tint-brand-soft);
  border: 1px solid var(--tint-brand-border);
  color: var(--brand-deepest);
  font-size: 0.75rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.talent-card__vaga .material-icons {
  font-size: 14px;
}
.talent-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.talent-card__meta li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.talent-card__meta .material-icons {
  font-size: 14px;
  color: var(--neutral);
}
.talent-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.talent-card__facts > span,
.talent-card__facts > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.talent-card__facts > a {
  color: #0a66c2;
  border-color: #cfe1f5;
  background: #f1f7fd;
}
.talent-card__facts > a:hover {
  background: #e3effb;
}
.talent-card__facts .material-icons {
  font-size: 13px;
}
.talent-card__rate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.talent-stars {
  display: inline-flex;
}
.talent-stars button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--line-strong);
  border-radius: 6px;
  transition: transform 0.12s ease, color 0.12s ease;
}
.talent-stars button .material-icons {
  font-size: 19px;
}
.talent-stars button.is-on {
  color: #f59e0b;
}
.talent-stars:hover button {
  color: #f59e0b;
}
.talent-stars button:hover ~ button {
  color: var(--line-strong);
}
.talent-stars button:hover {
  transform: scale(1.15);
}
.talent-prio-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.talent-prio-pick select,
.talent-card__move {
  height: 28px;
  padding: 0 24px 0 8px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 7px;
  background-color: white;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.talent-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.talent-card__actions .app-btn--primary {
  flex: 1 1 100%;
}
.talent-card__order {
  display: inline-flex;
  gap: 2px;
}
.talent-card__order .app-btn--icon {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
}
.talent-card__move {
  flex: 1;
  min-width: 0;
}
.talent-card__actions .app-btn--primary {
  min-height: 28px;
}
.talent-card__since {
  font-size: 0.6875rem;
  color: var(--neutral);
}
.talent-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.talent-hint .material-icons {
  font-size: 16px;
  color: var(--neutral);
}
@media (max-width: 1100px) {
  .talent-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
   /vagas · página pública de candidatura
   ============================================================ */
.vagas-page {
  --pub-accent: var(--brand-primary);
  --pub-on-accent: #041018;
  --pub-ink: var(--text-primary);
  --pub-surface: #ffffff;
  --pub-radius: 10px;
  --pub-card: 18px;
  min-height: 100vh;
  background: var(--page-bg);
  padding-bottom: 4rem;
}
.vagas-hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 1.5rem 6.5rem;
  color: white;
  background:
    radial-gradient(60rem 30rem at 85% -20%, rgba(0, 191, 154, 0.35), transparent 60%),
    radial-gradient(40rem 24rem at 0% 120%, rgba(0, 182, 214, 0.25), transparent 60%),
    linear-gradient(135deg, #002b49, #013f68);
}
.vagas-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}
.vagas-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 68rem;
  margin: 0 auto;
}
.vagas-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.vagas-brand em {
  font-style: normal;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}
.vagas-brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--brand-primary);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 1.05rem;
}
.vagas-hero h1 {
  margin: 1.75rem 0 0.6rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.vagas-hero p {
  max-width: 36rem;
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}
.vagas-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(16rem, 21rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  max-width: 68rem;
  margin: -4.5rem auto 0;
  padding: 0 1.5rem;
}
.vagas-shell--narrow {
  grid-template-columns: minmax(0, 36rem);
  justify-content: center;
}
.vagas-card {
  border-radius: 18px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 43, 73, 0.14);
}

.vagas-list {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 43, 73, 0.12);
  backdrop-filter: blur(8px);
}
.vagas-list h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 4px 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.vagas-count {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--tint-brand);
  color: var(--brand-deep);
  font-size: 0.75rem;
  letter-spacing: 0;
}
.vagas-item {
  position: relative;
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 40px 14px 14px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.vagas-item:hover {
  border-color: var(--line-strong);
  box-shadow: 0 6px 16px rgba(0, 43, 73, 0.08);
}
.vagas-item.is-on {
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.14);
}
.vagas-item__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.vagas-item__area {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.vagas-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 4px;
}
.vagas-item__tags > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.vagas-item__tags .material-icons {
  font-size: 14px;
  color: var(--neutral);
}
.vagas-item__check {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--brand-primary);
}
.vagas-skeleton {
  height: 84px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface-muted), #f7fafb, var(--surface-muted));
  background-size: 200% 100%;
  animation: vagas-shimmer 1.2s linear infinite;
}
@keyframes vagas-shimmer {
  to {
    background-position: -200% 0;
  }
}
.vagas-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
}
.vagas-empty .material-icons {
  font-size: 28px;
  color: var(--neutral);
}
.vagas-empty strong {
  color: var(--brand-dark);
  font-size: 0.875rem;
}
.vagas-empty p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.vagas-form {
  display: grid;
  gap: 16px;
  padding: 28px 30px 30px;
}
.vagas-field--select-vaga {
  display: none !important;
}
.vagas-chosen {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(0, 191, 154, 0.08), rgba(0, 182, 214, 0.06)),
    white;
  border: 1px solid var(--tint-brand-border);
}
.vagas-chosen__kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-deep);
}
.vagas-chosen strong {
  font-size: 1.25rem;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
}
.vagas-chosen p {
  margin: 4px 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.vagas-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 -2px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.vagas-section .material-icons {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--tint-brand);
  color: var(--brand-deep);
  font-size: 17px;
}
.vagas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.vagas-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.vagas-field > span:first-child,
.vagas-pills legend {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.vagas-field input,
.vagas-field select,
.vagas-affix {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 10px;
  background: white;
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vagas-field input,
.vagas-field select {
  padding: 0 14px;
}
.vagas-field select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-size: 16px 16px;
  background-repeat: no-repeat;
}
.vagas-field select::-ms-expand {
  display: none;
}
.vagas-field input::placeholder {
  color: #9aa9b5;
}
.vagas-field input:focus,
.vagas-field select:focus,
.vagas-affix:focus-within {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(0, 191, 154, 0.15);
}
.vagas-affix {
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.vagas-affix > span {
  display: grid;
  place-items: center;
  padding: 0 12px;
  background: var(--surface-subtle);
  border-right: 1px solid var(--line);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.vagas-affix input {
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
}
.vagas-pills {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.vagas-pills legend {
  padding: 0;
  margin-bottom: 6px;
}
.vagas-pills__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vagas-pills label {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong-alt);
  background: white;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.vagas-pills label:hover {
  border-color: var(--brand-primary);
  color: var(--brand-dark);
}
.vagas-pills label.is-on {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 191, 154, 0.28);
}
.vagas-pills input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.vagas-pills label:has(input:focus-visible) {
  outline: 3px solid rgba(0, 191, 154, 0.35);
  outline-offset: 2px;
}
.vagas-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--surface-subtle);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.vagas-drop:hover,
.vagas-drop.is-drag {
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
}
.vagas-drop.is-set {
  border-style: solid;
  border-color: var(--tint-brand-border);
  background: var(--tint-brand-soft);
}
.vagas-drop input[type='file'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.vagas-drop:has(input:focus-visible) {
  outline: 3px solid rgba(0, 191, 154, 0.35);
  outline-offset: 2px;
}
.vagas-drop__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: white;
  color: var(--brand-primary);
  font-size: 24px !important;
  box-shadow: 0 2px 6px rgba(0, 43, 73, 0.08);
}
.vagas-drop__text {
  display: grid;
  gap: 3px;
  min-width: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.vagas-drop__text strong {
  color: var(--brand-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vagas-drop__text small {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.vagas-drop__swap {
  margin-left: auto;
  flex: none;
  padding: 6px 12px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line-strong-alt);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-dark);
}
.vagas-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--tint-error);
  color: var(--error-fg);
  font-size: 0.875rem;
  font-weight: 500;
}
.vagas-submit {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.vagas-submit .app-btn {
  min-height: 48px;
  padding: 0 28px;
  border-radius: 12px;
  font-size: 1rem;
  box-shadow: 0 8px 20px rgba(0, 191, 154, 0.3);
}
.vagas-submit .app-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 191, 154, 0.34);
}
.vagas-submit > span {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.vagas-done {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 2.5rem 2rem;
  text-align: center;
  animation: composer-match-in 0.25s ease-out;
}
.vagas-done__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--tint-brand);
  color: var(--brand-primary);
  font-size: 42px !important;
  box-shadow: 0 0 0 10px var(--tint-brand-soft);
  margin-bottom: 8px;
}
.vagas-done h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
}
.vagas-done p {
  max-width: 28rem;
  margin: 0;
  line-height: 1.6;
  color: var(--text-secondary);
}
.vagas-done__code {
  margin-top: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-muted);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.vagas-shell--single {
  grid-template-columns: minmax(0, 46rem);
  justify-content: center;
}
.vagas-page--single .vagas-hero__inner,
.vagas-page:has(.vagas-shell--single) .vagas-hero__inner {
  max-width: 46rem;
  margin-inline: auto;
}
.vagas-page--narrow .vagas-hero__inner,
.vagas-page:has(.vagas-shell--narrow) .vagas-hero__inner {
  max-width: 36rem;
  margin-inline: auto;
}
.pub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
.pub-cell {
  min-width: 0;
}
.pub-cell.is-full {
  grid-column: 1 / -1;
}
.pub-optional {
  margin-left: 6px;
  font-style: normal;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.pub-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.vagas-field textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 10px;
  background: white;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-primary);
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vagas-field textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(0, 191, 154, 0.15);
}
.vagas-field textarea::placeholder {
  color: #9aa9b5;
}
.pub-check {
  margin: 0 4px 0 -4px;
  font-size: 16px !important;
}
.pub-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.skeleton-form {
  min-height: 420px;
  background: linear-gradient(90deg, white, #f5f8fa, white);
  background-size: 200% 100%;
  animation: vagas-shimmer 1.2s linear infinite;
}
@media (max-width: 880px) {
  .pub-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .vagas-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .vagas-list {
    display: none;
  }
  .vagas-field--select-vaga {
    display: grid !important;
  }
  .vagas-form {
    padding: 22px 18px 24px;
  }
  .vagas-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .vagas-submit {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

/* Tokens the author sets on the public form. Plain drops the product
   page so a host (landing, iframe) can own the look. */
.vagas-page .vagas-card {
  background: var(--pub-surface);
  border-radius: var(--pub-card);
}
.vagas-page .vagas-field input,
.vagas-page .vagas-field select,
.vagas-page .vagas-field textarea,
.vagas-page .vagas-affix {
  border-radius: var(--pub-radius);
}
.vagas-page .vagas-field input:focus,
.vagas-page .vagas-field select:focus,
.vagas-page .vagas-field textarea:focus,
.vagas-page .vagas-affix:focus-within {
  border-color: var(--pub-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pub-accent) 22%, transparent);
}
.vagas-page .vagas-pills label.is-on {
  border-color: var(--pub-accent);
  background: var(--pub-accent);
  color: var(--pub-on-accent);
  box-shadow: none;
}
.vagas-page .vagas-brand__mark,
.vagas-page .vagas-submit .app-btn--primary,
.vagas-page .pub-btn {
  background: var(--pub-accent);
  color: var(--pub-on-accent);
}
.vagas-page .vagas-submit .app-btn--primary,
.vagas-page .pub-btn {
  border: 0;
  border-radius: var(--pub-radius);
}
.vagas-page .vagas-field > span:first-child,
.vagas-page .vagas-pills legend {
  color: var(--pub-ink);
}
.vagas-page[data-chrome='fields'] .vagas-hero {
  display: none;
}
.vagas-page[data-chrome='fields'] .vagas-shell {
  margin-top: 0;
}

.vagas-page[data-skin='plain'] {
  --pub-accent: transparent;
  --pub-on-accent: inherit;
  --pub-surface: transparent;
  --pub-ink: inherit;
  min-height: 0;
  padding-bottom: 0;
  background: transparent;
  color: var(--pub-ink);
  font-family: inherit;
}
.vagas-page[data-skin='plain'] .vagas-hero {
  padding: 0 0 1.25rem;
  color: inherit;
  background: none;
}
.vagas-page[data-skin='plain'] .vagas-hero::after,
.vagas-page[data-skin='plain'] .vagas-brand,
.vagas-page[data-skin='plain'] .vagas-submit .material-icons,
.vagas-page[data-skin='plain'] .vagas-submit > span {
  display: none;
}
.vagas-page[data-skin='plain'] .vagas-hero h1 {
  margin: 0 0 0.4rem;
  color: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0;
}
.vagas-page[data-skin='plain'] .vagas-hero p {
  color: inherit;
  opacity: 0.72;
  font-size: 1rem;
}
.vagas-page[data-skin='plain'] .vagas-shell {
  margin-top: 0;
  padding: 0;
}
.vagas-page[data-skin='plain'] .vagas-card,
.vagas-page[data-skin='plain'] .vagas-list {
  background: var(--pub-surface, transparent);
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.vagas-page[data-skin='plain'] .vagas-form {
  padding: 0;
  gap: 14px;
}
.vagas-page[data-skin='plain'] .vagas-field input,
.vagas-page[data-skin='plain'] .vagas-field select,
.vagas-page[data-skin='plain'] .vagas-field textarea,
.vagas-page[data-skin='plain'] .vagas-affix {
  background-color: transparent;
  color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  box-shadow: none;
}
.vagas-page[data-skin='plain'] .vagas-field select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.vagas-page[data-skin='plain'] .vagas-pills label {
  background: transparent;
  color: inherit;
  border-radius: var(--pub-radius);
}
.vagas-page[data-skin='plain'] .vagas-drop {
  background: transparent;
  color: inherit;
  border-radius: var(--pub-radius);
}
.vagas-page[data-skin='plain'] .vagas-submit {
  padding-top: 4px;
  border-top: 0;
}
.vagas-page .pub-btn {
  min-height: 44px;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.vagas-page[data-skin='plain'] .pub-btn {
  box-shadow: none;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
}
html:has(body > .vagas-page[data-skin='plain']),
html:has(body > .vagas-page[data-skin='plain']) body {
  background: transparent;
}

.pub-stage {
  display: grid;
  gap: 8px;
}
.pub-stage > p {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.pub-look.vagas-page {
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.pub-look.vagas-page[data-skin='flow'] {
  background:
    radial-gradient(20rem 10rem at 90% 0%, rgba(0, 191, 154, 0.2), transparent 60%),
    #f4f7f8;
}
.pub-look .vagas-hero {
  padding: 0.25rem 0.25rem 1.5rem;
}
.pub-look .vagas-hero h1 {
  margin-top: 0.6rem;
  font-size: 1.35rem;
}
.pub-look .vagas-shell {
  margin-top: -0.75rem;
  padding: 0;
}
.pub-look .vagas-form {
  padding: 16px;
}
.pub-look[data-skin='plain'] {
  background:
    linear-gradient(135deg, rgba(0, 224, 176, 0.16), transparent 42%),
    #102833;
  color: #f4fffb;
}
.pub-look[data-skin='plain'] .vagas-form {
  padding: 0;
}

.public-link__skins {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.public-link__skins button {
  display: grid;
  gap: 4px;
  padding: 12px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
}
.public-link__skins button.is-on {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.16);
}
.public-link__skins strong {
  font-size: 0.875rem;
  color: var(--brand-dark);
}
.public-link__skins small {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
}
.public-link__tokens {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.public-link__color {
  display: flex;
  align-items: center;
  gap: 8px;
}
.public-link__color input[type='color'] {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.public-link__color input[type='text'] {
  min-width: 0;
  flex: 1;
}
.fb-look {
  display: flex;
  gap: 8px;
  padding: var(--ds-space-5) var(--ds-space-5) 0;
}
.fb-look button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.8125rem;
}
.fb-look button.is-on {
  background: var(--brand-dark);
  color: white;
  border-color: var(--brand-dark);
}

/* ------------------------------------------------------------------
   Link público (canvas start step and Formulários editor)
   ------------------------------------------------------------------ */
.public-link {
  display: grid;
  gap: 12px;
  margin-top: var(--ds-space-4, 16px);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-subtle);
}
.public-link__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.public-link__head strong {
  font-size: 0.875rem;
  color: var(--brand-dark);
}
.public-link__head p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-secondary);
}
.public-link__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--tint-brand);
  color: var(--brand-deep);
  font-size: 18px !important;
}
.public-link__url {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.public-link__url code {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--brand-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.public-link .field-hint {
  margin: -4px 0 0;
}
.public-link__texts summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-dark);
}
.public-link__texts[open] summary {
  margin-bottom: 10px;
}
.public-link__texts textarea {
  width: 100%;
  resize: vertical;
}
.public-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tint-brand);
  color: var(--brand-deep);
  font-size: 0.6875rem;
  font-weight: 700;
  vertical-align: middle;
}
.public-chip .material-icons {
  font-size: 13px;
}
.form-templates {
  display: grid;
  gap: 10px;
}
.form-templates__row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 10px;
}
.form-template {
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.form-template:hover {
  border-color: var(--line-strong);
  box-shadow: 0 6px 16px rgba(0, 43, 73, 0.08);
}
.form-template.is-on {
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.14);
}
.form-template .material-icons {
  font-size: 20px;
  color: var(--brand-primary);
}
.form-template strong {
  font-size: 0.875rem;
  color: var(--brand-dark);
}
.form-template small {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.sys-composer {
  display: grid;
  gap: 12px;
}
.sys-composer__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.sys-composer__row {
  display: flex;
  gap: 10px;
}
.sys-composer__row input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 10px;
  font-size: 0.9375rem;
}
.sys-paste summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-dark);
}
.sys-paste textarea {
  width: 100%;
  resize: vertical;
  font-family: inherit;
}
.sys-draft {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.sys-draft__head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
}
.sys-draft__head strong {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--brand-dark);
}
.sys-row {
  border-top: 1px solid var(--line);
}
.sys-row__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 20px;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.sys-row__head:hover {
  background: var(--canvas);
}
.sys-row__head .attention-icon {
  background: var(--tint-brand);
  color: var(--brand-deep);
}
.sys-row__title {
  min-width: 0;
}
.sys-row__head h3 {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--brand-dark);
}
.sys-row__head p {
  margin: 2px 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.sys-row__head p code {
  font-size: 0.75rem;
}
.sys-row__chev {
  color: var(--text-secondary);
  font-size: 22px;
}
.sys-row__body {
  display: grid;
  gap: 12px;
  padding: 4px 20px 18px;
}
.sys-row__body > .segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}
.sys-row__body > .segmented button {
  justify-content: center;
}
.sys-mode {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--canvas);
  border: 1px solid var(--line);
}
.sys-mode.is-live {
  background: var(--tint-brand-soft);
  border-color: var(--tint-brand-border);
}
.sys-mode .material-icons {
  color: var(--brand-deep);
}
.sys-mode strong {
  display: block;
  font-size: 0.875rem;
  color: var(--brand-dark);
}
.sys-mode p {
  margin: 2px 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.sys-sections {
  display: grid;
  gap: 10px;
}
.sys-section,
.sys-fold {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.sys-section {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.sys-section h4,
.sys-fold summary {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.sys-section .property-group {
  margin: 0;
}
.sys-fold summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--brand-dark);
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.875rem;
}
.sys-fold[open] summary {
  border-bottom: 1px solid var(--line);
}
.sys-section__body {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.sys-address {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.sys-address span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.sys-address code {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sys-ops {
  display: grid;
  gap: 6px;
}
.sys-ops button {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: left;
  font-size: 0.8125rem;
  color: var(--brand-dark);
}
.sys-ops button em {
  min-width: 3.4rem;
  font-style: normal;
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.sys-ops button.is-on {
  border-color: var(--brand-primary);
  background: var(--tint-brand);
}
.sys-test-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 12px;
}
.sys-test-fields label {
  display: grid;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.sys-test-fields input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong-alt);
  border-radius: 8px;
  font-weight: 400;
  font-size: 0.875rem;
}
.sys-optional summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-dark);
}
.sys-optional .sys-test-fields {
  margin-top: 12px;
}
.sys-actions {
  display: flex;
  gap: 8px;
}
.sys-log {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.sys-call {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
}
.sys-call:first-child {
  border-top: 0;
}
.sys-call strong.ok {
  color: var(--success-fg);
}
.sys-call strong.warn {
  color: var(--warning-fg);
}
.sys-call strong.bad {
  color: var(--error-fg);
}
.sys-call strong {
  min-width: 2.4rem;
}
.sys-call em {
  min-width: 2.6rem;
  font-style: normal;
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}
.sys-call span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sys-call time {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.sys-questions {
  display: grid;
  gap: 10px;
}
@media (max-width: 720px) {
  .sys-composer__row {
    flex-direction: column;
  }
  .sys-row__head,
  .sys-row__body {
    padding-left: 14px;
    padding-right: 14px;
  }
  .sys-row__body > .segmented {
    grid-template-columns: 1fr;
  }
}
.vagas-done__icon.pub-missing {
  background: var(--surface-muted);
  color: var(--text-secondary);
}

/* ============================================================
   Densidade e acabamento (revisão de UI/UX)
   Uma camada só, no fim do arquivo, para que as telas falem a mesma
   língua visual: menu compacto com modo trilho, cabeçalho de página
   enxuto, indicadores menores e um painel de status em faixa, não em
   banner. Mobile: indicadores em duas colunas, sem uma tela por número.
   ============================================================ */

/* ---------- menu lateral: mais denso, cabe sem rolar ---------- */
.app-sidebar-inner {
  padding: 0.6rem 0.6rem 0.5rem;
}
.app-nav-section--spaced {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
}
.app-nav-section-title {
  margin: 0 0 0.15rem;
  padding: 0.2rem 0.4rem;
}
.app-nav-section-title-icon {
  display: none;
}
.app-nav-section-title-text {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgb(120, 134, 155);
}
.app-nav-section-list {
  gap: 1px;
}
.app-nav-link {
  gap: 10px;
  padding: 5px 9px;
  min-height: 2rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  white-space: nowrap;
}
.app-nav-link-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-nav-link-icon {
  font-size: 1.1rem !important;
}
.app-sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 4px;
  padding-top: 6px;
}
.app-sidebar-brand {
  font-size: 0.6875rem;
  color: var(--neutral);
  white-space: nowrap;
}
.app-rail-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
}
.app-rail-btn:hover {
  background: rgb(241, 245, 249);
  color: var(--brand-dark);
}
.app-rail-btn .material-icons {
  font-size: 1.1rem;
}
.app-rail-btn__label {
  display: none;
}
@media (max-width: 1023px) {
  .app-rail-btn {
    display: none;
  }
}

/* modo trilho (só desktop): ícones, com o nome no tooltip */
@media (min-width: 1024px) {
  .app-sidebar {
    transition: width 0.18s ease;
  }
  #app-rail-toggle:checked ~ .app-below-header .app-sidebar {
    width: 3.5rem;
  }
  #app-rail-toggle:checked ~ .app-below-header .app-sidebar-inner {
    padding-inline: 0.5rem;
  }
  #app-rail-toggle:checked ~ .app-below-header .app-nav-section-title,
  #app-rail-toggle:checked ~ .app-below-header .app-nav-link-label,
  #app-rail-toggle:checked ~ .app-below-header .app-sidebar-brand {
    display: none;
  }
  #app-rail-toggle:checked ~ .app-below-header .app-nav-link {
    justify-content: center;
    padding-inline: 0;
  }
  #app-rail-toggle:checked ~ .app-below-header .app-sidebar-footer {
    justify-content: center;
  }
}

/* ---------- página: cabeçalho enxuto, mesma largura em todas ---------- */
.page {
  padding: 1rem 1.5rem 3rem;
}
.page--inbox,
.page--narrow {
  max-width: none;
  margin-inline: 0;
}
.page-header {
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
}
.page-header h1 {
  font-size: 1.375rem;
}
.page-header p {
  margin-top: 2px;
  max-width: 80ch;
  font-size: 0.8125rem;
}
.page-header .app-btn {
  white-space: nowrap;
}

/* ---------- números de topo (summary-card) ---------- */
.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 0.625rem;
  margin-bottom: 1rem;
}
.summary-card {
  min-height: 0;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  box-shadow: none;
}
.summary-card .material-icons {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  font-size: 1.05rem;
}
.summary-card strong {
  font-size: 1.125rem;
}

/* ---------- painéis e estados vazios ---------- */
.panel {
  border-radius: 10px;
}
.panel-head {
  padding: 0.65rem 1rem;
}
.panel-head h2 {
  font-size: 0.9375rem;
}
.empty-state {
  padding: 1.5rem 1.25rem;
  font-size: 0.875rem;
}
.empty-state strong {
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}
.empty-state p {
  margin: 0 auto;
  max-width: 60ch;
}

/* ---------- painel de status: faixa, não banner ---------- */
.flow-dashboard {
  gap: 0.875rem;
}
.dashboard-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1.25rem;
  min-height: 0;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgb(0 43 73 / 0.12);
}
.dashboard-hero__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.16);
  color: #7ff4df;
}
.dashboard-hero--danger .dashboard-hero__icon {
  color: #ffb4b9;
}
.dashboard-hero--warning .dashboard-hero__icon {
  color: #fcd38a;
}
.dashboard-hero__icon .material-icons {
  font-size: 1.4rem;
}
.dashboard-hero__content {
  min-width: 0;
  max-width: none;
}
.dashboard-hero__eyebrow {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.66rem;
}
.dashboard-hero h2 {
  max-width: none;
  margin: 0.15rem 0 0;
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.dashboard-hero__content > p {
  max-width: none;
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
}
.dashboard-hero__stats {
  display: flex;
  gap: 0.375rem;
  margin: 0;
}
.dashboard-hero__stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: center;
  min-width: 5.25rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.06);
}
.dashboard-hero__stat dd {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.dashboard-hero__stat--primary dd {
  font-size: 1.5rem;
  color: #7ff4df;
}
.dashboard-hero--danger .dashboard-hero__stat--primary dd {
  color: #ffb4b9;
}
.dashboard-hero--warning .dashboard-hero__stat--primary dd {
  color: #fcd38a;
}
.dashboard-hero__stat dt {
  color: rgb(226 242 247 / 0.7);
  font-size: 0.66rem;
  font-weight: 600;
  white-space: nowrap;
}
.dashboard-hero__button {
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  white-space: nowrap;
}
.dashboard-hero__button:hover {
  background: #a6f8ea;
}
.dashboard-live-row {
  gap: 0.6rem;
  margin-top: -0.25rem;
}
.dashboard-trend--muted {
  font-weight: 500;
}
.status-pill--off {
  opacity: 0.8;
}
.dashboard-section-head h3 {
  font-size: 0.95rem;
}
.dashboard-section-head > div > span {
  display: none;
}
.dashboard-section-head__note {
  color: var(--text-secondary);
}

/* ---------- indicadores (stat-tile) ---------- */
.agent-kpi-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 0.625rem;
}
.stat-tile {
  align-items: center;
  gap: 0.7rem;
  min-height: 0;
  padding: 0.75rem 0.875rem;
  border-radius: 10px;
  box-shadow: none;
}
.stat-tile:hover {
  transform: none;
  box-shadow: 0 4px 12px rgb(15 55 75 / 0.08);
}
.stat-tile__icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  flex-shrink: 0;
}
.stat-tile__icon .material-icons {
  font-size: 1.1rem;
}
.stat-tile__body {
  min-width: 0;
}
.stat-tile__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.66rem;
}
.stat-tile__value {
  font-size: 1.35rem;
  line-height: 1.15;
}
.stat-tile__hint {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
}
.dashboard-quality-strip {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 0.625rem;
  overflow: visible;
  border: 0;
  background: none;
}
.dashboard-quality-strip .stat-tile {
  min-height: 0;
  border: 1px solid #dfeaec;
  border-radius: 10px;
}
.dashboard-panel {
  border-radius: 12px;
}

@media (max-width: 1100px) {
  .dashboard-hero {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .dashboard-hero__stats {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .dashboard-hero__stat {
    flex: 1;
  }
  .dashboard-hero__button {
    grid-column: 3;
    grid-row: 1;
  }
}
@media (max-width: 960px) {
  .dashboard-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .dashboard-hero__button {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: center;
  }
}

/* ---------- mobile ---------- */
@media (max-width: 720px) {
  .page {
    padding: 0.75rem 0.75rem 2.5rem;
  }
  .page-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
  }
  .page-header h1 {
    font-size: 1.2rem;
  }
  .page-header > .header-actions {
    flex-wrap: wrap;
  }
  .summary-grid,
  .summary-grid--compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  .summary-card,
  .summary-grid--compact .summary-card {
    grid-template-columns: minmax(0, 1fr);
    width: auto;
    min-width: 0;
    padding: 0.55rem 0.65rem;
  }
  .summary-card .material-icons {
    display: none;
  }
  .summary-card span {
    font-size: 0.6875rem;
  }
  .agent-kpi-grid,
  .dashboard-quality-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .stat-tile {
    padding: 0.6rem 0.7rem;
  }
  .stat-tile__icon {
    display: none;
  }
  .stat-tile__value {
    font-size: 1.2rem;
  }
  .dashboard-hero {
    gap: 0.75rem;
    padding: 0.875rem;
  }
  .dashboard-hero__icon {
    width: 2.25rem;
    height: 2.25rem;
  }
  .dashboard-hero h2 {
    font-size: 1rem;
  }
  .dashboard-hero__stat {
    min-width: 0;
    padding: 0.4rem 0.55rem;
  }
  .dashboard-section-head__note {
    display: none;
  }
  .panel-head {
    padding: 0.6rem 0.75rem;
  }
}

/* status "ao vivo" sobre fundo claro (cabeçalho e linha do painel) */
.page-header .status-pill,
.dashboard-live-row .status-pill {
  padding: 4px 9px;
  border-color: var(--tint-brand-border);
  background: var(--tint-brand-soft);
  color: var(--brand-deepest);
}
.page-header .status-pill--off,
.dashboard-live-row .status-pill--off {
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--text-secondary);
}
.dashboard-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}
.dashboard-panel {
  padding: 0.875rem 1rem;
  border-radius: 12px;
  box-shadow: none;
}
.dashboard-panel__head {
  margin-bottom: 0.6rem;
}
.dashboard-grid,
.dashboard-split {
  gap: 0.75rem;
}
.dash-weeks {
  min-height: 6.5rem;
}
.dash-week__cols {
  height: 5.25rem;
}
.dash-donut {
  width: 5.75rem;
  height: 5.75rem;
}
@media (min-width: 1280px) {
  .dashboard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .dashboard-grid .dash-mix {
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard-grid .dash-donut {
    align-self: center;
  }
}
@media (max-width: 720px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.stat-tile__label,
.stat-tile__hint {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}
.stat-tile__label {
  line-height: 1.25;
}
.dash-mix-list li,
.dash-items li a,
.dash-activity li,
.dash-ranks li,
.dash-aging li,
.dash-empty,
.dash-mix-list {
  font-size: 0.8125rem;
}
.app-nav-link {
  min-height: 1.875rem;
  padding-block: 4px;
}
.app-nav-section--spaced {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}
.panel.sys-composer {
  gap: 10px;
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
}
.sys-composer__row input {
  height: 40px;
}
.sys-composer__row .app-btn {
  height: 40px;
}
.home-composer-chips:empty {
  display: none;
}

/* Calendário: mês à esquerda, expediente e feriados à direita */
.cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
  gap: 1rem;
  align-items: start;
}
.cal-side {
  display: grid;
  gap: 1rem;
  min-width: 0;
}
.cal-layout .panel {
  margin: 0;
}
@media (max-width: 1100px) {
  .cal-layout {
    grid-template-columns: 1fr;
  }
}
.cal-side .cal-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
.cal-side .cal-form label,
.cal-side .cal-form input,
.cal-side .cal-form .app-btn {
  width: 100%;
  min-width: 0;
}
.cal-side .cal-form .app-btn {
  justify-content: center;
}
.app-nav-link {
  min-height: 1.75rem;
  padding-block: 3px;
}
.app-nav-section-title {
  margin-bottom: 0;
}
.dashboard-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}
/* Sugestões do Sistemas: o chip da Início é branco para fundo navy - aqui o
 * painel é branco, e os seis atalhos sumiam na tela. */
.sys-composer .home-composer-chips {
  margin-top: 0;
}
.sys-composer .home-composer-chips button {
  border-color: var(--tint-brand-border);
  background: var(--tint-brand-soft);
  color: var(--brand-deepest);
}
.sys-composer .home-composer-chips button:hover:not(:disabled) {
  border-color: var(--brand-primary);
  background: var(--tint-brand);
}
.panel > .form-templates__row {
  padding: 0.75rem 1rem;
}
/* Carga da equipe: nome e área colavam na mesma linha ("Camila AlvesQualidade"). */
.dash-team {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 0.5rem;
}
.dash-team article {
  display: grid;
  gap: 1px;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
}
.dash-team strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
}
.dash-team span {
  color: var(--text-secondary);
  font-size: 0.72rem;
}
.dash-team b {
  margin-top: 0.2rem;
  font-size: 1.2rem;
}
.dash-team small {
  font-size: 0.7rem;
}

/* ── BPMN × UniFlow Architecture Review Studio ─────────────────────── */
.studio-modal-backdrop {
  z-index: 95;
  padding: 8px;
}
.modal.modal--studio {
  width: min(1840px, 98vw);
  max-width: 98vw;
  height: min(1020px, 95vh);
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.35);
}
.studio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  flex: 0 0 auto;
}
.studio-head__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.studio-head__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--tint-brand);
  color: var(--brand-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.studio-head__eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.studio-coverage-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
.studio-coverage-pill .material-icons {
  font-size: 0.875rem;
}
.studio-source-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.65rem;
  font-weight: 700;
}
.studio-head__title {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.studio-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.studio-tab .material-icons {
  font-size: 1rem;
}
.studio-tab:hover {
  color: #0f172a;
}
.studio-tab.is-active {
  background: #ffffff;
  color: var(--brand-deep);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

/* KPI Strip */
.studio-kpi-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.studio-kpi-bar__score {
  display: flex;
  align-items: center;
  gap: 10px;
}
.studio-kpi-bar__pct {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 0.75rem;
  color: #475569;
}
.studio-kpi-bar__pct strong {
  font-size: 1rem;
  font-weight: 800;
  color: #047857;
}
.studio-kpi-bar__meter {
  width: 110px;
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.studio-kpi-bar__meter span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #0284c7);
}
.studio-kpi-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.studio-kpi-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.studio-kpi-chip .material-icons {
  font-size: 0.92rem;
}
.studio-kpi-chip.is-active {
  box-shadow: 0 0 0 2px #0f172a;
}
.studio-kpi-chip.tone--n8n {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}
.studio-kpi-chip.tone--roberty {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.studio-kpi-chip.tone--human {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}
.studio-kpi-chip.tone--gate {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}
.studio-kpi-chip.tone--agent {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}
.studio-kpi-bar__policy {
  font-size: 0.72rem;
  color: #64748b;
}

/* Moves Strip */
.studio-moves-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 20px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  font-size: 0.75rem;
  color: #78350f;
  flex: 0 0 auto;
}
.studio-move-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.studio-move-pill {
  padding: 1px 7px;
  border-radius: 6px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  font-weight: 700;
  font-size: 0.68rem;
}

/* Split Visual Body */
.studio-visual-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f1f5f9;
}
.studio-split-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 8px 12px;
}
.studio-split-grid--bpmn,
.studio-split-grid--flow {
  grid-template-columns: 1fr;
}
@media (max-width: 980px) {
  .studio-split-grid {
    grid-template-columns: 1fr;
  }
}

/* Diagram Shell (BPMN & Flow Preview) */
.studio-diagram-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  flex: 1 1 auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.studio-diagram-shell.is-compact {
  flex: 1 1 auto;
  height: 100%;
  min-height: 360px;
  margin-top: 0;
}
.studio-diagram-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex: 0 0 auto;
}
.studio-diagram-toolbar__left,
.studio-diagram-toolbar__right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.studio-pane-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}
.studio-pane-badge .material-icons {
  font-size: 0.9rem;
}
.studio-pane-badge--bpmn {
  background: #e0f2fe;
  color: #0369a1;
}
.studio-pane-badge--flow {
  background: #d1fae5;
  color: #047857;
}
.studio-diagram-meta {
  font-size: 0.7rem;
  color: #64748b;
}
.studio-zoom-btn {
  height: 24px;
  min-width: 24px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.studio-zoom-btn:hover {
  background: #f1f5f9;
}
.studio-zoom-readout {
  font-size: 0.7rem;
  font-weight: 600;
  color: #475569;
  min-width: 36px;
  text-align: center;
}
.studio-diagram-viewport {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
  cursor: grab;
  background-color: #f8fafc;
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 18px 18px;
  user-select: none;
}
.studio-diagram-viewport:active {
  cursor: grabbing;
}
.studio-diagram-canvas {
  position: absolute;
  top: 0;
  left: 0;
}
.studio-diagram-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* Swimlanes */
.studio-swimlane {
  position: absolute;
  border-top: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  border-radius: 8px;
  z-index: 1;
  pointer-events: none;
}
.studio-swimlane__header {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 42px;
  border-right: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
}
.studio-swimlane__title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  max-height: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* BPMN Nodes inside Swimlane Diagram */
.studio-bpmn-node {
  position: absolute;
  z-index: 3;
  background: #ffffff;
  border: 2px solid #1e40af;
  border-radius: 10px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.studio-bpmn-node:hover,
.studio-bpmn-node.is-hovered {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.22);
  border-color: #0d9488;
}
.studio-bpmn-node.is-selected {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.28), 0 8px 20px rgba(15, 23, 42, 0.14);
}
.studio-bpmn-node.shape--start {
  border-color: #059669;
  background: #ecfdf5;
  border-radius: 999px;
  padding: 6px 12px;
}
.studio-bpmn-node.shape--end {
  border-color: #0f172a;
  border-width: 3px;
  background: #f8fafc;
  border-radius: 999px;
  padding: 6px 12px;
}
.studio-bpmn-node.shape--endError {
  border-color: #dc2626;
  border-width: 3px;
  background: #fef2f2;
  border-radius: 999px;
  padding: 6px 12px;
}
.studio-bpmn-node.shape--gateway,
.studio-bpmn-node.shape--parallel {
  border-color: #d97706;
  background: #fffbeb;
  border-style: solid;
}
.studio-bpmn-node.shape--wait {
  border-color: #2563eb;
  border-style: double;
  border-width: 3px;
  background: #eff6ff;
}
.studio-bpmn-node.shape--subflow {
  border-color: #6d28d9;
  border-width: 2.5px;
  background: #f5f3ff;
}
.studio-bpmn-node__top {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.studio-bpmn-node__num {
  font-size: 0.62rem;
  font-weight: 800;
  color: #64748b;
}
.studio-bpmn-node__icon .material-icons {
  font-size: 0.85rem;
  color: #1e40af;
}
.studio-bpmn-node.shape--gateway .studio-bpmn-node__icon .material-icons {
  color: #d97706;
}
.studio-bpmn-node.shape--start .studio-bpmn-node__icon .material-icons {
  color: #059669;
}
.studio-bpmn-node.shape--endError .studio-bpmn-node__icon .material-icons {
  color: #dc2626;
}
.studio-bpmn-node__lane-tag {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.studio-bpmn-node__note-dot {
  margin-left: auto;
  color: #d97706;
}
.studio-bpmn-node__note-dot .material-icons {
  font-size: 0.8rem;
}
.studio-bpmn-node__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.studio-bpmn-node__target {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  align-self: flex-start;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
}
.studio-bpmn-node__target .material-icons {
  font-size: 0.72rem;
}

/* Proposed Flow Nodes inside Right-hand Preview */
.studio-flow-node {
  position: absolute;
  z-index: 3;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.studio-flow-node:hover,
.studio-flow-node.is-hovered {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.22);
  border-color: #0d9488;
}
.studio-flow-node.is-selected {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.28), 0 8px 20px rgba(15, 23, 42, 0.14);
}
.studio-flow-node.tone--n8n {
  border-left: 5px solid #4f46e5;
}
.studio-flow-node.tone--roberty {
  border-left: 5px solid #d97706;
}
.studio-flow-node.tone--human {
  border-left: 5px solid #16a34a;
}
.studio-flow-node.tone--decision {
  border-left: 5px solid #0d9488;
}
.studio-flow-node.tone--gate {
  border-left: 5px solid #0284c7;
}
.studio-flow-node.tone--agent {
  border-left: 5px solid #7c3aed;
}
.studio-flow-node.tone--start {
  border-left: 5px solid #059669;
  background: #f0fdf4;
}
.studio-flow-node.tone--end {
  border-left: 5px solid #334155;
  background: #f8fafc;
}
.studio-flow-node.tone--end-reject {
  border-left: 5px solid #dc2626;
  background: #fef2f2;
}
.studio-flow-node__head {
  display: flex;
  align-items: center;
  gap: 5px;
}
.studio-flow-node__icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.studio-flow-node__icon .material-icons {
  font-size: 0.85rem;
}
.studio-flow-node__badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-flow-node__title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.22;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.studio-flow-node__owner {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.62rem;
  font-weight: 600;
  color: #475569;
}
.studio-flow-node__owner .material-icons {
  font-size: 0.72rem;
}

/* Tone colors shared across badges and pills */
.tone--n8n {
  background: #eef2ff;
  color: #4338ca;
}
.tone--roberty {
  background: #fffbeb;
  color: #b45309;
}
.tone--human {
  background: #f0fdf4;
  color: #15803d;
}
.tone--decision {
  background: #ccfbf1;
  color: #0f766e;
}
.tone--gate,
.tone--wait,
.tone--notify {
  background: #e0f2fe;
  color: #0369a1;
}
.tone--agent,
.tone--subflow {
  background: #f3e8ff;
  color: #6d28d9;
}
.tone--start {
  background: #d1fae5;
  color: #065f46;
}
.tone--end {
  background: #e2e8f0;
  color: #334155;
}
.tone--end-reject {
  background: #fee2e2;
  color: #b91c1c;
}

/* Bottom Selected-Step Dock in Visual Studio */
.studio-step-dock {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto minmax(340px, 1.45fr);
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: #ffffff;
  border-top: 1px solid #cbd5e1;
}
@media (max-width: 1024px) {
  .studio-step-dock {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .studio-step-dock__arrow {
    display: none;
  }
}
.studio-step-dock__nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.studio-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.studio-nav-btn:hover {
  background: #e2e8f0;
}
.studio-step-dock__counter {
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}
.studio-step-dock__bpmn,
.studio-step-dock__flow {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.studio-step-dock__label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.studio-step-dock__label .material-icons {
  font-size: 0.88rem;
}
.studio-lane-pill {
  padding: 1px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: none;
}
.studio-bpmn-kind-pill {
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: none;
}
.studio-step-dock__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-step-dock__note {
  font-size: 0.72rem;
  color: #92400e;
  background: #fffbeb;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-step-dock__arrow {
  color: #94a3b8;
  display: flex;
  align-items: center;
}
.studio-step-dock__flow-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.studio-step-dock__why {
  font-size: 0.74rem;
  color: #334155;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.studio-step-dock__choices {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.studio-choice-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}
.studio-choice-pill .material-icons {
  font-size: 0.9rem;
}
.studio-choice-pill:hover:not(:disabled) {
  border-color: #0d9488;
}
.studio-choice-pill.is-selected {
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.18);
  font-weight: 700;
}
.studio-choice-pill__rec {
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.08);
  text-transform: uppercase;
}
.studio-more-select {
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.73rem;
  font-weight: 600;
}

/* Tab 2: Table De -> Para */
.studio-table-body,
.studio-insights-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 20px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.studio-table-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.studio-table-filters__group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.studio-mapping-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.studio-map-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(380px, 1.35fr);
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.studio-map-row:hover,
.studio-map-row.is-selected {
  border-color: #0d9488;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.1);
}
.studio-map-row.is-locked {
  border-left: 4px solid #0d9488;
}
.studio-map-row__bpmn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.studio-map-row__idx {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  padding-top: 2px;
}
.studio-map-row__bpmn-info {
  min-width: 0;
}
.studio-map-row__bpmn-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
  color: #0f172a;
}
.studio-map-row__note {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: #92400e;
}
.studio-map-row__arrow {
  color: #94a3b8;
}
.studio-map-row__flow {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.studio-map-row__controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.studio-map-row__why {
  margin: 0;
  font-size: 0.75rem;
  color: #475569;
}

/* Tab 3: Insights */
.studio-insights-section h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: #0f172a;
}
.studio-roi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.studio-roi-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.studio-roi-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
}
.studio-roi-card__pills {
  display: flex;
  gap: 6px;
}
.studio-lint-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
}
.studio-footer {
  padding: 10px 18px;
  background: #ffffff;
  border-top: 1px solid var(--line);
  margin-top: 0;
  flex: 0 0 auto;
}
.coe-detail__preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

/* ── bpmn.io viewer (same engine as UniConecta CoE) ─────────────────── */
.bpmnio-shell {
  min-height: 0;
}
.bpmnio-shell.is-compact {
  flex: 1 1 auto;
  height: 100%;
  min-height: 380px;
}
.bpmnio-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #ffffff;
}
.bpmnio-host {
  position: absolute;
  inset: 0;
}
.bpmnio-host .djs-container {
  font-family: Arial, sans-serif;
}
.bpmnio-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #475569;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.85);
  z-index: 5;
}
.bpmnio-overlay--error {
  color: #b91c1c;
}
.bpmnio-spin {
  animation: bpmnioSpin 1s linear infinite;
}
@keyframes bpmnioSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Shared tone palette: identical colour on BPMN shape and UniFlow block */
.uf-ov-tone-n8n,
.uf-fill-n8n {
  --uf-c: #4f46e5;
  --uf-bg: #e0e7ff;
}
.uf-ov-tone-roberty,
.uf-fill-roberty {
  --uf-c: #d97706;
  --uf-bg: #fef3c7;
}
.uf-ov-tone-human,
.uf-fill-human {
  --uf-c: #16a34a;
  --uf-bg: #dcfce7;
}
.uf-ov-tone-decision,
.uf-fill-decision {
  --uf-c: #0d9488;
  --uf-bg: #ccfbf1;
}
.uf-ov-tone-gate,
.uf-fill-gate {
  --uf-c: #0284c7;
  --uf-bg: #e0f2fe;
}
.uf-ov-tone-wait,
.uf-fill-wait {
  --uf-c: #0891b2;
  --uf-bg: #cffafe;
}
.uf-ov-tone-notify,
.uf-fill-notify {
  --uf-c: #db2777;
  --uf-bg: #fce7f3;
}
.uf-ov-tone-agent,
.uf-fill-agent {
  --uf-c: #9333ea;
  --uf-bg: #f3e8ff;
}
.uf-ov-tone-subflow,
.uf-fill-subflow {
  --uf-c: #c026d3;
  --uf-bg: #fae8ff;
}
.uf-ov-tone-start,
.uf-fill-start {
  --uf-c: #475569;
  --uf-bg: #f8fafc;
}
.uf-ov-tone-end,
.uf-fill-end,
.uf-ov-tone-end-reject,
.uf-fill-end-reject {
  --uf-c: #334155;
  --uf-bg: #f1f5f9;
}

/* Colour BPMN shapes by the UniFlow block that executes them */
.uf-bpmn .djs-element.uf-t-n8n > .djs-visual > :first-child {
  fill: #e0e7ff !important;
  stroke: #4f46e5 !important;
  stroke-width: 2.5px !important;
}
.uf-bpmn .djs-element.uf-t-roberty > .djs-visual > :first-child {
  fill: #fef3c7 !important;
  stroke: #d97706 !important;
  stroke-width: 2.5px !important;
}
.uf-bpmn .djs-element.uf-t-human > .djs-visual > :first-child {
  fill: #dcfce7 !important;
  stroke: #16a34a !important;
  stroke-width: 2.5px !important;
}
.uf-bpmn .djs-element.uf-t-decision > .djs-visual > :first-child {
  fill: #ccfbf1 !important;
  stroke: #0d9488 !important;
  stroke-width: 2.5px !important;
}
.uf-bpmn .djs-element.uf-t-gate > .djs-visual > :first-child {
  fill: #e0f2fe !important;
  stroke: #0284c7 !important;
  stroke-width: 2.5px !important;
}
.uf-bpmn .djs-element.uf-t-wait > .djs-visual > :first-child {
  fill: #cffafe !important;
  stroke: #0891b2 !important;
  stroke-width: 2.5px !important;
}
.uf-bpmn .djs-element.uf-t-notify > .djs-visual > :first-child {
  fill: #fce7f3 !important;
  stroke: #db2777 !important;
  stroke-width: 2.5px !important;
}
.uf-bpmn .djs-element.uf-t-agent > .djs-visual > :first-child {
  fill: #f3e8ff !important;
  stroke: #9333ea !important;
  stroke-width: 2.5px !important;
}
.uf-bpmn .djs-element.uf-t-subflow > .djs-visual > :first-child {
  fill: #fae8ff !important;
  stroke: #c026d3 !important;
  stroke-width: 2.5px !important;
}

.uf-bpmn .djs-element.uf-marked {
  cursor: pointer;
}
.uf-bpmn .djs-element.uf-hover > .djs-visual > :first-child {
  stroke-width: 4px !important;
}
.uf-bpmn .djs-element.uf-selected > .djs-visual > :first-child {
  stroke: #0f172a !important;
  stroke-width: 4.5px !important;
  filter: drop-shadow(0 0 6px rgba(15, 23, 42, 0.45));
}
.uf-bpmn .djs-element.uf-dim {
  opacity: 0.22;
}

/* Step number + executor chip pinned to BPMN shapes and UniFlow blocks */
.uf-ov-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--uf-c, #334155);
  color: #ffffff;
  font: 800 12px/1 Inter, system-ui, sans-serif;
  box-shadow: 0 0 0 2px #ffffff, 0 2px 6px rgba(15, 23, 42, 0.25);
  pointer-events: none;
  white-space: nowrap;
}
.uf-ov-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--uf-c, #334155);
  color: #ffffff;
  font: 700 10px/1.35 Inter, system-ui, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  pointer-events: none;
}

/* UniFlow blocks painted with the same tone */
.studio-flow-node.uf-flow-node {
  background: var(--uf-bg, #ffffff);
  border: 2px solid var(--uf-c, #cbd5e1);
  border-left-width: 7px;
}
.studio-flow-node.uf-flow-node:hover,
.studio-flow-node.uf-flow-node.is-hovered {
  border-color: var(--uf-c, #0d9488);
  outline: 2px solid var(--uf-c, #0d9488);
  outline-offset: 2px;
}
.studio-flow-node.uf-flow-node.is-selected {
  border-color: #0f172a;
  outline: 3px solid #0f172a;
  outline-offset: 3px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}
.studio-flow-node.uf-flow-node.is-dim {
  opacity: 0.22;
}
.uf-flow-num {
  position: absolute;
  top: -11px;
  left: -11px;
  z-index: 4;
}
.uf-dock-num {
  margin-right: 8px;
  vertical-align: 1px;
}

/* Legend strip */
.uf-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 7px 14px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.76rem;
  color: #334155;
  flex: 0 0 auto;
}
.uf-legend__lead {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.uf-legend__lead .material-icons {
  font-size: 1rem;
  color: #0d9488;
}
.uf-legend__items {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  flex: 1 1 auto;
}
.uf-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  white-space: nowrap;
}
.uf-legend__sw {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--uf-bg);
  border: 2px solid var(--uf-c);
}
.uf-legend__layout {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.uf-seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.uf-seg .material-icons {
  font-size: 0.95rem;
}
.uf-seg.is-on {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

/* Stacked layout: both diagrams get the full width (processes are wide) */
.studio-split-grid--stack.studio-split-grid--both {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}
.studio-split-grid--side.studio-split-grid--both {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.studio-split-grid--bpmn,
.studio-split-grid--flow {
  grid-template-rows: minmax(0, 1fr);
}
.studio-step-dock__title {
  display: flex;
  align-items: center;
}

/* Compact studio chrome so the two diagrams get the vertical space */
.modal--studio .studio-head {
  padding: 8px 16px;
}
.modal--studio .studio-head__icon {
  width: 32px;
  height: 32px;
}
.modal--studio .studio-head__title {
  font-size: 1.02rem;
}
.modal--studio .studio-kpi-bar {
  padding: 5px 16px;
}
.modal--studio .studio-moves-strip {
  padding: 4px 16px;
}
.modal--studio .uf-legend {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 5px 14px;
  gap: 14px;
}
.modal--studio .uf-legend__items {
  flex-wrap: nowrap;
}
.modal--studio .uf-legend__lead,
.modal--studio .uf-legend__layout {
  flex: 0 0 auto;
  white-space: nowrap;
}
.modal--studio .studio-split-grid {
  padding: 6px 10px;
  gap: 8px;
}
.modal--studio .studio-diagram-toolbar {
  padding: 4px 10px;
}
.modal--studio .studio-step-dock {
  padding: 6px 14px;
}
.modal--studio .studio-footer,
.modal--studio > .modal-actions {
  padding: 8px 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   Builder side panels v2 — resizable, collapsible, tabbed, searchable
   ═══════════════════════════════════════════════════════════════════ */
body.is-pane-resizing,
body.is-pane-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}
@media (min-width: 1101px) {
  .view.builder,
  .view.builder.has-arch {
    grid-template-columns: var(--left-w, 276px) minmax(0, 1fr);
  }
  .view.builder.has-details,
  .view.builder.has-details-rail,
  .view.builder.has-arch.has-details,
  .view.builder.has-arch.has-details-rail {
    grid-template-columns: var(--left-w, 276px) minmax(0, 1fr) var(--right-w, 400px);
  }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .view.builder,
  .view.builder.has-details {
    grid-template-columns: var(--left-w, 300px) minmax(0, 1fr);
  }
  .view.builder.has-details-rail {
    grid-template-columns: var(--left-w, 300px) minmax(0, 1fr) 52px;
  }
  .view.builder.has-details .details-pane {
    width: min(var(--right-w, 460px), 92vw);
  }
}
@media (min-width: 901px) {
  .pane-resizer {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 9px;
    z-index: 14;
    cursor: col-resize;
    touch-action: none;
  }
  .pane-resizer::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 4px;
    width: 1px;
    background: transparent;
    transition: background 0.12s ease, box-shadow 0.12s ease;
  }
  .pane-resizer:hover::after,
  body.is-pane-resizing .pane-resizer::after {
    background: var(--brand-primary);
    box-shadow: 0 0 0 1.5px rgba(0, 191, 154, 0.35);
  }
  .pane-resizer--left {
    left: calc(var(--left-w, 340px) - 5px);
  }
  .pane-resizer--right {
    right: calc(var(--right-w, 460px) - 5px);
  }
}
@media (max-width: 900px) {
  .pane-resizer,
  .details-rail {
    display: none;
  }
}

/* ── Left pane shell ─────────────────────────────────────────────── */
.assistant-pane {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fbfcfd;
}
.side-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px 16px;
  flex: 0 0 auto;
}
.side-head__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(145deg, var(--brand-dark), #0d9488);
  box-shadow: 0 6px 14px rgba(13, 148, 136, 0.25);
  flex: none;
}
.side-head__icon .material-icons {
  font-size: 1.15rem;
}
.side-head__text {
  min-width: 0;
  flex: 1 1 auto;
}
.side-head__text h1 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--brand-dark);
  letter-spacing: -0.01em;
}
.side-head__text p {
  margin: 2px 0 0;
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.35;
}
.side-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 14px;
  padding: 4px;
  border-radius: 11px;
  background: #eef2f5;
  flex: 0 0 auto;
}
.side-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #526476;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.side-tab .material-icons {
  font-size: 1rem;
}
.side-tab:hover {
  color: var(--brand-dark);
}
.side-tab.is-active {
  background: #ffffff;
  color: var(--brand-dark);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.side-tab__count {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.66rem;
  line-height: 17px;
}
.side-tab.is-active .side-tab__count {
  background: var(--tint-brand);
  color: var(--brand-deep);
}
.side-tab__dot,
.side-rail__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 2px #ffffff;
}
.side-rail__dot {
  position: absolute;
  top: 6px;
  right: 6px;
}
.side-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 16px;
  overscroll-behavior: contain;
}
.assistant-pane .chat-stream.side-body {
  padding-right: 14px;
}
.assistant-pane .chat-input {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 12px 14px 14px;
  background: #ffffff;
}

/* Search */
.side-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 8px 0 10px;
  border: 1px solid #d5dee5;
  border-radius: 10px;
  background: #ffffff;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.side-search:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.15);
}
.side-search > .material-icons {
  font-size: 1.1rem;
  color: #7a8b99;
}
.side-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
  color: var(--text-primary);
}
.side-search input::-webkit-search-cancel-button {
  display: none;
}
.side-search__clear {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #7a8b99;
  cursor: pointer;
}
.side-search__clear:hover {
  background: #eef2f5;
}
.side-search__clear .material-icons {
  font-size: 1rem;
}
.side-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 10px 0 12px;
}
.side-quick__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 8px;
  border: 1px dashed #b9cbd3;
  border-radius: 9px;
  background: #ffffff;
  color: var(--brand-deep);
  font-size: 0.76rem;
  font-weight: 650;
  cursor: pointer;
}
.side-quick__btn .material-icons {
  font-size: 1rem;
}
.side-quick__btn:hover:not(:disabled) {
  border-style: solid;
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
}
.side-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 24px 10px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  text-align: center;
}
.side-empty .material-icons {
  font-size: 1.6rem;
  color: #a0b0bc;
}

/* Category accordions */
.step-acc {
  border: 1px solid #e3e9ee;
  border-radius: 12px;
  background: #ffffff;
  margin-bottom: 8px;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}
.step-acc.is-open {
  box-shadow: 0 2px 8px rgba(15, 40, 60, 0.05);
}
.step-acc__head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.step-acc__head:hover {
  background: #f7fafb;
}
.step-acc__icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--acc-bg, #eef2f5);
  color: var(--acc-c, #475569);
}
.step-acc__icon .material-icons {
  font-size: 1.05rem;
}
.step-acc__title {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.step-acc__title small {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.step-acc__count {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef2f5;
  color: #526476;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.step-acc__chev {
  color: #8a9aa7;
  font-size: 1.2rem;
  transition: transform 0.15s ease;
}
.step-acc.is-open .step-acc__chev {
  transform: rotate(180deg);
}
.step-acc__icon--inicio,
.step-tile-icon--inicio {
  --acc-bg: #dcfce7;
  --acc-c: #15803d;
}
.step-acc__icon--humano,
.step-tile-icon--humano {
  --acc-bg: #e0f2fe;
  --acc-c: #0369a1;
}
.step-acc__icon--automatico,
.step-tile-icon--automatico {
  --acc-bg: #e0e7ff;
  --acc-c: #4338ca;
}
.step-acc__icon--espera,
.step-tile-icon--espera {
  --acc-bg: #fef3c7;
  --acc-c: #b45309;
}
.step-acc__icon--fluxo,
.step-tile-icon--fluxo {
  --acc-bg: #ccfbf1;
  --acc-c: #0f766e;
}
.step-acc__icon--fim,
.step-tile-icon--fim {
  --acc-bg: #f1f5f9;
  --acc-c: #334155;
}

.assistant-pane .step-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 6px;
  padding: 2px 10px 10px;
}
.assistant-pane .step-tile {
  position: relative;
  min-height: 52px;
  padding: 8px 26px 8px 8px;
  gap: 9px;
  border-color: #e3e9ee;
  border-radius: 10px;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease, box-shadow 0.12s
    ease;
}
.assistant-pane .step-tile:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 40, 60, 0.08);
}
.assistant-pane .step-tile-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: var(--acc-bg, var(--tint-brand));
  color: var(--acc-c, var(--brand-deep));
}
.assistant-pane .step-tile-title {
  font-size: 0.78rem;
}
.assistant-pane .step-tile-note {
  font-size: 0.68rem;
}
.step-tile-add {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem !important;
  color: var(--brand-primary);
  opacity: 0;
  transition: opacity 0.12s ease;
}
.step-tile:hover:not(:disabled) .step-tile-add,
.step-tile:focus-visible .step-tile-add {
  opacity: 1;
}

/* Collapsed icon rails (left and right) */
.side-rail,
.details-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}
.details-rail {
  background: #fbfcfd;
  border-left: 1px solid var(--line);
}
.side-rail__btn {
  position: relative;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #526476;
  cursor: pointer;
  flex: none;
}
.side-rail__btn:hover {
  background: #eef2f5;
  color: var(--brand-dark);
}
.side-rail__btn.is-on {
  background: var(--tint-brand);
  color: var(--brand-deep);
}
.side-rail__btn--expand {
  color: var(--brand-deep);
  border: 1px solid #d5dee5;
  background: #ffffff;
}
.side-rail__btn--group .material-icons {
  font-size: 1.1rem;
}
.side-rail__sep {
  width: 24px;
  height: 1px;
  background: #e2e8f0;
  margin: 4px 0;
}
.details-rail__label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.74rem;
  font-weight: 650;
  color: #526476;
  max-height: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 6px;
}

/* ── Right inspector ─────────────────────────────────────────────── */
.details-pane {
  position: relative;
  z-index: 15;
  background: #fbfcfd;
}
.details-pane .details-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 12px 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e6ecf0;
}
.details-head__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--tint-brand);
  color: var(--brand-deep);
}
.details-head__icon .material-icons {
  font-size: 1.2rem;
}
.details-head__text {
  min-width: 0;
  flex: 1 1 auto;
}
.details-head__eyebrow {
  display: inline-block;
  margin-bottom: 1px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef2f5;
  color: #526476;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.details-pane .details-head h2 {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.25;
  color: var(--brand-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.details-about {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--brand-deep);
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
}
.details-about .material-icons {
  font-size: 0.95rem;
}
.details-about__chev {
  transition: transform 0.15s ease;
}
.details-about.is-open .details-about__chev {
  transform: rotate(180deg);
}
.details-about__body {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f1f7f8;
  color: #4a5d6c;
  font-size: 0.76rem;
  line-height: 1.45;
}
.details-head-actions {
  display: flex;
  gap: 2px;
  flex: none;
}
.details-pane .details-tabs {
  gap: 4px;
  padding: 8px 16px 0;
  background: #ffffff;
}
.details-pane .details-tab {
  padding: 8px 12px;
  font-size: 0.8rem;
}
.details-pane .details-tab .material-icons {
  font-size: 1rem;
}
.details-pane .details-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.details-search {
  margin: 12px 16px 0;
}
.details-body--cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 24px;
}
.details-body--cards > .property-group {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e3e9ee;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 40, 60, 0.04);
}
.details-body--cards > .property-group:focus-within {
  border-color: #9fdccd;
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.1);
}
.details-body--cards > .detail-run-row {
  margin: 0;
}
.details-body--cards .property-group label,
.details-body--cards .field-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #3b4f5f;
}
.details-body--cards input:not([type='checkbox']):not([type='radio']),
.details-body--cards select,
.details-body--cards textarea {
  border-radius: 9px;
}

.studio-kpi-chip__extra {
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(109, 40, 217, 0.12);
  font-size: 0.68rem;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════
   Step Architecture Dossier & Tradeoff Modal (Double-Click Raio-X)
   ═══════════════════════════════════════════════════════════════════ */
.studio-xray-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #f3e8ff 0%, #e0e7ff 100%) !important;
  color: #5b21b6 !important;
  border: 1px solid #c4b5fd !important;
  font-weight: 700 !important;
}
.studio-xray-btn:hover {
  background: linear-gradient(135deg, #ede9fe 0%, #dbeafe 100%) !important;
  border-color: #8b5cf6 !important;
  transform: translateY(-1px);
}
.studio-kpi-chip--no-ai {
  background: #fff1f2 !important;
  color: #be123c !important;
  border: 1px dashed #fda4af !important;
}
.studio-kpi-chip--no-ai:hover {
  background: #ffe4e6 !important;
  border-style: solid !important;
}

.studio-dossier-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.studio-dossier-modal {
  width: min(1160px, 96vw);
  max-height: min(860px, 92vh);
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.34);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.studio-dossier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex: 0 0 auto;
}
.studio-dossier-head__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.studio-dossier-num {
  min-width: 34px;
  height: 34px;
  font-size: 0.88rem;
  flex: none;
}
.studio-dossier-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.studio-dossier-title {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}
.studio-dossier-head__right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.studio-dossier-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 1. Signals strip */
.studio-dossier-signals {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.studio-dossier-signals__lead {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
}
.studio-dossier-signals__lead .material-icons {
  font-size: 1rem;
  color: #0d9488;
}
.studio-signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.studio-signal-chip .material-icons {
  font-size: 0.95rem;
}
.studio-signal-chip small {
  color: #64748b;
  font-weight: 600;
}
.studio-signal-chip.tone--agent {
  background: #f3e8ff;
  border-color: #d8b4fe;
  color: #6b21a8;
}
.studio-signal-chip.tone--n8n {
  background: #e0e7ff;
  border-color: #a5b4fc;
  color: #3730a3;
}
.studio-signal-chip.tone--roberty {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}
.studio-signal-chip.tone--human {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}
.studio-signal-chip.tone--decision {
  background: #ccfbf1;
  border-color: #5eead4;
  color: #115e59;
}

/* 2. Purpose, Need & Why 3-Column Summary */
.studio-dossier-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) {
  .studio-dossier-summary-grid {
    grid-template-columns: 1fr;
  }
}
.studio-dossier-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.studio-dossier-card--purpose {
  border-top: 3px solid #0d9488;
}
.studio-dossier-card--need {
  border-top: 3px solid #4f46e5;
}
.studio-dossier-card--why {
  border-top: 3px solid #9333ea;
}
.studio-dossier-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #0f172a;
}
.studio-dossier-card__head .material-icons {
  font-size: 1.1rem;
  color: #0d9488;
}
.studio-dossier-card--need .studio-dossier-card__head .material-icons {
  color: #4f46e5;
}
.studio-dossier-card--why .studio-dossier-card__head .material-icons {
  color: #9333ea;
}
.studio-dossier-card p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.48;
  color: #334155;
}
.studio-dossier-card__sub {
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
  color: #475569 !important;
  font-size: 0.76rem !important;
}

/* 3. Customized AI Agent Spec Box */
.studio-agent-spec {
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
  border: 1px solid #d8b4fe;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.studio-agent-spec__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.studio-agent-spec__title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.studio-agent-spec__title > .material-icons {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #9333ea;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}
.studio-agent-spec__title strong {
  display: block;
  font-size: 0.88rem;
  color: #581c87;
}
.studio-agent-spec__title span {
  display: block;
  font-size: 0.75rem;
  color: #6b21a8;
}
.studio-agent-playbooks {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.studio-playbook-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #d8b4fe;
  background: #ffffff;
  color: #6b21a8;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.studio-playbook-pill:hover {
  background: #f3e8ff;
}
.studio-playbook-pill.is-active {
  background: #9333ea;
  border-color: #7e22ce;
  color: #ffffff;
}
.studio-agent-spec__cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}
@media (max-width: 820px) {
  .studio-agent-spec__cols {
    grid-template-columns: 1fr;
  }
}
.studio-agent-spec__label {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #6b21a8;
  margin-bottom: 6px;
}
.studio-agent-spec__prompt code {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e9d5ff;
  color: #1e293b;
  font-family: inherit;
  font-size: 0.8rem;
  line-height: 1.48;
  white-space: pre-wrap;
}
.studio-agent-spec__policy {
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
}
.studio-agent-output-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.studio-agent-output-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid #e9d5ff;
}
.studio-agent-output-item .material-icons {
  font-size: 1rem;
  color: #9333ea;
  margin-top: 1px;
}
.studio-agent-output-item strong {
  display: block;
  font-size: 0.79rem;
  color: #0f172a;
}
.studio-agent-output-item small {
  display: block;
  font-size: 0.71rem;
  color: #64748b;
}

/* 4. Options & Tradeoffs Grid */
.studio-dossier-options-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.studio-dossier-options-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.studio-dossier-options-head h4 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: #0f172a;
}
.studio-dossier-options-head h4 .material-icons {
  font-size: 1.1rem;
  color: #0d9488;
}
.studio-dossier-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}
.studio-option-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 13px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}
.studio-option-card:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}
.studio-option-card.is-selected {
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2), 0 8px 20px rgba(13, 148, 136, 0.1);
  background: #f0fdfa;
}
.studio-option-card__top {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.studio-option-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
  background: #f1f5f9;
  color: #334155;
}
.studio-option-card__icon.tone--agent {
  background: #f3e8ff;
  color: #9333ea;
}
.studio-option-card__icon.tone--human {
  background: #dcfce7;
  color: #16a34a;
}
.studio-option-card__icon.tone--decision {
  background: #ccfbf1;
  color: #0d9488;
}
.studio-option-card__icon.tone--n8n {
  background: #e0e7ff;
  color: #4f46e5;
}
.studio-option-card__icon.tone--roberty {
  background: #fef3c7;
  color: #d97706;
}
.studio-option-card__titles {
  min-width: 0;
  flex: 1 1 auto;
}
.studio-option-card__titles strong {
  display: block;
  font-size: 0.84rem;
  color: #0f172a;
}
.studio-option-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}
.studio-opt-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
}
.studio-opt-badge--rec {
  background: #fef3c7;
  color: #92400e;
}
.studio-opt-badge--active {
  background: #ccfbf1;
  color: #115e59;
}
.studio-option-card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.studio-metric-pill {
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.69rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
}
.studio-metric-pill small {
  opacity: 0.75;
}
.studio-metric-pill.metric--good {
  background: #dcfce7;
  color: #166534;
}
.studio-metric-pill.metric--purple {
  background: #f3e8ff;
  color: #6b21a8;
}
.studio-metric-pill.metric--warn {
  background: #fef3c7;
  color: #92400e;
}
.studio-metric-pill.metric--info {
  background: #e0f2fe;
  color: #0369a1;
}

.studio-option-card__why,
.studio-option-card__tradeoff {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.42;
  color: #334155;
}
.studio-option-card__tradeoff {
  color: #64748b;
  flex: 1 1 auto;
}
.studio-option-card__btn {
  width: 100%;
  justify-content: center;
  margin-top: 2px;
}

/* 5. Quick Decision Bar */
.studio-dossier-quickbar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.studio-dossier-quickbar__chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.studio-dossier-quickbar__label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
}
.studio-dossier-quickbar__label .material-icons {
  font-size: 1rem;
  color: #0d9488;
}
.studio-quick-reason-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
}
.studio-quick-reason-btn .material-icons {
  font-size: 0.95rem;
}
.studio-quick-reason-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.studio-quick-reason-btn.is-active {
  background: #ccfbf1;
  border-color: #14b8a6;
  color: #0f766e;
}
.studio-quick-reason-btn--no-ai {
  background: #fff1f2;
  border-color: #fda4af;
  color: #be123c;
}
.studio-quick-reason-btn--no-ai:hover {
  background: #ffe4e6;
}
.studio-dossier-quickbar__note {
  display: flex;
  align-items: center;
  gap: 8px;
}
.studio-dossier-quickbar__note input {
  flex: 1 1 auto;
  margin: 0;
}

/* ── OptionsListEditor (Interactive Option List for Form Builder & Inspector) ── */
.opt-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 10px;
}
.opt-editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.opt-editor__title-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.opt-editor__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-dark, #0f172a);
  margin: 0 !important;
}
.opt-editor__count {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--tint-brand, #e6f9f5);
  color: var(--brand-deep, #007a63);
  font-size: 0.68rem;
  font-weight: 700;
}
.opt-editor__toolbar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.opt-editor__tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line-strong-alt, #cbd5e1);
  background: #ffffff;
  color: var(--text-secondary, #475569);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}
.opt-editor__tool-btn .material-icons {
  font-size: 0.85rem;
}
.opt-editor__tool-btn:hover {
  border-color: var(--brand-primary, #00bf9a);
  color: var(--brand-deep, #007a63);
  background: var(--tint-brand, #e6f9f5);
}
.opt-editor__tool-btn.is-active {
  background: var(--brand-deep, #007a63);
  border-color: var(--brand-deep, #007a63);
  color: #ffffff;
}
.opt-editor__list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 2px;
}
.opt-editor__row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.opt-editor__row:focus-within {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 0 0 2px rgba(0, 191, 154, 0.15);
}
.opt-editor__row.is-default {
  background: #f0fdf9;
  border-color: #99f6e4;
}
.opt-editor__row.is-dup {
  border-color: #fbbf24;
  background: #fffbeb;
}
.opt-editor__bullet {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-secondary, #64748b);
  user-select: none;
}
.opt-editor__row.is-default .opt-editor__bullet {
  color: var(--brand-primary, #00bf9a);
}
.opt-editor__bullet .material-icons {
  font-size: 1rem;
}
.opt-editor__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.66rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.opt-editor__row.is-default .opt-editor__index {
  background: var(--brand-primary, #00bf9a);
  color: #ffffff;
}
.opt-editor__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 4px 4px !important;
  min-height: 26px !important;
  height: 26px !important;
  font-size: 0.8125rem !important;
  color: var(--text-primary, #0f172a) !important;
}
.opt-editor__dup-badge {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-size: 0.625rem;
  font-weight: 700;
}
.opt-editor__actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  opacity: 0.55;
  transition: opacity 0.14s ease;
}
.opt-editor__row:hover .opt-editor__actions,
.opt-editor__row:focus-within .opt-editor__actions {
  opacity: 1;
}
.opt-editor__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
}
.opt-editor__btn .material-icons {
  font-size: 0.9rem;
}
.opt-editor__btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: var(--brand-dark, #0f172a);
}
.opt-editor__btn:disabled {
  opacity: 0.28;
  cursor: default;
}
.opt-editor__btn--star.is-on {
  color: #f59e0b;
}
.opt-editor__btn--star.is-on:hover {
  background: #fef3c7;
  color: #d97706;
}
.opt-editor__btn--del:hover:not(:disabled) {
  background: #fee2e2;
  color: #dc2626;
}
.opt-editor__add-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-top: 2px;
}
.opt-editor__quick-input {
  width: 100%;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  border: 1px dashed var(--line-strong-alt, #cbd5e1) !important;
  background: #ffffff !important;
  font-size: 0.78rem !important;
}
.opt-editor__quick-input:focus {
  border-style: solid !important;
  border-color: var(--brand-primary, #00bf9a) !important;
}
.opt-editor__add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--tint-brand-border, #99f6e4);
  background: var(--tint-brand, #e6f9f5);
  color: var(--brand-deep, #007a63);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}
.opt-editor__add-btn .material-icons {
  font-size: 1rem;
}
.opt-editor__add-btn:hover {
  background: var(--brand-primary, #00bf9a);
  border-color: var(--brand-primary, #00bf9a);
  color: #ffffff;
}
.opt-editor__bulk textarea {
  width: 100%;
  font-size: 0.8125rem;
}
.opt-editor__hint {
  margin: 4px 0 0;
  font-size: 0.7rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.35;
}

/* ── CodeStudioEditor (Interactive Code Editor & Sandbox Runner) ── */
.code-studio {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #f8fafc;
  padding: 10px;
}
.code-studio--modal {
  padding: 14px;
}
.code-studio__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.code-studio__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #0f172a;
}
.code-studio__title > .material-icons {
  font-size: 1.05rem;
  color: var(--brand-primary, #00bf9a);
}
.code-studio__badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
}
.code-studio__badge .material-icons {
  font-size: 0.8rem;
}
.code-studio__badge.is-ok {
  background: #dcfce7;
  color: #15803d;
}
.code-studio__badge.is-warn {
  background: #fef3c7;
  color: #b45309;
}
.code-studio__actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.code-studio__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}
.code-studio__btn .material-icons {
  font-size: 0.85rem;
}
.code-studio__btn:hover {
  border-color: var(--brand-primary, #00bf9a);
  color: var(--brand-deep, #007a63);
  background: #f0fdf9;
}
.code-studio__templates {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.code-studio__sub-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  margin-right: 2px;
}
.code-studio__tpl-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}
.code-studio__tpl-chip .material-icons {
  font-size: 0.85rem;
  color: #0d9488;
}
.code-studio__tpl-chip:hover {
  background: #f0fdf9;
  border-color: #14b8a6;
  color: #0f766e;
}
.code-studio__chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.code-studio__var-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}
.code-studio__var-chip .material-icons {
  font-size: 0.8rem;
  color: #0d9488;
}
.code-studio__var-chip:hover {
  background: #e6f9f5;
  border-color: #00bf9a;
  color: #007a63;
}
.code-studio__var-chip.is-selected {
  background: #007a63;
  border-color: #007a63;
  color: #ffffff;
}
.code-studio__var-chip.is-selected .material-icons {
  color: #ffffff;
}
.code-studio__var-chip--out {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}
.code-studio__var-chip--out .material-icons {
  color: #7c3aed;
}
.code-studio__surface {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  border-radius: 9px;
  border: 1px solid #1e293b;
  background: #0f172a;
  overflow: hidden;
}
.code-studio__gutter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 10px 6px 10px 0;
  background: #1e293b;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  user-select: none;
  overflow: hidden;
}
.code-studio__line-num {
  height: 1.5em;
}
.code-studio__textarea {
  width: 100%;
  border: 0 !important;
  border-radius: 0 !important;
  background: #0f172a !important;
  color: #e2e8f0 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 0.78rem !important;
  line-height: 1.5 !important;
  padding: 10px 12px !important;
  resize: vertical;
  outline: none !important;
  box-shadow: none !important;
  white-space: pre;
  overflow-x: auto;
}
.code-studio__syntax-err {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 7px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 0.72rem;
}
.code-studio__syntax-err .material-icons {
  font-size: 0.95rem;
}
.code-studio__runner {
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.code-studio__runner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.code-studio__runner-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 0.75rem;
  color: #0f172a;
  cursor: pointer;
}
.code-studio__runner-toggle .material-icons {
  font-size: 1rem;
  color: #0d9488;
}
.code-studio__run-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid #007a63;
  background: #007a63;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.code-studio__run-btn .material-icons {
  font-size: 0.95rem;
}
.code-studio__run-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.code-studio__runner-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.code-studio__inputs-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
}
.code-studio__inputs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
}
.code-studio__inputs-count {
  color: #0d9488;
}
.code-studio__input-row {
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}
.code-studio__input-key {
  font-size: 0.72rem;
  color: #0f766e;
  background: #f0fdf9;
  padding: 3px 6px;
  border-radius: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-studio__input-val {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 8px !important;
  font-size: 0.75rem !important;
}
.code-studio__add-var {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.code-studio__add-var input {
  flex: 1 1 auto;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 8px !important;
  font-size: 0.72rem !important;
  border-style: dashed !important;
}
.code-studio__result {
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.75rem;
}
.code-studio__result.is-ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.code-studio__result.is-err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.code-studio__result-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.code-studio__result-head .material-icons {
  font-size: 1rem;
}
.code-studio__ms {
  margin-left: auto;
  font-size: 0.65rem;
  opacity: 0.8;
}
.code-studio__output-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.code-studio__output-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #dcfce7;
}
.code-studio__output-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: #0f172a;
}
.code-studio__err-msg {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
}

/* ── GateRuleCard (Visual Condition Cards in Depende de...) ── */
.gate-rule-card {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  margin-bottom: 10px;
}
.gate-rule-card--and {
  border-color: #99f6e4;
  background: #f0fdf9;
}
.gate-rule-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.gate-rule-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gate-rule-card__badge--and {
  background: #007a63;
}
.gate-path-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.gate-path-row input { min-width: 0; }
.gate-path-row__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gate-path-row__to {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  color: #64748b;
}
.gate-path-row__empty {
  flex: none;
  font-size: 0.66rem;
  font-weight: 700;
  color: #0f766e;
}

/* ── Toolbox Drag-and-Drop onto Canvas ───────────────────────────── */
.assistant-pane .step-tile:not(:disabled) {
  cursor: grab;
  user-select: none;
}
.assistant-pane .step-tile:active:not(:disabled),
.assistant-pane .step-tile.is-dragging {
  cursor: grabbing;
}
.assistant-pane .step-tile.is-dragging {
  opacity: 0.65;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(0, 191, 154, 0.22);
}
.canvas-wrap.is-drop-target {
  box-shadow: inset 0 0 0 2px rgba(0, 191, 154, 0.42);
}
.node.node--drop-preview {
  opacity: 0.72;
  border-style: dashed;
  border-color: var(--brand-primary);
  box-shadow: 0 8px 24px rgba(0, 153, 93, 0.18);
  pointer-events: none;
}
.fb-palette .fb-chip {
  cursor: grab;
  user-select: none;
}
.fb-palette .fb-chip:active {
  cursor: grabbing;
}



/* --- Robôs: inspetor de saúde / execuções remotas */
.arm-inspect {
  margin: 0.75rem 1.25rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 3%, white);
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.7rem;
}
.arm-inspect__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.arm-inspect__head strong {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--brand-dark);
}
.arm-inspect__head .material-icons {
  color: var(--brand-primary, #00a88e);
}
.arm-inspect__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.arm-inspect__list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.arm-inspect__list code {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05rem 0.4rem;
  font-size: 0.72rem;
}
.arm-inspect .code-block {
  max-height: 22rem;
  overflow: auto;
  margin: 0;
}

/* Dashboard loading skeleton: slim shimmer instead of a fake hero */
.dashboard-skeleton {
  display: grid;
  gap: 0.7rem;
  padding: 1.1rem 0;
}
.dashboard-skeleton__bar {
  display: block;
  height: 0.85rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #e6eef2 25%, #f3f8fa 50%, #e6eef2 75%);
  background-size: 200% 100%;
  animation: dash-skeleton 1.3s ease-in-out infinite;
}
.dashboard-skeleton__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}
.dashboard-skeleton__tile {
  display: block;
  height: 5.4rem;
  border-radius: 0.85rem;
  border: 1px solid #dfeaec;
  background: linear-gradient(90deg, #eef4f7 25%, #f7fbfd 50%, #eef4f7 75%);
  background-size: 200% 100%;
  animation: dash-skeleton 1.3s ease-in-out infinite;
}
@keyframes dash-skeleton {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* Long lists scroll inside their panel instead of stretching the page */
.scroll-cap {
  max-height: 30rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.scroll-cap--tall {
  max-height: 38rem;
}
.scroll-cap::-webkit-scrollbar {
  width: 8px;
}
.scroll-cap::-webkit-scrollbar-thumb {
  background: #c9d8de;
  border-radius: 999px;
}
.scroll-cap > .list-row:last-child,
.scroll-cap > .agent-run:last-child {
  border-bottom: 0;
}
/* Compact variant used by embedded dashboards' KPI strip */
@media (min-width: 1500px) {
  .agent-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   Premium layer — Portal externo · Agentes de IA · chips e pills
   Distinctive surfaces for the screens that lead the product:
   stat strips, icon tiles, dot pills, dark inset blocks.
   ============================================================ */

.page-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-primary);
}

/* --- Stat strip: one card, hairline dividers, tinted icon tiles */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  background: var(--surface-color);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 42, 67, 0.04), 0 12px 32px -18px rgba(16, 42, 67, 0.18);
  overflow: hidden;
}
.stat {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.05rem 1.2rem;
  min-width: 0;
}
.stat + .stat {
  border-left: 1px solid var(--line);
}
@media (max-width: 900px) {
  .stat + .stat {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
.stat__tile {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat__tile .material-icons {
  font-size: 1.3rem;
}
.stat__tile--brand {
  background: linear-gradient(135deg, #e0fbf4, #dcf3ff);
  color: #0b7a63;
}
.stat__tile--success {
  background: linear-gradient(135deg, #e2f8f2, #d3f4e9);
  color: var(--success-fg);
}
.stat__tile--neutral {
  background: linear-gradient(135deg, #eef3f7, #e6edf3);
  color: #48607a;
}
.stat__tile--warning {
  background: linear-gradient(135deg, #fff3d9, #ffe9c2);
  color: var(--warning-fg);
}
.stat__data {
  display: grid;
  min-width: 0;
}
.stat__data b {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.stat__data small {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Dot pills and meta chips (shared by Portal and Agentes) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.14rem 0.6rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}
.pill i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: currentColor;
}
.pill--ativo, .pill--success {
  background: var(--success-bg);
  color: var(--success-fg);
}
.pill--encerrado {
  background: #eef2f6;
  color: #5b7186;
}
.pill--expirado, .pill--warning {
  background: var(--warning-bg);
  color: var(--warning-fg);
}
.pill--danger {
  background: var(--error-bg);
  color: var(--error-fg);
}
.pill--info {
  background: #e5f2ff;
  color: #0b5cad;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fbfdfe;
  color: var(--text-secondary);
  padding: 0.24rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.meta-chip .material-icons {
  font-size: 0.9rem;
  color: #7d93a8;
}

/* --- Refined chips (filters, examples) */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--line);
  background: var(--surface-color);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  font: 600 0.72rem/1.2 inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease,
    box-shadow 120ms ease;
}
.chip .material-icons {
  font-size: 0.95rem;
  color: #7d93a8;
  transition: color 120ms ease;
}
.chip:hover:not(.chip--on) {
  border-color: #b9cdd8;
  color: var(--brand-dark);
}
.chip--on {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #eaf6f2;
  box-shadow: 0 2px 8px rgba(0, 43, 73, 0.25);
}
.chip--on:hover {
  color: #ffffff;
}
.chip--on .material-icons {
  color: var(--brand-primary);
}

/* --- Portal: layout, mint form, purpose selector, ticket, link rows */
.page--portal .portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.25fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 1280px) {
  .page--portal .portal-layout {
    grid-template-columns: 1fr;
  }
}
.portal-layout .panel {
  margin: 0;
}
.portal-mint {
  display: grid;
  gap: 1rem;
  padding: 1.15rem 1.25rem 1.3rem;
}
.portal-mint__field {
  display: grid;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}
.portal-mint__field select {
  width: 100%;
}
.portal-purpose {
  display: grid;
  gap: 0.6rem;
}
.portal-purpose__card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 2.6rem 0.85rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-color);
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  transition: border-color 130ms ease, box-shadow 130ms ease, background 130ms ease;
}
.portal-purpose__card:hover {
  border-color: #b9cdd8;
}
.portal-purpose__tile {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef4f8, #e6eef5);
  color: #48607a;
  flex-shrink: 0;
  transition: background 130ms ease, color 130ms ease;
}
.portal-purpose__copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.portal-purpose__copy b {
  font-size: 0.85rem;
  color: var(--brand-dark);
}
.portal-purpose__copy small {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
}
.portal-purpose__check {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  translate: 0 -50%;
  color: #c3d2dc;
  transition: color 130ms ease, scale 130ms ease;
}
.portal-purpose__card.is-on {
  border-color: color-mix(in srgb, var(--brand-primary) 60%, var(--line));
  background: linear-gradient(180deg, rgba(0, 191, 154, 0.05), rgba(0, 191, 154, 0.015));
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.12);
}
.portal-purpose__card.is-on .portal-purpose__tile {
  background: linear-gradient(135deg, #00bf9a, #00a88e);
  color: white;
}
.portal-purpose__card.is-on .portal-purpose__check {
  color: var(--brand-primary);
  scale: 1.1;
}
.portal-result {
  display: grid;
  gap: 0.8rem;
  margin: 0 1.25rem 1.3rem;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px dashed #b9cdd8;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 191, 154, 0.045), rgba(0, 182, 214, 0.02));
}
.portal-result__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0b7a63;
}
.pulse-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--brand-primary);
  box-shadow: 0 0 0 0 rgba(0, 191, 154, 0.5);
  animation: pulse-dot 1.8s ease-out infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(0, 191, 154, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(0, 191, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 191, 154, 0); }
}
.portal-result__url {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #12314d;
  background: #0d2b45;
}
.portal-result__url code {
  flex: 1;
  display: block;
  padding: 0.7rem 0.9rem;
  color: #9be8d5;
  font-size: 0.78rem;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  overflow-wrap: anywhere;
}
.portal-result__copy {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-left: 1px solid #12314d;
  background: #123a5c;
  color: #cfe9f8;
  padding: 0 0.95rem;
  font: 600 0.72rem/1 inherit;
  cursor: pointer;
  transition: background 120ms ease;
}
.portal-result__copy:hover {
  background: #174972;
}
.portal-result__copy.is-copied {
  background: #0b7a63;
  color: #e5fff7;
}
.portal-result__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.page--portal .chip-row {
  padding: 0.9rem 1.25rem 0.2rem;
}
.page--portal .empty-state {
  padding: 1.5rem 1.25rem;
}

/* Link rows: icon tile + title with pill + quiet actions */
.link-row {
  display: grid;
  grid-template-columns: auto minmax(8rem, 1fr) auto;
  align-items: center;
  column-gap: 0.9rem;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid #edf2f5;
  transition: background 110ms ease;
}
.link-row:hover {
  background: #f7fbfc;
}
.link-row:last-child {
  border-bottom: 0;
}
.link-row__tile {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.link-row__tile .material-icons {
  font-size: 1.15rem;
}
.link-row__tile--portal {
  background: linear-gradient(135deg, #e0fbf4, #dcf3ff);
  color: #0b7a63;
}
.link-row__tile--decide {
  background: linear-gradient(135deg, #e5f2ff, #e3ecff);
  color: #0b5cad;
}
.link-row__body {
  min-width: 0;
}
.link-row__body h3 {
  margin: 0 0 2px;
  font-size: 0.86rem;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.link-row__body p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.73rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-row__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.85;
  transition: opacity 120ms ease;
}
.link-row:hover .link-row__actions {
  opacity: 1;
}
.row-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #2b6f8f;
  font: 600 0.73rem/1 inherit;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 110ms ease, color 110ms ease;
}
.row-btn:hover {
  background: #e8f4f9;
  color: #14425c;
}
.row-btn--danger {
  color: #b52525;
}
.row-btn--danger:hover {
  background: #ffeceb;
  color: #8f1b1b;
}
.row-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* --- Agentes: workbench playground */
.panel-title-tile {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0fbf4, #dcf3ff);
  color: #0b7a63;
  margin-right: 0.1rem;
}
.panel-title-tile .material-icons {
  font-size: 1.05rem;
}
.panel-title-tile--violet {
  background: linear-gradient(135deg, #ece4ff, #ffe9f3);
  color: #6d28d9;
}
.panel--agents-playground h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.agent-bench {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 1.15rem;
  padding: 1.1rem 1.25rem 1.35rem;
}
@media (max-width: 1280px) {
  .agent-bench {
    grid-template-columns: 1fr;
  }
}
.agent-bench__form {
  display: grid;
  gap: 0.95rem;
  align-content: start;
}
.bench-field {
  display: grid;
  gap: 0.4rem;
}
.bench-field__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.bench-field textarea {
  width: 100%;
  resize: vertical;
}
.bench-field textarea.mono, textarea.mono {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.75rem !important;
}
.agent-bench__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.95rem;
}
.agent-bench__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.run-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 10px;
  padding: 0.62rem 1.15rem;
  background: linear-gradient(180deg, #00cfa5, #00a88e);
  color: #ffffff;
  font: 700 0.8rem/1 inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 105, 84, 0.35), 0 8px 20px -8px rgba(0, 168, 142, 0.55);
  transition: transform 110ms ease, box-shadow 110ms ease, filter 110ms ease;
}
.run-btn:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.run-btn:disabled {
  filter: grayscale(0.5) brightness(0.9);
  cursor: default;
  box-shadow: none;
}
.run-btn.is-running .material-icons {
  animation: spin 1s linear infinite;
}
.agent-bench__result {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  border-left: 1px solid var(--line);
  padding-left: 1.15rem;
  min-height: 16rem;
}
@media (max-width: 1280px) {
  .agent-bench__result {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 1.1rem;
  }
}
.bench-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: 2.2rem 1.4rem;
  border: 1px dashed #cfdae1;
  border-radius: 14px;
  background: repeating-linear-gradient(
      -45deg,
      rgba(230, 240, 245, 0.25) 0 10px,
      rgba(255, 255, 255, 0) 10px 20px
    ), #fbfdfe;
  height: 100%;
}
.bench-empty__glyph {
  font-size: 1.9rem;
  color: #9fb4c2;
}
.bench-empty strong {
  font-size: 0.88rem;
  color: var(--brand-dark);
}
.bench-empty p {
  margin: 0;
  max-width: 26rem;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.bench-empty.is-thinking strong {
  color: #0b7a63;
}
.bench-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.bench-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fbfdfe;
  padding: 0.34rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}
.bench-stat .material-icons {
  font-size: 0.95rem;
  color: var(--brand-primary);
}
.bench-rationale {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #f4faf8;
  border: 1px solid #d9efe9;
  color: #14574a;
  font-size: 0.76rem;
  line-height: 1.45;
}
.bench-rationale .material-icons {
  font-size: 1rem;
  color: #0b7a63;
  flex-shrink: 0;
}
.bench-warn {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  background: var(--warning-bg);
  border: 1px solid #f3dfae;
  color: var(--warning-fg);
  font-size: 0.74rem;
}
.bench-warn .material-icons {
  font-size: 1rem;
  flex-shrink: 0;
}
.dark-code {
  margin: 0;
  border-radius: 12px;
  border: 1px solid #12314d;
  background: #0d2b45;
  color: #c9e6f5;
  padding: 0.9rem 1rem;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.74rem;
  line-height: 1.55;
  overflow: auto;
  max-height: 21rem;
}
.dark-code .material-icons, .dark-code::-webkit-scrollbar {
  width: 8px;
}
.dark-code::-webkit-scrollbar-thumb {
  background: #2c4f6e;
  border-radius: 999px;
}

/* Agent runs console */
.agent-run {
  border-bottom: 1px solid #edf2f5;
}
.agent-run:last-child {
  border-bottom: 0;
}
.agent-run__row {
  display: grid;
  grid-template-columns: auto minmax(9rem, 1fr) auto;
  align-items: center;
  column-gap: 0.9rem;
  padding: 0.7rem 1.25rem;
  cursor: pointer;
  list-style: none;
  transition: background 110ms ease;
}
.agent-run__row::-webkit-details-marker {
  display: none;
}
.agent-run__row:hover {
  background: #f7fbfc;
}
.agent-run__tile {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.agent-run__tile .material-icons {
  font-size: 1.15rem;
}
.agent-run__tile--runtime {
  background: linear-gradient(135deg, #e0fbf4, #dcf3ff);
  color: #0b7a63;
}
.agent-run__tile--authoring {
  background: linear-gradient(135deg, #ece4ff, #ffe1ef);
  color: #6d28d9;
}
.agent-run__id {
  min-width: 0;
}
.agent-run__id h3 {
  margin: 0 0 2px;
  font-size: 0.86rem;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.agent-run__id p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.73rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-run__id a {
  color: #2b6f8f;
  text-decoration: none;
}
.agent-run__id a:hover {
  text-decoration: underline;
}
.agent-run__meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.agent-run__chev {
  font-size: 1.1rem;
  color: #9fb4c2;
  transition: rotate 160ms ease;
}
.agent-run[open] .agent-run__chev {
  rotate: 180deg;
}
.agent-run__body {
  display: grid;
  gap: 0.7rem;
  padding: 0.2rem 1.25rem 1.1rem 4.45rem;
}
@media (max-width: 900px) {
  .agent-run__body {
    padding-left: 1.25rem;
  }
}

/* --- Calendário: sugestão de feriados nacionais */
.cal-suggest-year {
  min-width: 3.2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}
.cal-suggest-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 0.1rem 0.9rem;
  padding: 0.55rem 1.25rem 0.4rem;
}
.cal-suggest-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.55rem;
  padding: 0.38rem 0.35rem;
  font-size: 0.78rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 100ms ease;
}
.cal-suggest-row:hover {
  background: #f2f9f7;
}
.cal-suggest-name {
  color: var(--brand-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-suggest-date {
  color: var(--text-secondary);
  font-size: 0.7rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Donut legend: swatch matches its conic-gradient slice */
.dash-mix-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dash-mix-swatch {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 3px;
  flex-shrink: 0;
}

@keyframes spin {
  to { rotate: 360deg; }
}
.spin {
  animation: spin 1s linear infinite;
}

/* ============================================================
   Tabs, accordions and compact layouts (less scroll)
   ============================================================ */
.tab-bar {
  display: flex;
  gap: 0.15rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar {
  display: none;
}
.tab-bar__tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.75rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: 600 0.8rem/1 inherit;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: color 120ms ease, border-color 120ms ease;
}
.tab-bar__tab .material-icons {
  font-size: 1.05rem;
}
.tab-bar__tab:hover {
  color: var(--brand-dark);
}
.tab-bar__tab.is-on {
  color: var(--brand-dark);
  border-bottom-color: var(--brand-primary, #00a88e);
}
.tab-bar__count {
  background: var(--surface-muted, #eef4f7);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  color: var(--text-secondary);
}
.tab-bar__tab.is-on .tab-bar__count {
  background: color-mix(in srgb, var(--brand-primary, #00a88e) 14%, white);
  color: var(--brand-dark);
}
.tab-pane {
  min-height: 0;
}

/* Calendar: month grid left, tabbed side panel right, fits one viewport */
.page--calendar .cal-layout {
  align-items: start;
}
.cal-side__strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  padding: 0.7rem 1.1rem;
  background: color-mix(in srgb, var(--brand) 4%, white);
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.cal-side__strip span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.cal-side__strip .material-icons {
  font-size: 1rem;
  color: var(--brand-primary, #00a88e);
}
.cal-side .cal-pane-list {
  max-height: 22rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.cal-side .cal-suggest-list {
  grid-template-columns: 1fr;
  max-height: 17rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.page--calendar .cal-cell {
  min-height: 3.2rem;
}
.tab-bar--page {
  padding: 0;
  margin: 0.25rem 0 0.9rem;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}
.two-col > .panel {
  margin: 0;
}
@media (max-width: 1100px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}
.cal-side .tab-bar {
  padding: 0 0.5rem;
}
.cal-side .tab-bar__tab {
  padding: 0.75rem 0.6rem;
}

/* Long lists scroll inside their panel so the page itself stays one screen */
.scroll-cap--vh,
.page--inbox .inbox-list {
  max-height: max(18rem, calc(100vh - 21rem));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.people-dir.scroll-cap {
  max-height: max(18rem, calc(100vh - 24rem));
}

/* Painel: calmer hierarchy - slim banner, five headline KPIs, rest on demand */
.dashboard-hero {
  padding: 0.85rem 1.25rem;
  min-height: 0;
  gap: 1rem;
}
.dashboard-hero__stats {
  display: none;
}
.dashboard-hero__content h2 {
  font-size: 1.05rem;
}
.dashboard-hero__content p {
  display: none;
}
.dashboard-kpi-grid--primary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  .dashboard-kpi-grid--primary {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  }
}
.dash-more {
  margin-top: 0.5rem;
}
.dash-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  list-style: none;
  font: 600 0.78rem/1 inherit;
  color: var(--brand-dark);
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-color);
}
.dash-more > summary::-webkit-details-marker {
  display: none;
}
.dash-more[open] > summary .material-icons {
  transform: rotate(180deg);
}
.dash-more > .dashboard-kpi-grid {
  margin-top: 0.6rem;
}
.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
.dashboard-grid .dashboard-panel {
  max-height: 17rem;
  overflow-y: auto;
}
.dashboard-hero .dashboard-hero__stats {
  display: none !important;
}
.dashboard-hero .dashboard-hero__content h2 {
  font-size: 1.05rem;
}
.dash-more > summary::marker {
  content: '';
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.dashboard-grid .dashboard-panel {
  max-height: 16rem;
}
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}

.arm-card-remove {
  margin-left: auto;
  color: var(--danger-color, #b42318);
}

.callback-card {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-4);
  padding: 14px;
  border: 1px solid var(--border-color, #dfe5ec);
  border-radius: 12px;
  background: var(--surface-color, #fff);
  min-width: 0;
}
.callback-card__head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.callback-card__head > .material-icons {
  flex: none;
  padding: 6px;
  border-radius: 8px;
  background: var(--surface-muted, #eef2f6);
  color: var(--primary-color, #0b6e4f);
  font-size: 18px;
}
.callback-card__head h4 {
  margin: 0 0 4px;
  font-size: 0.875rem;
}
.callback-card__head p,
.callback-card__how,
.callback-card__fine {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.45;
}
.callback-card__how {
  color: var(--text-primary, inherit);
}
.callback-card__suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--warning-surface, #fff7e6);
  font-size: 0.75rem;
}
.callback-card__suggest span {
  flex: 1 1 180px;
}
.callback-snippet {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.callback-snippet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.callback-snippet .hint-sample {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  white-space: pre;
  overflow-x: auto;
}
.callback-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.callback-card__share {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.75rem;
}
.callback-card__share a {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kv-row.kv-row--single {
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
}

/* ---------- Operação → Execuções ---------- */
.runs .panel-head {
  flex-wrap: wrap;
  gap: 12px;
}
.runs-live {
  display: flex;
  align-items: center;
  gap: 8px;
}
.runs-live__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-color);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.runs-live__toggle .status-dot {
  background: #94a3b8;
}
.runs-live__toggle.is-on {
  color: var(--brand-deep);
  border-color: #a7e9d8;
  background: var(--tint-brand);
}
.runs-live__toggle.is-on .status-dot {
  background: var(--brand-primary);
  box-shadow: 0 0 0 0 rgb(0 191 154 / 0.5);
  animation: runs-pulse 2s ease-out infinite;
}
@keyframes runs-pulse {
  70% { box-shadow: 0 0 0 6px rgb(0 191 154 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(0 191 154 / 0); }
}
.runs-live__at {
  font-size: 0.75rem;
}
.runs-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 12px;
  padding: 0 20px 16px;
}
button.runs-tile {
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.runs-tile.is-on {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgb(0 191 154 / 0.25);
}
.runs-tile.stat-tile--danger.is-on {
  border-color: #f87171;
  box-shadow: 0 0 0 2px rgb(239 68 68 / 0.2);
}
.runs-chart {
  margin: 0 20px 16px;
  padding: 14px 16px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-color);
}
.runs-chart__plot {
  display: flex;
  align-items: stretch;
  gap: 3px;
  height: 120px;
}
.runs-chart__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
}
.runs-chart__stack {
  display: flex;
  flex-direction: column;
  min-height: 2px;
  border-radius: 4px 4px 1px 1px;
  overflow: hidden;
  background: var(--surface-muted);
  transition: height 0.25s ease;
}
.runs-chart__col:hover .runs-chart__stack {
  filter: brightness(0.92);
}
.runs-chart__seg {
  display: block;
  flex-basis: 0;
  min-height: 2px;
}
.runs-chart__seg--done { background: var(--brand-primary); }
.runs-chart__seg--open { background: #fbbf24; }
.runs-chart__seg--cancelled { background: #cbd5e1; }
.runs-chart__seg--failed { background: #ef4444; }
.runs-chart__tick {
  height: 14px;
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  overflow: visible;
}
.runs-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 8px;
}
.runs-chart__legend button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
}
.runs-chart__legend button:hover {
  color: var(--brand-dark);
  background: var(--surface-muted);
}
.runs-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
}
.runs-dot--done { background: var(--brand-primary); }
.runs-dot--open { background: #fbbf24; }
.runs-dot--cancelled { background: #cbd5e1; }
.runs-dot--failed { background: #ef4444; }
.runs-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0 20px 10px;
}
.runs-filters .list-search {
  max-width: 28rem;
}
.runs-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-color);
}
.runs-select .material-icons {
  font-size: 17px;
  color: var(--text-secondary);
}
.runs-select select {
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  max-width: 18rem;
  color: var(--brand-dark);
}
.runs-select select:focus {
  outline: none;
}
.runs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--line);
}
.runs-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
}
.runs-chip .material-icons {
  font-size: 15px;
}
button.runs-chip--failed.is-on {
  color: #b91c1c;
  background: #fee2e2;
}
button.runs-chip--failed em {
  color: #b91c1c;
}
.runs-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.runs-row {
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
}
.runs-row.is-failed {
  border-left-color: #ef4444;
  background: linear-gradient(90deg, #fff5f5, transparent 40%);
}
.runs-row.is-open {
  background: #f8fbfb;
}
.runs-row.is-failed.is-open {
  background: #fffafa;
}
.runs-row__main {
  display: grid;
  grid-template-columns: 2.25rem minmax(10rem, 1.6fr) minmax(10rem, 1.4fr) minmax(8rem, 1fr) 7rem 7rem 1.5rem;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.runs-row__main:hover {
  background: rgb(0 43 73 / 0.03);
}
.runs-row__main:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: -2px;
}
.runs-badge {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.runs-badge .material-icons {
  font-size: 1.2rem;
}
.runs-badge--done { background: #d1fae5; color: #047857; }
.runs-badge--human { background: #fef3c7; color: #b45309; }
.runs-badge--system { background: #dbeafe; color: #1d4ed8; }
.runs-badge--cancelled { background: var(--surface-muted); color: var(--text-secondary); }
.runs-row.is-failed .runs-badge { background: #fee2e2; color: #b91c1c; }
.runs-row__id,
.runs-row__where,
.runs-row__who,
.runs-row__time {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.runs-row__id strong {
  font-size: 0.875rem;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}
.runs-row__flow,
.runs-row__sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.runs-row__who > span:first-child {
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.runs-row__time {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 4px;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.runs-row__time .material-icons {
  font-size: 15px;
  color: var(--text-secondary);
}
.runs-row__time .runs-row__sub {
  flex-basis: 100%;
}
.runs-status {
  align-self: flex-start;
}
.runs-status--done { background: #d1fae5; color: #047857; }
.runs-status--human { background: #fef3c7; color: #92400e; }
.runs-status--system { background: #dbeafe; color: #1e40af; }
.runs-status--cancelled { background: var(--surface-muted); color: var(--text-secondary); }
.runs-fail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.75rem;
  font-weight: 700;
}
.runs-fail .material-icons {
  font-size: 15px;
}
.runs-ok {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.runs-row__chev {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}
.runs-row.is-open .runs-row__chev {
  transform: rotate(180deg);
}
.runs-row__error {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: -6px 18px 10px calc(18px + 2.25rem + 12px);
  font-size: 0.78rem;
  color: #b91c1c;
}
.runs-row__error .material-icons {
  font-size: 15px;
  margin-top: 1px;
}
.runs-row__detail {
  padding: 4px 18px 18px calc(18px + 2.25rem + 12px);
}
.runs-row__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.runs-row__meta {
  font-size: 0.75rem;
}
.runs-timeline {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-color);
  padding: 12px 16px;
}
.runs-timeline__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.8125rem;
}
.runs-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #b91c1c;
  font-weight: 600;
  cursor: pointer;
}
.runs-callout {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  font-size: 0.8125rem;
}
.runs-callout p {
  margin: 2px 0 4px;
}
.runs-callout--danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.runs-callout--danger a {
  color: #991b1b;
  font-weight: 700;
}
.runs-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.runs-step {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
}
.runs-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.runs-step__icon {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e0f2fe;
  color: #0369a1;
  position: relative;
  z-index: 1;
}
.runs-step__icon .material-icons {
  font-size: 16px;
}
.runs-step--start .runs-step__icon { background: #ede9fe; color: #6d28d9; }
.runs-step--ok .runs-step__icon { background: #d1fae5; color: #047857; }
.runs-step--stop .runs-step__icon { background: var(--surface-muted); color: #475569; }
.runs-step--danger .runs-step__icon { background: #ef4444; color: white; }
.runs-step__body {
  min-width: 0;
  flex: 1;
}
.runs-step__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 0.8125rem;
}
.runs-step--danger .runs-step__head strong {
  color: #b91c1c;
}
.runs-step__actor {
  font-size: 0.75rem;
  color: var(--brand-deep);
  font-weight: 600;
}
.runs-step__head time {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.runs-step__note {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.runs-step--danger .runs-step__note {
  color: #991b1b;
  background: #fef2f2;
  padding: 6px 8px;
  border-radius: 8px;
}
.runs-step__data {
  margin-top: 4px;
  font-size: 0.75rem;
}
.runs-step__data summary {
  cursor: pointer;
  color: var(--text-secondary);
}
.runs-step__data pre {
  margin: 6px 0 0;
  padding: 8px 10px;
  max-height: 16rem;
  overflow: auto;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.72rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.runs .page-bar {
  padding: 12px 20px;
}
@media (max-width: 960px) {
  .runs-row__main {
    grid-template-columns: 2.25rem 1fr auto 1.5rem;
  }
  .runs-row__who,
  .runs-row__time {
    display: none;
  }
  .runs-row__where {
    grid-column: 2;
  }
  .runs-row__issue {
    grid-column: 3;
    grid-row: 1;
  }
  .runs-row__chev {
    grid-column: 4;
    grid-row: 1;
  }
  .runs-row__error,
  .runs-row__detail {
    margin-left: 18px;
    padding-left: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .runs-live__toggle.is-on .status-dot { animation: none; }
}

/* Case documents gallery */
.doc-gallery {
  border-top: 1px solid var(--surface-muted);
  padding: 1rem 1.25rem 1.1rem;
}
.doc-gallery__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--brand-dark);
  margin-bottom: 0.7rem;
}
.doc-gallery__head .material-icons { font-size: 1.15rem; color: var(--brand-deep); }
.doc-gallery__head strong { font-size: 0.9rem; }
.doc-gallery__head em {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-deep);
  background: var(--tint-brand);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}
.doc-gallery__stage {
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.doc-gallery__stage iframe {
  display: block;
  width: 100%;
  height: 480px;
  border: 0;
  background: #fff;
}
.doc-gallery__stage img {
  display: block;
  max-width: 100%;
  max-height: 480px;
  margin: 0 auto;
  object-fit: contain;
  background: #fff;
}
.doc-gallery__stage--tall iframe { height: 100%; min-height: 0; }
.doc-gallery__stage--tall img { max-height: 100%; }
.doc-gallery__stage--tall { flex: 1; min-height: 0; display: flex; }
.doc-gallery__stage--tall iframe { flex: 1; }
.doc-gallery__fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--text-secondary);
}
.doc-gallery__fallback-icon { font-size: 2rem; color: var(--neutral); }
.doc-gallery__fallback p {
  margin: 0;
  max-width: 32rem;
  font-size: 0.9rem;
  line-height: 1.45;
}
.doc-gallery__fallback .app-btn .material-icons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  color: inherit;
}
.doc-gallery__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.1rem 0;
}
.doc-gallery__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-color);
  color: var(--brand-dark);
  cursor: pointer;
  text-decoration: none;
  flex: none;
}
.doc-gallery__nav:hover:not(:disabled) { border-color: var(--brand-primary); color: var(--brand-deep); }
.doc-gallery__nav:disabled { opacity: 0.35; cursor: default; }
.doc-gallery__nav .material-icons { font-size: 1.15rem; }
.doc-gallery__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-right: auto;
}
.doc-gallery__info strong {
  font-size: 0.875rem;
  color: var(--brand-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-gallery__info span { font-size: 0.75rem; color: var(--text-secondary); }
.doc-gallery__count { font-size: 0.8rem; color: var(--text-secondary); flex: none; }
.doc-gallery__thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.7rem 0.1rem 0.2rem;
}
.doc-thumb {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 11rem;
  max-width: 15rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-color);
  cursor: pointer;
  text-align: left;
}
.doc-thumb:hover { border-color: var(--brand-primary); }
.doc-thumb.is-on {
  border-color: var(--brand-primary);
  background: var(--tint-brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand-primary);
}
.doc-thumb .material-icons { font-size: 1.5rem; color: var(--brand-deep); flex: none; }
.doc-thumb__text { display: flex; flex-direction: column; min-width: 0; }
.doc-thumb__name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-thumb__field {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.doc-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 43, 73, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5vh 2.5vw;
}
.doc-viewer__box {
  background: var(--surface-color);
  border-radius: 14px;
  width: min(1100px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.doc-viewer__head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding-bottom: 0.7rem;
}
.doc-viewer__head strong { color: var(--brand-dark); }
.doc-viewer__head span { color: var(--text-secondary); font-size: 0.8rem; }
.doc-viewer__head .doc-gallery__nav { margin-left: auto; align-self: center; }
@media (max-width: 720px) {
  .doc-gallery__stage iframe, .doc-gallery__stage img { height: 340px; }
  .doc-gallery__count { display: none; }
}

/* ConfirmDialog - the app's own confirmation, replaces window.confirm */
.confirm-backdrop {
  z-index: 90;
  backdrop-filter: blur(3px);
  animation: confirm-fade 0.14s ease-out;
}
.confirm-dialog {
  width: min(420px, 100%);
  align-items: center;
  text-align: center;
  gap: var(--ds-space-3);
  animation: confirm-pop 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.confirm-dialog__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e6f7f5;
  color: var(--brand-primary);
}
.confirm-dialog--danger .confirm-dialog__icon {
  background: #fdecec;
  color: #c62828;
}
.confirm-dialog__icon .material-icons {
  font-size: 26px;
}
.confirm-dialog h2 {
  margin: 0;
}
.confirm-dialog__body {
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.9375rem;
}
.confirm-dialog__body p {
  margin: 0;
}
.confirm-dialog__actions {
  display: flex;
  gap: var(--ds-space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--ds-space-3);
  width: 100%;
}
.confirm-dialog__actions .app-btn {
  flex: 1 1 140px;
  justify-content: center;
}
@keyframes confirm-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes confirm-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .confirm-backdrop, .confirm-dialog { animation: none; }
}

.field-hint--warn {
  color: var(--warning-ink, #9a5b00);
  background: var(--warning-bg, #fff4e0);
  border-radius: 6px;
  padding: 6px 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   Technical spec (handoff to dev) · Raio-X tab + Studio buttons
   ═══════════════════════════════════════════════════════════════════ */
.studio-spec-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #ecfeff 0%, #e0f2fe 100%) !important;
  color: #075985 !important;
  border: 1px solid #7dd3fc !important;
  font-weight: 700 !important;
}
.studio-spec-btn:hover {
  border-color: #0284c7 !important;
  transform: translateY(-1px);
}
.studio-spec-btn--head { margin-left: auto; margin-right: 6px; white-space: nowrap; }
.studio-spec-btn__pct {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
}
.studio-spec-btn__pct.is-mid { background: #fef3c7; color: #92400e; }
.studio-spec-btn__pct.is-good { background: #d1fae5; color: #065f46; }

.studio-dossier-tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex: 0 0 auto;
}
.studio-dossier-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 9px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
}
.studio-dossier-tabs button small { font-weight: 500; color: #94a3b8; font-size: 0.72rem; }
.studio-dossier-tabs button .material-icons { font-size: 1.05rem; }
.studio-dossier-tabs button:hover { color: #0f172a; }
.studio-dossier-tabs button.is-active { color: #0f766e; border-bottom-color: #14b8a6; }

.spec-panel { display: flex; flex-direction: column; gap: 12px; }
.spec-empty { margin: 4px 0 8px; color: #94a3b8; font-size: 0.8rem; font-style: italic; }

.spec-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(120deg, #ffffff 0%, #f0fdfa 100%);
  border: 1px solid #ccfbf1;
}
.spec-hero--roberty { background: linear-gradient(120deg, #ffffff 0%, #fff7ed 100%); border-color: #fed7aa; }
.spec-hero--n8n, .spec-hero--rest { background: linear-gradient(120deg, #ffffff 0%, #eef2ff 100%); border-color: #c7d2fe; }
.spec-hero--agent, .spec-hero--script { background: linear-gradient(120deg, #ffffff 0%, #faf5ff 100%); border-color: #e9d5ff; }
.spec-hero__icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #0f766e;
  color: #fff;
}
.spec-hero--roberty .spec-hero__icon { background: #ea580c; }
.spec-hero--n8n .spec-hero__icon, .spec-hero--rest .spec-hero__icon { background: #4f46e5; }
.spec-hero--agent .spec-hero__icon, .spec-hero--script .spec-hero__icon { background: #7c3aed; }
.spec-hero__icon .material-icons { font-size: 1.6rem; }
.spec-hero__text { flex: 1 1 auto; min-width: 0; }
.spec-hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #475569;
}
.spec-dot { color: #cbd5e1; }
.spec-sys {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  text-transform: none;
  letter-spacing: 0;
}
.spec-sys .material-icons { font-size: 0.9rem; }
.spec-sys--tela { background: #ffedd5; color: #9a3412; }
.spec-sys--api { background: #e0e7ff; color: #3730a3; }
.spec-hero__objective { margin: 6px 0 2px; font-size: 0.95rem; font-weight: 700; color: #0f172a; line-height: 1.35; }
.spec-hero__trigger { margin: 0; font-size: 0.8rem; color: #64748b; }

.spec-ready { position: relative; flex: none; width: 70px; height: 70px; display: grid; place-items: center; }
.spec-ready svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.spec-ready circle { fill: none; stroke-width: 3.2; }
.spec-ready__track { stroke: #e2e8f0; }
.spec-ready__bar { stroke: #ef4444; stroke-linecap: round; transition: stroke-dasharray 0.4s ease; }
.spec-ready--mid .spec-ready__bar { stroke: #f59e0b; }
.spec-ready--good .spec-ready__bar { stroke: #10b981; }
.spec-ready strong { font-size: 1rem; font-weight: 800; color: #0f172a; margin-top: -8px; }
.spec-ready small { position: absolute; bottom: 15px; font-size: 0.6rem; color: #64748b; text-transform: uppercase; }

.spec-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.spec-checklist { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 6px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: #fff;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  cursor: default;
}
.spec-check .material-icons { font-size: 0.95rem; }
.spec-check.is-done { border-style: solid; border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.spec-actions__btns { display: flex; gap: 6px; flex-wrap: wrap; }

.spec-rules {
  display: flex;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  font-size: 0.82rem;
}
.spec-rules .material-icons { font-size: 1.05rem; color: #d97706; }
.spec-rules p { margin: 0; }

.spec-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; }
.spec-grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.spec-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
}
.spec-card h5 {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #334155;
}
.spec-card h5:not(:first-child) { margin-top: 14px; }
.spec-card h5 .material-icons { font-size: 1rem; color: #0d9488; }
.spec-card--mini ul { margin: 0; padding-left: 16px; font-size: 0.8rem; color: #334155; line-height: 1.45; }
.spec-card--mini li + li { margin-top: 4px; }
.spec-card--ask { background: #f8fafc; border-style: dashed; }
.spec-card--ask h5 .material-icons { color: #2563eb; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.spec-table th {
  text-align: left;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  font-weight: 700;
  padding: 0 6px 5px 0;
  border-bottom: 1px solid #f1f5f9;
}
.spec-table td { padding: 6px 6px 6px 0; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.spec-table td code { font-size: 0.76rem; color: #0f172a; background: #f1f5f9; padding: 1px 5px; border-radius: 5px; }
.spec-table td small { display: block; color: #64748b; margin-top: 2px; }
.spec-req { color: #dc2626; font-weight: 800; margin-left: 2px; }
.spec-type { font-size: 0.7rem; padding: 1px 6px; border-radius: 5px; background: #eef2ff; color: #4338ca; font-weight: 600; }
.spec-ex { color: #475569; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.74rem; word-break: break-word; }
.spec-src { color: #475569; font-size: 0.74rem; }
.spec-src em { color: #b45309; font-style: normal; font-weight: 600; }

.spec-steps { margin: 0; padding-left: 20px; font-size: 0.82rem; color: #1e293b; line-height: 1.45; }
.spec-steps li + li { margin-top: 5px; }
.spec-steps li::marker { color: #0d9488; font-weight: 800; }
.spec-paths { margin: 0; padding-left: 18px; font-size: 0.82rem; }

.spec-json { margin-top: 12px; border-radius: 10px; overflow: hidden; border: 1px solid #1e293b; background: #0f172a; }
.spec-json__tabs { display: flex; gap: 2px; padding: 4px; background: #1e293b; }
.spec-json__tabs button {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.spec-json__tabs button.is-on { background: #334155; color: #f8fafc; }
.spec-json__copy { margin-left: auto; display: grid; place-items: center; }
.spec-json__copy .material-icons { font-size: 0.95rem; }
.spec-json pre {
  margin: 0;
  padding: 10px 12px;
  max-height: 220px;
  overflow: auto;
  color: #e2e8f0;
  font-size: 0.74rem;
  line-height: 1.45;
}

.spec-foot { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 0.78rem; color: #64748b; }
.spec-foot .material-icons { font-size: 1rem; color: #94a3b8; }

@media (max-width: 860px) {
  .spec-grid { grid-template-columns: 1fr; }
  .spec-hero { flex-wrap: wrap; }
  .studio-dossier-tabs button small { display: none; }
}
.spec-inspector-card {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #bae6fd;
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
}
.spec-inspector-card__head { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: #075985; }
.spec-inspector-card__head .material-icons { font-size: 1.05rem; }
.spec-inspector-card__head .studio-spec-btn__pct { margin-left: auto; }
.spec-inspector-card .field-hint { margin: 6px 0 8px; }
.gate-suggest {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 10px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px dashed #5eead4;
  background: #f0fdfa;
  color: #115e59;
  font: inherit;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
}
.gate-suggest:hover { border-style: solid; background: #ccfbf1; }
.gate-suggest .material-icons { font-size: 1.1rem; color: #0d9488; }
.gate-suggest code { background: #fff; padding: 0 4px; border-radius: 4px; }
.spec-table td:first-child { min-width: 140px; }
.spec-table td code { white-space: nowrap; }
.spec-json pre code { background: none; color: inherit; padding: 0; border: 0; font-size: inherit; }

/* Field picker: chosen fields as chips, the rest behind "Adicionar campo" */
.field-pick__chosen { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 8px; }
.field-pick__chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 3px 2px 7px;
  border-radius: 7px;
  background: #e6f9f5;
  border: 1px solid #99e6d6;
  color: #075c51;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 600;
}
.field-pick__chip > .material-icons { font-size: 0.8rem; color: #0d9488; }
.field-pick__chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}
.field-pick__chip button:hover { background: #fee2e2; color: #b91c1c; }
.field-pick__chip button .material-icons { font-size: 0.85rem; }
.field-pick__more { margin-left: 6px; font-weight: 500; color: #64748b; font-size: 0.7rem; }
.field-pick__shortcuts { margin: 0 0 8px; }
.field-pick__panel {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-pick__search { display: flex; align-items: center; gap: 6px; }
.field-pick__search > .material-icons { font-size: 1rem; color: #94a3b8; }
.field-pick__search input { flex: 1; min-width: 0; }
.field-pick__list { max-height: 150px; overflow-y: auto; }

.json-import {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px dashed #b7e4da;
  border-radius: 10px;
  background: #f7fffd;
}
.json-import__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f766e;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}
.json-import__toggle > .material-icons,
.json-import__head > .material-icons { font-size: 1rem; }
.json-import__optional {
  padding: 1px 6px;
  border-radius: 999px;
  background: #e6f9f5;
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 650;
}
.json-import__head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #075c51;
}
.json-import__head .opt-editor__tool-btn { margin-left: auto; }
.json-import__text {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
}
.json-import__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.json-import__actions label { cursor: pointer; }
.json-import__chips { display: flex; flex-wrap: wrap; gap: 5px; }
.json-import__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #99f6e4;
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 650;
}
.json-import__chip.is-known { color: #64748b; border-color: #e2e8f0; background: #f8fafc; }
.json-import__chip > .material-icons { font-size: 0.85rem; }
.json-import__chip em {
  font-style: normal;
  font-weight: 500;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9rem;
}

/* Callback card: technical part folds away */
.callback-card__dev { margin-top: 10px; border-top: 1px dashed #cbd5e1; padding-top: 8px; }
.callback-card__dev > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: #075985;
}
.callback-card__dev > summary::-webkit-details-marker { display: none; }
.callback-card__dev > summary .material-icons { font-size: 1rem; }
.callback-card__dev > summary::after {
  content: '';
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
  flex: none;
}
.callback-card__dev[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.callback-card__dev[open] > summary { margin-bottom: 8px; }
.callback-card__dev[open] { display: flex; flex-direction: column; gap: var(--ds-space-3); }

/* ── Modelo de IA: seletor, painel e controle do processo ─────────────── */
.ai-picker { display: grid; gap: 0.35rem; }
.ai-picker__row { display: flex; gap: 0.4rem; align-items: stretch; }
.ai-picker__row > .ai-select { flex: 1; min-width: 0; }
.ai-picker__refresh { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; border: 1px solid var(--line); border-radius: 0.7rem; background: #fff; color: var(--brand-dark); cursor: pointer; }
.ai-picker__refresh:hover:not(:disabled) { background: var(--tint-brand-soft); border-color: var(--tint-brand-border); }
.ai-picker__refresh .material-icons { font-size: 1.1rem; }
.ai-picker__refresh .is-spinning { animation: ai-spin 0.8s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-picker__hint { margin: 0; font-size: 0.74rem; color: var(--text-secondary); }
.ai-picker__hint--warn { color: var(--warning-fg); }
.ai-picker__hint a { color: var(--brand-deep); font-weight: 700; }

.ai-select { position: relative; }
.ai-select__button { display: flex; align-items: center; gap: 0.5rem; width: 100%; min-height: 2.6rem; padding: 0.35rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 0.7rem; background: #fff; color: var(--text-primary); cursor: pointer; text-align: left; font: inherit; }
.ai-select__button:hover:not(:disabled) { border-color: var(--brand-primary); }
.ai-select__button:disabled { opacity: 0.55; cursor: not-allowed; background: var(--surface-subtle); }
.ai-select__name { font-weight: 700; font-size: 0.86rem; color: var(--brand-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-select__name--inherit { font-weight: 600; color: var(--text-secondary); }
.ai-select__date { margin-left: auto; font-size: 0.72rem; color: var(--text-secondary); white-space: nowrap; }
.ai-select__chev { margin-left: auto; color: var(--text-secondary); }
.ai-select__button .ai-select__date + .ai-select__chev { margin-left: 0.2rem; }
.ai-select__pop { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 0.35rem); min-width: 22rem; background: #fff; border: 1px solid var(--line); border-radius: 0.9rem; box-shadow: var(--shadow); overflow: hidden; display: grid; }
.ai-select__search { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); color: var(--text-secondary); }
.ai-select__search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 0.86rem; background: transparent; }
.ai-select__scroll { max-height: 20rem; overflow: auto; padding: 0.35rem; }
.ai-select__heading { padding: 0.45rem 0.5rem 0.25rem; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.ai-select__rec, .ai-select__opt { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.5rem 0.6rem; border: 0; border-radius: 0.55rem; background: transparent; cursor: pointer; text-align: left; font: inherit; }
.ai-select__rec { justify-content: space-between; }
.ai-select__rec-name { font-weight: 800; font-size: 0.86rem; color: var(--brand-dark); }
.ai-select__rec-hint { font-size: 0.72rem; color: var(--text-secondary); }
.ai-select__rec:hover, .ai-select__opt:hover, .ai-select__opt.is-active { background: var(--tint-brand-soft); }
.ai-select__rec.is-on, .ai-select__opt.is-on { background: var(--tint-brand); }
.ai-select__empty { margin: 0; padding: 0.7rem; font-size: 0.8rem; color: var(--text-secondary); }
.ai-select__foot { display: flex; gap: 0.45rem; align-items: center; padding: 0.55rem 0.8rem; border-top: 1px solid var(--line); font-size: 0.76rem; color: var(--text-secondary); cursor: pointer; }
.ai-badges { display: inline-flex; gap: 0.25rem; }
.ai-badge { border-radius: 999px; padding: 0.08rem 0.45rem; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; background: var(--surface-muted); color: var(--text-secondary); }
.ai-badge--new { background: var(--success-bg); color: var(--success-fg); }
.ai-badge--pro { background: #efe9ff; color: #5b3fc4; }
.ai-badge--mini, .ai-badge--nano { background: var(--tint-brand); color: var(--brand-deep); }
.ai-badge--codex { background: #e6f1ff; color: #1d5fb8; }
.ai-badge--reasoning { background: var(--warning-bg); color: var(--warning-fg); }

.ai-panel { margin-bottom: 1.25rem; }
.ai-panel__head { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ai-panel__tile { display: inline-flex; width: 2.8rem; height: 2.8rem; align-items: center; justify-content: center; border-radius: 0.9rem; background: linear-gradient(135deg, var(--brand-primary), var(--brand-light)); color: #fff; }
.ai-panel__titles { flex: 1; min-width: 16rem; }
.ai-panel__titles h2 { margin: 0; font-size: 1.15rem; color: var(--brand-dark); }
.ai-panel__titles p { margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--text-secondary); }
.ai-panel__status { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 999px; padding: 0.35rem 0.8rem; font-size: 0.78rem; font-weight: 800; }
.ai-panel__status .material-icons { font-size: 1.05rem; }
.ai-panel__status--ok { background: var(--success-bg); color: var(--success-fg); }
.ai-panel__status--off { background: var(--warning-bg); color: var(--warning-fg); }
.ai-panel__status--bad { background: var(--error-bg); color: var(--error-fg); }
.ai-panel__alert { margin: 0 0 0.8rem; padding: 0.6rem 0.9rem; border-radius: 0.7rem; background: var(--error-bg); color: var(--error-fg); font-size: 0.82rem; }
.ai-panel__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .ai-panel__cards { grid-template-columns: 1fr; } }
.ai-card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.1rem 1.2rem; display: grid; gap: 0.8rem; box-shadow: 0 1px 2px rgba(0, 43, 73, 0.04); }
.ai-card--wide { grid-column: 1 / -1; }
.ai-card.is-locked { background: var(--surface-subtle); }
.ai-card__step { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--brand-dark); }
.ai-card__step span { display: inline-flex; width: 1.4rem; height: 1.4rem; border-radius: 50%; align-items: center; justify-content: center; background: var(--brand-dark); color: #fff; font-size: 0.72rem; }
.ai-card__lead { margin: 0; font-size: 0.82rem; color: var(--text-secondary); }
.ai-card__sub { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.ai-card__lock { margin: 0; font-size: 0.8rem; color: var(--warning-fg); }
.ai-card__foot { color: var(--text-secondary); font-size: 0.76rem; }
.ai-card__provider { display: flex; align-items: center; gap: 0.7rem; }
.ai-card__provider small { display: block; color: var(--text-secondary); font-size: 0.74rem; }
.ai-card__logo { display: inline-flex; width: 2.2rem; height: 2.2rem; border-radius: 0.6rem; background: #0b2b45; color: #6ee7b7; font-weight: 900; font-size: 0.8rem; align-items: center; justify-content: center; }
.ai-keyrow { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 0.7rem; background: var(--surface-subtle); }
.ai-keyrow .material-icons { color: var(--brand-deep); font-size: 1.1rem; }
.ai-keyrow code { font-weight: 800; color: var(--brand-dark); }
.ai-keyrow small { color: var(--text-secondary); }
.ai-keyrow__actions { margin-left: auto; display: flex; gap: 0.7rem; }
.ai-link { background: none; border: 0; padding: 0; font: inherit; font-size: 0.8rem; font-weight: 800; color: var(--brand-deep); cursor: pointer; text-decoration: none; }
.ai-link:hover { text-decoration: underline; }
.ai-link--danger { color: var(--error-fg); }
.ai-keyform { display: grid; gap: 0.5rem; }
.ai-keyform label { font-size: 0.74rem; font-weight: 800; color: var(--brand-dark); text-transform: uppercase; letter-spacing: 0.04em; }
.ai-keyform small, .ai-adv small { color: var(--text-secondary); font-size: 0.75rem; }
.ai-keyform__row { display: flex; gap: 0.4rem; }
.ai-keyform__row input { flex: 1; min-width: 0; }
.ai-keyform__actions { display: flex; gap: 0.5rem; }
.ai-iconbtn { width: 2.6rem; border: 1px solid var(--line); border-radius: 0.7rem; background: #fff; cursor: pointer; color: var(--text-secondary); }
.ai-card__test { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.ai-card__test .app-btn .material-icons { font-size: 1.1rem; vertical-align: -0.2em; margin-right: 0.2rem; }
.ai-ok { color: var(--success-fg); font-weight: 700; }
.ai-bad { color: var(--error-fg); font-weight: 700; }
.ai-result { display: grid; gap: 0.4rem; border-radius: 0.8rem; padding: 0.7rem 0.9rem; font-size: 0.82rem; }
.ai-result--ok { background: var(--success-bg); color: var(--success-fg); }
.ai-result--bad { background: var(--error-bg); color: var(--error-fg); word-break: break-word; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ai-chip { border-radius: 999px; background: rgba(255, 255, 255, 0.7); padding: 0.15rem 0.6rem; font-size: 0.74rem; font-weight: 700; }
.ai-adv summary { cursor: pointer; font-size: 0.78rem; font-weight: 700; color: var(--brand-deep); margin-bottom: 0.5rem; }
.ai-adv { display: grid; gap: 0.4rem; }
.ai-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.5rem; }
.ai-quick__item { display: grid; gap: 0.1rem; text-align: left; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 0.8rem; background: #fff; cursor: pointer; font: inherit; }
.ai-quick__item b { font-size: 0.84rem; color: var(--brand-dark); }
.ai-quick__item small { font-size: 0.7rem; color: var(--text-secondary); }
.ai-quick__item:hover:not(:disabled) { border-color: var(--brand-primary); background: var(--tint-brand-soft); }
.ai-quick__item.is-on { border-color: var(--brand-primary); background: var(--tint-brand); box-shadow: inset 0 0 0 1px var(--brand-primary); }
.ai-effective { display: flex; gap: 0.7rem; align-items: center; padding: 0.7rem 0.85rem; border-radius: 0.8rem; background: var(--mint-bg); border: 1px solid var(--tint-brand-border); }
.ai-effective > .material-icons { color: var(--brand-deep); }
.ai-effective small { display: block; color: var(--text-secondary); font-size: 0.72rem; }
.ai-effective strong { display: flex; gap: 0.4rem; align-items: center; color: var(--brand-dark); }
.ai-toast { margin: 0; font-size: 0.78rem; font-weight: 700; color: var(--success-fg); }
.ai-order { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; counter-reset: o; }
.ai-order li { counter-increment: o; display: flex; align-items: baseline; gap: 0.4rem; padding: 0.4rem 0.8rem; border-radius: 999px; background: var(--surface-subtle); border: 1px solid var(--line); }
.ai-order li::before { content: counter(o); font-size: 0.7rem; font-weight: 900; color: var(--brand-deep); }
.ai-order li:not(:last-child)::after { content: '›'; color: var(--text-secondary); margin-left: 0.4rem; }
.ai-order small { color: var(--text-secondary); font-size: 0.72rem; }
.ai-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.ai-table th { text-align: left; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line); }
.ai-table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--surface-muted); vertical-align: middle; }
.ai-table td small { display: block; color: var(--text-secondary); font-size: 0.7rem; }
.ai-table code { font-weight: 800; color: var(--brand-dark); }
.ai-src { border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.72rem; font-weight: 700; background: var(--surface-muted); color: var(--text-secondary); }
.ai-src--agente { background: #efe9ff; color: #5b3fc4; }
.ai-src--processo { background: var(--tint-brand); color: var(--brand-deep); }

.ai-flow-chip { display: inline-flex; align-items: center; gap: 0.35rem; height: 2rem; padding: 0 0.7rem; border: 1px solid var(--line); border-radius: 0.6rem; background: #fff; color: var(--brand-dark); font-size: 0.74rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ai-flow-chip:hover { background: var(--tint-brand-soft); border-color: var(--tint-brand-border); }
.ai-flow-chip .material-icons { font-size: 1.05rem; color: var(--brand-deep); }
.ai-flow-pop { position: absolute; z-index: 40; top: calc(100% + 0.4rem); right: 0; width: 24rem; background: #fff; border: 1px solid var(--line); border-radius: 0.9rem; box-shadow: var(--shadow); padding: 0.9rem; display: grid; gap: 0.6rem; }
.ai-flow-pop h4 { margin: 0; font-size: 0.86rem; color: var(--brand-dark); }
.ai-flow-pop p { margin: 0; font-size: 0.76rem; color: var(--text-secondary); }

/* ── Identidade da organização nas páginas do cliente ─────────────────── */
.portal-page, .vagas-page, [data-org-brand] .portal-page { font-family: var(--org-font, Inter, ui-sans-serif, system-ui, -apple-system, sans-serif); }
html[data-org-brand] body { font-family: var(--org-font, Inter, ui-sans-serif, system-ui, -apple-system, sans-serif); }
.portal-brand-logo { height: 2rem; max-width: 11rem; object-fit: contain; display: block; }
.portal-brand-welcome { margin-left: auto; font-size: 0.75rem; opacity: 0.85; }
.portal-brand--light { background: #fff; color: var(--brand-dark); border-bottom: 3px solid var(--brand-primary); }
.portal-brand--light small { color: var(--text-secondary); }
.portal-brand--light .portal-brand-mark { background: var(--brand-primary); color: var(--org-on-primary, #fff); }
html[data-org-brand] .portal-brand-mark { color: var(--org-on-primary, var(--brand-dark)); }
html[data-org-brand] .portal-card, html[data-org-brand] .portal-page .panel { border-radius: var(--org-card, 14px); }
html[data-org-brand] .portal-page input, html[data-org-brand] .portal-page select, html[data-org-brand] .portal-page textarea,
html[data-org-brand] .portal-page .app-btn { border-radius: var(--org-radius, 10px); }
html[data-org-brand] .portal-page .app-btn--primary { color: var(--org-on-primary, #fff); }
.portal-foot { display: grid; gap: 0.3rem; justify-items: center; padding: 1.2rem 1rem 1.6rem; font-size: 0.78rem; color: var(--text-secondary); text-align: center; }
.portal-foot p { margin: 0; max-width: 44rem; }
.portal-foot__contact { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; justify-content: center; }
.portal-foot a { color: var(--brand-deep); font-weight: 700; }
.portal-foot small { opacity: 0.7; }
.vagas-brand__logo { height: 1.8rem; max-width: 9rem; object-fit: contain; vertical-align: middle; margin-right: 0.5rem; background: rgba(255,255,255,0.92); padding: 0.15rem 0.4rem; border-radius: 0.4rem; }

/* ── Estúdio de identidade visual ────────────────────────────────────── */
.brand-studio { margin-bottom: 1.25rem; }
.brand-studio__actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.brand-studio__dirty { font-size: 0.76rem; font-weight: 800; color: var(--warning-fg); background: var(--warning-bg); padding: 0.25rem 0.65rem; border-radius: 999px; }
.brand-studio__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; padding-top: 0.4rem; }
@media (max-width: 980px) { .brand-studio__grid { grid-template-columns: 1fr; } }
.brand-studio__form { display: grid; gap: 1rem; }
.brand-studio__preview { position: sticky; top: 4.5rem; display: grid; gap: 0.6rem; }
.brand-preview__label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.brand-preview { border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: var(--page-bg); font-family: var(--org-font, inherit); }
.brand-preview .portal-page { min-height: 22rem; display: flex; flex-direction: column; background: var(--page-bg); }
.brand-preview .portal-card { border-radius: var(--org-card, 14px); }
.brand-preview .portal-page input, .brand-preview .portal-page textarea, .brand-preview .portal-page .app-btn { border-radius: var(--org-radius, 10px); }
.brand-preview .portal-page .app-btn--primary { color: var(--org-on-primary, #fff); }
.brand-preview .portal-brand-mark { color: var(--org-on-primary, var(--brand-dark)); }
.brand-preview__where { font-size: 0.78rem; color: var(--text-secondary); }
.brand-ai { display: grid; gap: 0.7rem; padding: 1rem; border-radius: 1rem; border: 1px solid var(--tint-brand-border); background: linear-gradient(180deg, var(--tint-brand-soft), #fff); }
.brand-ai__head { display: flex; gap: 0.7rem; align-items: center; }
.brand-ai__head > .material-icons { color: var(--brand-deep); font-size: 1.6rem; }
.brand-ai__head small { display: block; color: var(--text-secondary); font-size: 0.78rem; }
.brand-ai__result { padding: 0.7rem 0.9rem; border-radius: 0.8rem; background: var(--success-bg); color: var(--success-fg); font-size: 0.8rem; display: grid; gap: 0.3rem; }
.brand-ai__result p { margin: 0; }
.brand-ai__result.is-warn { background: var(--warning-bg); color: var(--warning-fg); }
.brand-ai__hint { opacity: 0.85; }
.brand-group { border: 1px solid var(--line); border-radius: 1rem; padding: 0.8rem 1rem 1rem; display: grid; gap: 0.7rem; margin: 0; min-width: 0; }
.brand-group legend { padding: 0 0.4rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-dark); }
.brand-field { display: grid; gap: 0.3rem; font-size: 0.8rem; min-width: 0; }
.brand-field > span, .brand-color > span:first-child { font-size: 0.72rem; font-weight: 800; color: var(--text-secondary); }
.brand-field input, .brand-field textarea, .brand-field select { width: 100%; }
.brand-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.brand-colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.7rem; }
.brand-color { display: grid; gap: 0.3rem; }
.brand-color__row { display: flex; gap: 0.4rem; align-items: center; }
.brand-color__row input[type='color'] { width: 2.4rem; height: 2.2rem; padding: 0; border: 1px solid var(--line); border-radius: 0.5rem; background: #fff; cursor: pointer; }
.brand-color__row input[type='text'] { flex: 1; min-width: 0; font-family: ui-monospace, monospace; }
.brand-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 0.7rem; overflow: hidden; width: fit-content; }
.brand-seg button { border: 0; background: #fff; padding: 0.45rem 0.9rem; font: inherit; font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); cursor: pointer; }
.brand-seg button + button { border-left: 1px solid var(--line); }
.brand-seg button.is-on { background: var(--tint-brand); color: var(--brand-deep); }
.brand-logo { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.brand-logo__box { width: 11rem; height: 4.2rem; border: 1px dashed var(--line-strong); border-radius: 0.8rem; display: grid; place-items: center; background: repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 50% / 14px 14px; overflow: hidden; color: var(--text-secondary); font-size: 0.78rem; }
.brand-logo__box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-logo__btns { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.brand-logo__btns small { flex-basis: 100%; color: var(--text-secondary); font-size: 0.74rem; }
.brand-check { display: flex; gap: 0.5rem; align-items: center; font-size: 0.8rem; color: var(--text-secondary); }

/* marca da organização: faixa do formulário e botões legíveis sobre a cor principal */
html[data-org-brand] .vagas-hero {
  background:
    radial-gradient(60rem 30rem at 85% -20%, color-mix(in srgb, var(--brand-primary) 55%, transparent), transparent 60%),
    radial-gradient(40rem 24rem at 0% 120%, color-mix(in srgb, var(--brand-light, var(--brand-primary)) 35%, transparent), transparent 60%),
    linear-gradient(135deg, var(--brand-dark), color-mix(in srgb, var(--brand-dark) 70%, var(--brand-primary)));
}
html[data-org-brand] .app-btn--primary, html[data-org-brand] .vagas-page .app-btn--primary { color: var(--org-on-primary, #fff); }
html[data-org-brand] .vagas-brand__mark { color: var(--org-on-primary, var(--brand-dark)); background: var(--brand-primary); }
.brand-color__row input[type='text'] { width: 100%; min-width: 0; }
.brand-color { min-width: 0; }
.brand-colors { grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); }

/* Link público: nothing may push past the inspector column */
.public-link,
.public-link > *,
.public-link .property-group {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.public-link select,
.public-link input,
.public-link textarea {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.public-link__head {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.public-link__head p {
  overflow-wrap: anywhere;
}
.public-link .tab-bar {
  margin: 0 -4px;
  overflow-x: auto;
}
.public-link__skins {
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}
.public-link__tokens {
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}
.public-link__url code {
  flex: 1 1 100%;
}
.public-link__texts {
  display: grid;
  gap: 10px;
}

/* Simular */
.sim-modal {
  gap: 12px;
  width: min(980px, 100%);
}
.sim-modal__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.sim-modal__head p {
  margin: 2px 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.sim-modal__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--tint-brand);
  color: var(--brand-deep);
}
.sim-modal__note {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-subtle);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.sim-modal__note .material-icons {
  font-size: 18px;
}
.sim-modal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sim-modal__spacer {
  flex: 1;
}
.sim-modal__stage {
  display: grid;
  place-items: start center;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
}
.sim-modal__frame {
  width: 100%;
  height: min(58vh, 560px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.sim-modal__stage--phone .sim-modal__frame {
  width: 375px;
  max-width: 100%;
  border-radius: 22px;
  border-width: 6px;
  border-color: var(--brand-dark);
}
.sim-modal__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 14px;
}
.sim-modal__cols textarea,
.sim-modal__cols input {
  width: 100%;
  box-sizing: border-box;
}
.sim-modal__cols pre {
  overflow: auto;
  max-width: 100%;
}
.sim-modal__plain {
  margin: 0;
  color: var(--text-secondary);
}
.sim-modal__run {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.sim-modal__out {
  display: inline-flex;
  gap: 10px;
  font-weight: 600;
}
.sim-modal__out.is-ok {
  color: var(--brand-deep);
}
.sim-modal__out.is-bad {
  color: #b3261e;
}

/* Demo seats: icon + who + what they do */
.login-demo-seat {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.login-demo-seat:hover:not(:disabled) {
  border-color: rgb(0 224 176 / 0.6);
  transform: translateY(-1px);
}
.login-demo-seat__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: rgb(0 224 176 / 0.16);
  color: rgb(94 234 212) !important;
  font-size: 1.1rem !important;
}
.login-demo-seat__text {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}
.login-demo-seat__text small {
  font-size: 0.625rem;
  color: rgb(148 163 184);
  line-height: 1.3;
}

/* Form builder: agent bar + logic */
.fb-agent {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 35%, var(--line));
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--brand-primary) 9%, white), white 60%);
}
.fb-agent__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fb-agent__row input {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  font: inherit;
  font-size: 0.875rem;
}
.fb-agent__row input:focus {
  outline: 2px solid color-mix(in srgb, var(--brand-primary) 45%, transparent);
  border-color: var(--brand-primary);
}
.fb-agent__icon {
  color: var(--brand-deep);
}
.fb-agent__ideas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fb-agent__ideas button {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.fb-agent__ideas button:hover {
  border-color: var(--brand-primary);
  color: var(--brand-deep);
}
.fb-agent__error {
  margin: 0;
  font-size: 0.8125rem;
  color: #b3261e;
}
.fb-agent__proposal {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: white;
  border: 1px solid var(--line);
  font-size: 0.8125rem;
}
.fb-agent__proposal ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
}
.fb-logic-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff4e0;
  color: #8a5a00;
  font-size: 0.6875rem;
  font-weight: 600;
}
.fb-logic-chip .material-icons {
  font-size: 14px;
}
.fb-cond__title {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fb-cond__title .material-icons {
  font-size: 16px;
  color: #8a5a00;
}
.fb-cond__sentence {
  margin: 2px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff4e0;
  color: #8a5a00;
  font-size: 0.75rem;
  font-weight: 600;
}
.modal--builder {
  max-height: 94vh;
}
.modal--builder .fb {
  min-height: min(66vh, 760px);
}
.fb-stage > .fb-agent {
  margin: 12px 12px 4px;
}

/* ===== Case action bar: one place for every action on a case ===== */
.case-actionbar {
  position: relative;
  z-index: 5;
  overflow: visible;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 43, 73, 0.05);
  border-color: var(--line-strong);
}
.case-actionbar.is-expanded {
  position: relative;
  top: auto;
}
.case-actionbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  flex-wrap: wrap;
}
.case-actionbar__main,
.case-actionbar__side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.case-actionbar .app-btn .material-icons {
  font-size: 16px;
}
.case-actionbar .app-btn.is-on {
  border-color: var(--brand-primary);
  background: var(--tint-brand);
  color: var(--brand-deepest);
}
.case-actionbar__danger {
  color: var(--error-fg);
}
.case-actionbar__danger:hover:not(:disabled) {
  border-color: #f3b4b4;
  background: var(--error-bg);
}
.case-actionbar__danger.is-on {
  border-color: var(--error) !important;
  background: var(--error-bg) !important;
  color: var(--error-fg) !important;
}
.case-actionbar__note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}
.case-actionbar__note .material-icons {
  font-size: 16px;
  color: var(--warning);
}
.case-actionbar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0 14px 10px;
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.case-actionbar__legend b {
  color: var(--text-primary);
  font-weight: 600;
}
.case-actionbar__votes {
  padding: 0 12px 10px;
}
.case-actionbar__more {
  border-top: 1px solid var(--line);
  padding: 12px;
  background: var(--surface-subtle);
}
.case-actionbar__cancel {
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.case-composer {
  border-top: 1px solid var(--line);
  padding: 12px 14px 14px;
  display: grid;
  gap: 8px;
  background: var(--surface-subtle);
  animation: cfm-fade-in 0.18s ease-out;
}
.case-composer--reject {
  background: #fff8f8;
  border-top-color: #f6d0d0;
}
.case-composer--return {
  background: #fffbf2;
  border-top-color: #f5e2b8;
}
.case-composer label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.case-composer textarea {
  width: 100%;
  resize: vertical;
}
.case-composer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.case-composer__foot .field-hint {
  margin: 0;
}

/* ===== Case flow monitor (Ver no fluxo) ===== */
@keyframes cfm-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@keyframes cfm-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes cfm-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.32, 1.55); opacity: 0; }
}
@keyframes cfm-flow {
  to { stroke-dashoffset: -42; }
}
@keyframes cfm-spin {
  to { transform: rotate(360deg); }
}
@keyframes cfm-node-in {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.cfm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 22, 38, 0.55);
  backdrop-filter: blur(3px);
  animation: cfm-fade-in 0.2s ease-out;
}
.cfm {
  width: min(1480px, 100%);
  height: min(900px, calc(100vh - 36px));
  height: min(900px, calc(100dvh - 36px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 20, 35, 0.35);
  animation: cfm-pop 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cfm-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f8fbfc);
}
.cfm-head__title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.cfm-head__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-light));
  box-shadow: 0 6px 16px rgba(0, 191, 154, 0.3);
}
.cfm-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--brand-dark);
  white-space: nowrap;
}
.cfm-head h2 span {
  font-weight: 500;
  color: var(--text-secondary);
}
.cfm-head p {
  margin: 1px 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}
.cfm-kpis {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.cfm-kpi {
  display: grid;
  gap: 2px;
  padding: 6px 14px;
  border-left: 1px solid var(--line);
}
.cfm-kpi span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.cfm-kpi strong {
  font-size: 0.95rem;
  color: var(--brand-dark);
  white-space: nowrap;
}
.cfm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem !important;
}
.cfm-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.cfm-pill--live { color: #0b8f73 !important; }
.cfm-pill--live i { box-shadow: 0 0 0 0 rgba(0, 191, 154, 0.6); animation: cfm-dot 1.6s infinite; }
.cfm-pill--late { color: var(--error-fg) !important; }
.cfm-pill--late i { animation: cfm-dot-red 1.6s infinite; }
.cfm-pill--done { color: var(--success-fg) !important; }
.cfm-pill--muted { color: var(--text-secondary) !important; }
@keyframes cfm-dot {
  0% { box-shadow: 0 0 0 0 rgba(0, 191, 154, 0.55); }
  100% { box-shadow: 0 0 0 8px rgba(0, 191, 154, 0); }
}
@keyframes cfm-dot-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  100% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}
.cfm-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cfm-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
}
.cfm-close:hover { background: var(--surface-muted); color: var(--text-primary); }
.cfm-close--sm { width: 28px; height: 28px; border-radius: 8px; }
.cfm-close--sm .material-icons { font-size: 16px; }
.cfm-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
}
.cfm-stage {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #fbfefe 0, #f1f6f8 70%);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.cfm-stage:active { cursor: grabbing; }
.cfm-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 43, 73, 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.cfm-world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.cfm-world.is-smooth {
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cfm-edges {
  position: absolute;
  overflow: visible;
  pointer-events: none;
}
.cfm-edge path { fill: none; }
.cfm-edge__base {
  stroke-width: 2;
  transition: stroke 0.3s, opacity 0.3s;
}
.cfm-edge--idle .cfm-edge__base { stroke: #c9d6db; opacity: 0.55; }
.cfm-edge--pending .cfm-edge__base { stroke: #c9d6db; opacity: 0.55; }
.cfm-edge--future .cfm-edge__base { stroke: #9fb4bd; stroke-dasharray: 5 5; }
.cfm-edge--next .cfm-edge__base { stroke: #2f9bff; stroke-width: 2.2; stroke-dasharray: 6 5; }
.cfm-edge--traversed .cfm-edge__base { stroke: var(--brand-primary); stroke-width: 3.2; }
.cfm-edge--returned .cfm-edge__base { stroke: #f59e0b; stroke-width: 2.6; stroke-dasharray: 8 5; }
.cfm-edge.is-hidden { opacity: 0; }
.cfm-edge__flow {
  stroke-width: 2;
  stroke-dasharray: 2 40;
  stroke-linecap: round;
  animation: cfm-flow 1.1s linear infinite;
}
.cfm-edge--traversed .cfm-edge__flow { stroke: rgba(255, 255, 255, 0.75); }
.cfm-edge--next .cfm-edge__flow { stroke: #2f9bff; stroke-width: 3; stroke-dasharray: 2 40; animation-duration: 1.6s; }
.cfm-arrow--idle, .cfm-arrow--pending { fill: #c9d6db; }
.cfm-arrow--future { fill: #9fb4bd; }
.cfm-arrow--next { fill: #2f9bff; }
.cfm-arrow--traversed { fill: var(--brand-primary); }
.cfm-arrow--returned { fill: #f59e0b; }
.cfm-edge__label rect {
  fill: #fff;
  stroke: #d5e1e5;
}
.cfm-edge__label text {
  font: 600 11px Inter, system-ui, sans-serif;
  fill: #4a6470;
  text-anchor: middle;
}
.cfm-edge--traversed .cfm-edge__label rect { stroke: var(--brand-primary); fill: #f0fffb; }
.cfm-edge--traversed .cfm-edge__label text { fill: var(--brand-deepest); }
.cfm-edge--next .cfm-edge__label rect { stroke: #2f9bff; fill: #eff7ff; }
.cfm-edge--next .cfm-edge__label text { fill: #1565b0; }
.cfm-edge--returned .cfm-edge__label rect { stroke: #f59e0b; fill: #fff7e6; }
.cfm-edge--returned .cfm-edge__label text { fill: #9a5700; }
.cfm-edge--idle .cfm-edge__label { opacity: 0.6; }
.cfm-token__dot { fill: #fff; stroke: var(--brand-primary); stroke-width: 4; }
.cfm-token__halo { fill: rgba(0, 191, 154, 0.22); }
.cfm-token--back .cfm-token__dot { stroke: #f59e0b; }
.cfm-token--back .cfm-token__halo { fill: rgba(245, 158, 11, 0.25); }

.cfm-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid #d5e1e5;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 43, 73, 0.05);
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s, opacity 0.3s, transform 0.2s;
}
.cfm-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 43, 73, 0.12);
}
.cfm-node.is-selected {
  outline: 3px solid rgba(47, 155, 255, 0.45);
  outline-offset: 3px;
}
.cfm-node--terminal { border-radius: 40px; padding-left: 14px; }
.cfm-node--gate {
  border-style: dashed;
  background: #fbfcfd;
}
.cfm-node__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 19px;
  color: #5b7682;
  background: var(--surface-muted);
  transition: background 0.3s, color 0.3s;
}
.cfm-node--gate .cfm-node__icon { transform: rotate(45deg); border-radius: 7px; }
.cfm-node--gate .cfm-node__icon::before { display: inline-block; }
.cfm-node__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.cfm-node__text strong {
  font-size: 0.8rem;
  line-height: 1.2;
  color: var(--brand-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cfm-node__text em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cfm-node__badge {
  position: absolute;
  top: -9px;
  right: -9px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  animation: cfm-node-in 0.35s ease-out;
}
.cfm-node__badge .material-icons { font-size: 13px; }
.cfm-node__badge--done { background: var(--brand-primary); }
.cfm-node__badge--passed { background: #6fc7b4; }
.cfm-node__count {
  position: absolute;
  top: -9px;
  left: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #9a5700;
  background: #fff3d9;
  border: 1px solid #f5d896;
}
.cfm-node__avatar {
  position: absolute;
  right: 8px;
  bottom: -10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand-dark);
}

.cfm-node--done {
  border-color: var(--brand-primary);
  background: linear-gradient(180deg, #fff, #f2fffb);
}
.cfm-node--done .cfm-node__icon { color: #fff; background: var(--brand-primary); }
.cfm-node--passed { border-color: #9fdccd; background: #fbfffe; }
.cfm-node--passed .cfm-node__icon { color: var(--brand-deep); background: var(--tint-brand); }
.cfm-node--current,
.cfm-node--active {
  border-color: #2f9bff;
  border-width: 2px;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 155, 255, 0.14), 0 12px 28px rgba(47, 155, 255, 0.22);
  z-index: 2;
}
.cfm-node--current .cfm-node__icon,
.cfm-node--active .cfm-node__icon { color: #fff; background: #2f9bff; }
.cfm-node--active { animation: cfm-node-in 0.35s ease-out; border-color: var(--brand-primary); box-shadow: 0 0 0 6px rgba(0, 191, 154, 0.18); }
.cfm-node--active .cfm-node__icon { background: var(--brand-primary); }
.cfm-node--current.is-late { border-color: var(--error); box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14), 0 12px 28px rgba(239, 68, 68, 0.2); }
.cfm-node--current.is-late .cfm-node__icon { background: var(--error); }
.cfm-node--current.is-late .cfm-node__text em { color: var(--error-fg); font-weight: 600; }
.cfm-node__pulse {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid #2f9bff;
  animation: cfm-pulse 1.8s ease-out infinite;
  pointer-events: none;
}
.cfm-node.is-late .cfm-node__pulse { border-color: var(--error); }
.cfm-node--next { border-color: #8cc5ff; border-style: dashed; }
.cfm-node--next .cfm-node__icon { color: #1565b0; background: #e8f3ff; }
.cfm-node--future { opacity: 0.85; }
.cfm-node--idle,
.cfm-node--pending { opacity: 0.42; filter: grayscale(0.6); }
.cfm-node--idle:hover,
.cfm-node--pending:hover { opacity: 0.85; filter: none; }

.cfm-ctrl {
  position: absolute;
  z-index: 3;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0, 43, 73, 0.1);
}
.cfm-ctrl button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3d5865;
  cursor: pointer;
}
.cfm-ctrl button:hover { background: var(--surface-muted); }
.cfm-ctrl button .material-icons { font-size: 19px; }
.cfm-ctrl--zoom { right: 14px; top: 14px; flex-direction: column; }
.cfm-ctrl--play {
  left: 14px;
  top: 14px;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
}
.cfm-ctrl .cfm-play {
  display: inline-flex;
  width: auto;
  gap: 6px;
  padding: 0 12px;
  font: 600 0.78rem Inter, system-ui, sans-serif;
  color: #fff;
  background: var(--brand-dark);
}
.cfm-ctrl .cfm-play:hover { background: #0a3d62; }
.cfm-ctrl .cfm-play:disabled { opacity: 0.5; cursor: default; }
.cfm-ctrl .cfm-play .material-icons { font-size: 17px; }
.cfm-progress {
  width: 110px;
  height: 5px;
  border-radius: 4px;
  background: #e1eaee;
  overflow: hidden;
}
.cfm-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-light));
  transition: width 0.3s ease;
}
.cfm-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.cfm-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.cfm-legend__item i { width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid #c9d6db; background: #fff; }
.cfm-legend__item--done i { background: var(--brand-primary); border-color: var(--brand-primary); }
.cfm-legend__item--current i { border-color: #2f9bff; box-shadow: 0 0 0 3px rgba(47, 155, 255, 0.2); }
.cfm-legend__item--passed i { background: var(--tint-brand); border-color: #9fdccd; }
.cfm-legend__item--next i { border-color: #8cc5ff; border-style: dashed; }
.cfm-legend__item--future i { border-color: #9fb4bd; }
.cfm-legend__item--idle i { opacity: 0.45; }
.cfm-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.cfm-loading--err { color: var(--error-fg); }
.cfm-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cfe0e5;
  border-top-color: var(--brand-primary);
  animation: cfm-spin 0.8s linear infinite;
}

.cfm-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line);
  background: #fff;
}
.cfm-detail {
  display: grid;
  gap: 8px;
  margin: 12px 12px 0;
  padding: 12px;
  border: 1px solid #cfe3ff;
  border-radius: 12px;
  background: #f7fbff;
  animation: cfm-fade-in 0.2s ease-out;
}
.cfm-detail__head { display: flex; gap: 10px; align-items: flex-start; }
.cfm-detail__head > .material-icons {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #e3f0ff;
  color: #1565b0;
  font-size: 18px;
}
.cfm-detail__head > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.cfm-detail__head strong { font-size: 0.85rem; color: var(--brand-dark); }
.cfm-detail__head span { font-size: 0.72rem; color: var(--text-secondary); }
.cfm-detail__visit { display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid #e2eefb; }
.cfm-detail__visit > div { display: grid; gap: 2px; font-size: 0.78rem; }
.cfm-detail__visit span { color: var(--text-secondary); font-size: 0.72rem; }
.cfm-detail .field-hint { margin: 0; }
.cfm-chip {
  justify-self: start;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--surface-muted);
  color: var(--text-secondary);
}
.cfm-chip--done, .cfm-chip--passed { background: var(--success-bg); color: var(--success-fg); }
.cfm-chip--current { background: #e3f0ff; color: #1565b0; }
.cfm-chip--next { background: #eef6ff; color: #1565b0; }
.cfm-quote {
  display: block;
  margin: 4px 0 0;
  padding: 6px 9px;
  border-left: 3px solid #cfdde2;
  border-radius: 0 6px 6px 0;
  background: var(--surface-subtle);
  font-size: 0.74rem;
  color: #3d5865;
  white-space: pre-wrap;
}
.cfm-tabs {
  display: flex;
  gap: 4px;
  margin: 12px 12px 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--surface-muted);
}
.cfm-tabs button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: 600 0.76rem Inter, system-ui, sans-serif;
  color: var(--text-secondary);
  cursor: pointer;
}
.cfm-tabs button .material-icons { font-size: 16px; }
.cfm-tabs button.is-on { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 4px rgba(0, 43, 73, 0.1); }
.cfm-timeline {
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: 10px 12px 18px;
  list-style: none;
}
.cfm-tl {
  position: relative;
  animation: cfm-fade-in 0.3s ease-out both;
}
.cfm-tl::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 34px;
  bottom: -6px;
  width: 2px;
  background: #dbe9ec;
}
.cfm-tl:last-child::before { display: none; }
.cfm-tl > button,
.cfm-tl--end {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 7px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.cfm-tl > button:hover { background: var(--surface-subtle); }
.cfm-tl.is-selected > button { background: #f0f7ff; }
.cfm-tl__dot {
  position: relative;
  z-index: 1;
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand-primary);
  box-shadow: 0 0 0 3px #fff;
}
.cfm-tl__dot .material-icons { font-size: 15px; }
.cfm-tl--auto .cfm-tl__dot { width: 22px; height: 22px; margin: 2px; background: var(--tint-brand); color: var(--brand-deep); }
.cfm-tl--auto .cfm-tl__dot .material-icons { font-size: 13px; }
.cfm-tl--open .cfm-tl__dot { background: #2f9bff; animation: cfm-dot-blue 1.8s infinite; }
.cfm-tl--open.is-late .cfm-tl__dot { background: var(--error); animation: cfm-dot-red 1.6s infinite; }
.cfm-tl--end .cfm-tl__dot { background: var(--brand-dark); }
@keyframes cfm-dot-blue {
  0% { box-shadow: 0 0 0 3px #fff, 0 0 0 3px rgba(47, 155, 255, 0.5); }
  100% { box-shadow: 0 0 0 3px #fff, 0 0 0 11px rgba(47, 155, 255, 0); }
}
.cfm-tl__body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.cfm-tl__body strong { font-size: 0.8rem; color: var(--brand-dark); }
.cfm-tl--auto .cfm-tl__body strong { font-weight: 500; color: #4a6470; }
.cfm-tl__meta { font-size: 0.72rem; color: var(--text-secondary); }
.cfm-tl__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.cfm-tl__bar i {
  display: block;
  height: 6px;
  max-width: 62%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand-primary), #5fd8c0);
}
.cfm-tl--open .cfm-tl__bar i { background: linear-gradient(90deg, #2f9bff, #8cc5ff); }
.cfm-tl--open.is-late .cfm-tl__bar i { background: linear-gradient(90deg, var(--error), #f9a0a0); }
.cfm-tl__bar em { font-style: normal; font-size: 0.68rem; font-weight: 600; color: #4a6470; white-space: nowrap; }
.cfm-tl__late {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--error-fg);
}
.cfm-tl__late .material-icons { font-size: 14px; }
.cfm-tl--skeleton { height: 160px; border-radius: 10px; background: linear-gradient(90deg, #f1f5f7, #e8eff2, #f1f5f7); }
.cfm-next { flex: 1; overflow-y: auto; padding: 10px 12px 18px; }
.cfm-next__group { display: grid; gap: 8px; margin-bottom: 14px; }
.cfm-next__now {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef6ff;
  border: 1px solid #cfe3ff;
}
.cfm-next__now span { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: #1565b0; font-weight: 700; }
.cfm-next__now strong { display: block; font-size: 0.82rem; color: var(--brand-dark); }
.cfm-node__pulse--inline {
  position: relative;
  inset: auto;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: #2f9bff;
  animation: cfm-dot-blue 1.8s infinite;
}
.cfm-next__item {
  display: flex;
  gap: 8px;
  padding: 8px 10px 8px 6px;
  margin-left: 12px;
  border: 1px dashed #b8d8fb;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.cfm-next__item:hover { background: #f5faff; border-color: #2f9bff; }
.cfm-next__arrow { color: #8cc5ff; }
.cfm-next__body { display: grid; gap: 2px; min-width: 0; }
.cfm-next__body em { font-style: normal; font-size: 0.68rem; font-weight: 700; color: #1565b0; }
.cfm-next__body strong { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--brand-dark); }
.cfm-next__body strong .material-icons { font-size: 15px; color: #5b7682; }
.cfm-next__body > span { font-size: 0.7rem; color: var(--text-secondary); }

@media (max-width: 980px) {
  .cfm-backdrop { padding: 0; }
  .cfm { border-radius: 0; height: 100%; }
  .cfm-kpis { display: none; }
  .cfm-body { grid-template-columns: 1fr; grid-template-rows: minmax(300px, 55%) 1fr; }
  .cfm-side { border-left: 0; border-top: 1px solid var(--line); }
  .cfm-legend { display: none; }
  .cfm-head__actions .app-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cfm-edge__flow, .cfm-node__pulse, .cfm-pill i, .cfm-tl__dot { animation: none !important; }
}

/* ── UI audit, 11/11 ─────────────────────────────────────────────── */

/* Calendário: `1fr` deixava cada coluna crescer com o nome do feriado, o
 * mês ficava torto e o domingo saía da tela no celular. */
.cal-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-cell {
  min-width: 0;
  overflow: hidden;
}
.cal-name {
  max-width: 100%;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
@media (max-width: 640px) {
  .cal-grid {
    gap: 3px;
    padding: 8px;
  }
  .cal-cell {
    padding: 5px;
    border-radius: 8px;
  }
  /* Sem largura para o nome: a cor marca o feriado e a lista abaixo o nomeia. */
  .cal-name {
    display: none;
  }
}
/* Lista de feriados na lateral: "Remover" ficava cortado atrás de uma
 * rolagem horizontal. */
.cal-layout {
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem);
}
@media (max-width: 1100px) {
  .cal-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
.cal-side .cal-pane-list {
  overflow-x: hidden;
}
.cal-side .list-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 10px;
  padding-inline: 0.9rem;
}
.cal-side .list-row__meta {
  gap: 2px;
}

/* Linhas de lista com várias ações: no celular os botões saíam pela
 * esquerda da tela. Agora descem para a linha de baixo e quebram. */
@media (max-width: 760px) {
  .task-row:has(.header-actions) {
    grid-template-columns: minmax(0, 1fr);
  }
  .task-row .header-actions {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
}

/* Ação destrutiva numa linha: discreta até o ponteiro chegar, para não
 * competir com "Abrir" logo ao lado. */
.app-btn.app-btn--quiet-danger {
  color: var(--text-secondary);
}
.app-btn.app-btn--quiet-danger:hover,
.app-btn.app-btn--quiet-danger:focus-visible {
  background: #ffeceb;
  border-color: #f3b8b3;
  color: #8f1b1b;
}

/* ---------- Cadeia de fluxos (flows calling flows) ---------- */
.chain-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.chain-crumbs__icon {
  font-size: 16px;
  color: var(--brand-deep);
  margin-right: 2px;
}
.chain-crumbs__seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.chain-crumbs__link {
  color: var(--brand-deep);
  text-decoration: none;
  font-weight: 600;
}
.chain-crumbs__link:hover { text-decoration: underline; }
.chain-crumbs__here {
  font-weight: 700;
  color: var(--text-primary);
}
.chain-crumbs__via {
  display: inline-flex;
  align-items: center;
  color: var(--neutral);
}
.chain-crumbs__via .material-icons { font-size: 16px; }
.chain-crumbs__via em {
  font-style: normal;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-secondary);
}

.chain-panel__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.chain-seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.chain-seg button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 5px 10px;
  font: inherit;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.chain-seg button .material-icons { font-size: 16px; }
.chain-seg button.is-on {
  background: var(--tint-brand);
  color: var(--brand-deepest);
  font-weight: 600;
}

.chain-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 1.25rem 0.75rem;
}
.chain-stats span {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--text-secondary);
}
.chain-stats strong { color: var(--text-primary); }
.chain-stats .is-open { background: var(--tint-brand-soft); border-color: var(--tint-brand-border); }
.chain-stats .is-blocked { background: var(--error-bg); border-color: #f5c2c2; color: var(--error-fg); }
.chain-stats .is-blocked strong { color: var(--error-fg); }

.chain-attention {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 1.25rem 1rem;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--tint-brand-border);
  background: var(--tint-brand-soft);
  color: var(--mint-fg);
  font-size: 0.85rem;
}
.chain-attention p { margin: 0; flex: 1; min-width: 0; }
.chain-attention--error {
  border-color: #f5c2c2;
  background: var(--error-bg);
  color: var(--error-fg);
}

.chain-tree {
  list-style: none;
  margin: 0;
  padding: 0 1.25rem 1.1rem;
}
.chain-tree--nested {
  position: relative;
  padding: 0 0 0 26px;
  margin-top: 6px;
}
.chain-tree--nested::before {
  content: '';
  position: absolute;
  left: 13px;
  top: -6px;
  bottom: 22px;
  border-left: 2px dashed var(--line-strong);
}
.chain-tree--nested > .chain-node { position: relative; }
.chain-tree--nested > .chain-node::before {
  content: '';
  position: absolute;
  left: -13px;
  top: 24px;
  width: 13px;
  border-top: 2px dashed var(--line-strong);
}
.chain-node + .chain-node { margin-top: 8px; }
.chain-node__card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--neutral);
  border-radius: 10px;
  background: var(--surface-color);
  transition: box-shadow 0.15s ease;
}
.chain-node__card:hover { box-shadow: var(--shadow); }
.chain-node.is-here > .chain-node__card {
  background: var(--tint-brand-soft);
  border-color: var(--tint-brand-border);
}
.chain-node.is-running > .chain-node__card { border-left-color: var(--brand-primary); }
.chain-node.is-waiting > .chain-node__card { border-left-color: var(--brand-light); }
.chain-node.is-done > .chain-node__card { border-left-color: var(--success); }
.chain-node.is-rejected > .chain-node__card { border-left-color: var(--warning); }
.chain-node.is-cancelled > .chain-node__card { border-left-color: var(--neutral); }
.chain-node.is-blocked > .chain-node__card { border-left-color: var(--error); }
.chain-node__status .material-icons { font-size: 22px; color: var(--neutral); }
.is-running > .chain-node__card .chain-node__status .material-icons { color: var(--brand-primary); }
.is-waiting > .chain-node__card .chain-node__status .material-icons { color: var(--brand-light); }
.is-done > .chain-node__card .chain-node__status .material-icons { color: var(--success); }
.is-rejected > .chain-node__card .chain-node__status .material-icons { color: var(--warning); }
.is-blocked > .chain-node__card .chain-node__status .material-icons { color: var(--error); }
.chain-node__body { flex: 1; min-width: 0; }
.chain-node__body p { margin: 0; }
.chain-node__via {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 2px !important;
}
.chain-node__via .material-icons { font-size: 14px; }
.chain-node__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 0.9rem;
}
.chain-node__title a { color: var(--brand-deep); text-decoration: none; }
.chain-node__title a:hover { text-decoration: underline; }
.chain-node__flow { color: var(--text-primary); display: inline-flex; gap: 6px; align-items: baseline; }
.chain-node__ver {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-secondary);
}
.chain-node__here {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-deep);
}
.chain-node__where { font-size: 0.82rem; color: var(--text-secondary); margin-top: 2px !important; }
.chain-node__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 6px !important;
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.chain-node__meta span { display: inline-flex; align-items: center; gap: 2px; }
.chain-node__meta .material-icons { font-size: 14px; }
.chain-chip {
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 600;
  background: var(--surface-muted);
}
.chain-chip.is-running { background: var(--tint-brand); color: var(--brand-deepest); }
.chain-chip.is-waiting { background: #e3f6fa; color: #046c80; }
.chain-chip.is-done { background: var(--success-bg); color: var(--success-fg); }
.chain-chip.is-rejected { background: var(--warning-bg); color: var(--warning-fg); }
.chain-chip.is-blocked { background: var(--error-bg); color: var(--error-fg); }
.chain-node__actions { display: flex; gap: 4px; flex-shrink: 0; }
.chain-node__blocked {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--error-bg);
  color: var(--error-fg);
  font-size: 0.8rem;
}
.chain-node__blocked > div { flex: 1; }
.chain-node__blocked time { font-size: 0.7rem; opacity: 0.8; }

.chain-timeline {
  list-style: none;
  margin: 0;
  padding: 0 1.25rem 1.1rem;
}
.chain-tl {
  display: grid;
  grid-template-columns: 92px 14px 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 0 6px calc(var(--chain-depth, 0) * 18px);
  position: relative;
}
.chain-tl time { font-size: 0.72rem; color: var(--text-secondary); padding-top: 2px; }
.chain-tl__dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--brand-light);
  box-shadow: 0 0 0 3px var(--surface-color), 0 0 0 4px var(--line);
}
.chain-tl--ok .chain-tl__dot { background: var(--success); }
.chain-tl--warn .chain-tl__dot { background: var(--warning); }
.chain-tl--error .chain-tl__dot { background: var(--error); }
.chain-tl p { margin: 0; }
.chain-tl__who { display: flex; gap: 6px; align-items: baseline; font-size: 0.82rem; flex-wrap: wrap; }
.chain-tl__who a { color: var(--brand-deep); text-decoration: none; }
.chain-tl__who > span { color: var(--text-secondary); }
.chain-tl__text { font-size: 0.82rem; color: var(--text-primary); }
.chain-tl--error .chain-tl__text { color: var(--error-fg); }

@media (max-width: 640px) {
  .chain-node__card { flex-wrap: wrap; }
  .chain-node__actions { width: 100%; justify-content: flex-end; }
  .chain-tl { grid-template-columns: 1fr; padding-left: calc(var(--chain-depth, 0) * 10px); }
  .chain-tl__dot { display: none; }
}

/* ---------- Chamar outro fluxo - guided inspector ---------- */
.subflow-explainer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-subtle);
  font-size: 0.75rem;
}
.subflow-explainer__box {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface-color);
  border: 1px solid var(--line);
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}
.subflow-explainer__box .material-icons { font-size: 16px; color: var(--brand-deep); }
.subflow-explainer__box--child { border-color: var(--tint-brand-border); background: var(--tint-brand-soft); }
.subflow-explainer__box.is-empty { border-style: dashed; color: var(--text-secondary); background: transparent; }
.subflow-explainer__arrow {
  position: relative;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.68rem;
  padding-bottom: 6px;
}
.subflow-explainer__arrow::after {
  content: '→';
  display: block;
  font-size: 1rem;
  line-height: 1;
  color: var(--brand-deep);
}
.subflow-explainer__back {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.subflow-explainer__back > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
}
.subflow-explainer__back .material-icons { font-size: 14px; }
.subflow-explainer__ok { background: var(--success-bg); color: var(--success-fg); }
.subflow-explainer__ko { background: var(--warning-bg); color: var(--warning-fg); }

.subflow-checks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; }
.subflow-check {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.76rem;
  line-height: 1.35;
}
.subflow-check .material-icons { font-size: 16px; }
.subflow-check--ok { background: var(--success-bg); color: var(--success-fg); }
.subflow-check--warn { background: var(--warning-bg); color: var(--warning-fg); }
.subflow-check--error { background: var(--error-bg); color: var(--error-fg); }

.subflow-code-row { display: flex; gap: 6px; align-items: center; }
.subflow-code-row input { flex: 1; min-width: 0; }
.subflow-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 4px 0 8px; }
.subflow-chips__label { font-size: 0.72rem; color: var(--text-secondary); margin-right: 2px; }
.subflow-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px 2px 4px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: var(--surface-color);
  font: inherit;
  font-size: 0.72rem;
  color: var(--text-primary);
  cursor: pointer;
}
.subflow-chip .material-icons { font-size: 14px; color: var(--brand-deep); }
.subflow-chip:hover { border-color: var(--brand-primary); }
.subflow-chip.is-mapped {
  border-style: solid;
  border-color: var(--tint-brand-border);
  background: var(--tint-brand-soft);
  cursor: default;
}
.subflow-auto { margin-bottom: 6px; }
.subflow-callers { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 4px; }
.subflow-callers li { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8rem; }
.subflow-callers a { color: var(--brand-deep); font-weight: 600; text-decoration: none; }
.subflow-callers span { color: var(--text-secondary); font-size: 0.72rem; }
.chain-attention--warn {
  border-color: #f3d9a4;
  background: var(--warning-bg);
  color: var(--warning-fg);
}
.chain-node__blocked.is-past { background: var(--warning-bg); color: var(--warning-fg); }
.case-actionbar__note--subflow {
  align-items: flex-start;
  padding: 6px 10px;
  border-radius: 8px;
  background: #e3f6fa;
  color: #046c80;
  max-width: 46rem;
}
.case-actionbar__note--subflow .material-icons { margin-top: 1px; color: #046c80; }

.join-admin {
  border: 1px solid var(--border, #e3e8ef);
  border-radius: 10px;
  background: #fafbfd;
  padding: 0 14px;
}
.join-admin > summary {
  cursor: pointer;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: #475467;
  list-style: none;
}
.join-admin > summary::-webkit-details-marker { display: none; }
.join-admin > summary::before { content: '▸'; display: inline-block; margin-right: 8px; transition: transform .15s; }
.join-admin[open] > summary::before { transform: rotate(90deg); }
.join-admin[open] { padding-bottom: 12px; }

.case-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border, #e3e8ef);
  margin: 4px 0 12px;
  overflow-x: auto;
}
.case-tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  margin-bottom: -1px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #667085;
  cursor: pointer;
  white-space: nowrap;
}
.case-tab:hover { color: #172033; }
.case-tab.is-on { color: #0b6b57; border-bottom-color: #0b6b57; }
.case-tab__count {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef2f6;
  font-size: 12px;
  color: #475467;
}
.case-tab.is-on .case-tab__count { background: #d5f3ea; color: #0b6b57; }

/* case page spacing + timeline */
.case-actionbar { margin-bottom: 14px; }
.case-actionbar + .summary-grid, .case-actionbar ~ .summary-grid { margin-top: 0; }
.case-tabs { margin: 8px 0 20px; padding: 0 4px; }
.chain-stats, .case-chain .chain-stats { margin-top: 12px; margin-bottom: 12px; }
.tl { padding: 18px 22px 24px; display: flex; flex-direction: column; gap: 22px; }
.tl-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-chip { appearance: none; border: 1px solid #e3e8ef; background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: #475467; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.tl-chip span { font-size: 12px; background: #eef2f6; border-radius: 999px; padding: 0 7px; }
.tl-chip.is-on { background: #0b6b57; border-color: #0b6b57; color: #fff; }
.tl-chip.is-on span { background: rgba(255,255,255,.22); color: #fff; }
.tl-day__label { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #667085; }
.tl-list { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; gap: 14px; }
.tl-list::before { content: ''; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px; background: #e3e8ef; }
.tl-item { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
.tl-icon { z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--tl, #98a2b3); color: var(--tl, #98a2b3); }
.tl-icon .material-icons { font-size: 20px; }
.tl-item--ok { --tl: #12805c; } .tl-item--bad { --tl: #c0392b; } .tl-item--warn { --tl: #b7791f; }
.tl-item--info { --tl: #2563eb; } .tl-item--flow { --tl: #7c3aed; } .tl-item--brand { --tl: #0b6b57; } .tl-item--muted { --tl: #98a2b3; }
.tl-card { background: #fff; border: 1px solid #e8edf3; border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.tl-item--muted .tl-card { background: #fafbfc; }
.tl-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tl-title { font-size: 15px; color: #172033; }
.tl-times { margin-left: 8px; font-style: normal; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #eef2f6; color: #475467; }
.tl-time { font-size: 13px; color: #667085; font-variant-numeric: tabular-nums; }
.tl-actor { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #475467; }
.tl-avatar { width: 22px; height: 22px; border-radius: 50%; background: #0b6b57; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.tl-note { margin: 0; font-size: 13px; line-height: 1.5; color: #475467; }
.tl-link { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 13px; font-weight: 600; color: #0b6b57; text-decoration: none; padding: 4px 10px; border-radius: 8px; background: #e8f6f1; }
.tl-link .material-icons { font-size: 15px; }
.tl-changes { display: flex; flex-direction: column; gap: 6px; }
.tl-changes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tl-changes li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13px; line-height: 1.45; }
.tl-changes__label { font-weight: 600; color: #344054; }
.tl-changes__label::after { content: ':'; }
.tl-changes__from { color: #667085; text-decoration: line-through; overflow-wrap: anywhere; }
.tl-changes__from.is-empty { text-decoration: none; font-style: italic; }
.tl-changes__arrow { color: #667085; }
.tl-changes__to { color: #0b6b57; font-weight: 600; overflow-wrap: anywhere; }
.tl-more { align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: #0b6b57; cursor: pointer; }
.tl-folded { margin: 0; padding-left: 18px; font-size: 13px; color: #667085; }

.panel--link .link-copy { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel--link .link-copy input { flex: 1 1 320px; min-width: 0; padding: 9px 12px; border: 1px solid #d5dbe4; border-radius: 8px; font: inherit; font-size: 13px; background: #f8fafc; color: #172033; }

.inbox-row--child { position: relative; background: #fbfdfc; border-left: 3px solid #12805c; }
.inbox-row--child::before { content: ''; position: absolute; left: -17px; top: -12px; bottom: 50%; width: 14px; border-left: 2px solid #c9d6d1; border-bottom: 2px solid #c9d6d1; border-bottom-left-radius: 8px; pointer-events: none; }
.inbox-row__called { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #0b6b57; margin-bottom: 2px; }
.inbox-row__called .material-icons { font-size: 16px; }

.ss--compact .ss__btn { padding: 6px 8px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.ss--compact .ss__chev { font-size: 16px; }
.ss--compact .ss__hint { display: none; }
.kv-row .ss { min-width: 0; }
.kv-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #d5dbe4;
  border-radius: 8px;
  background: #fff;
}
.kv-filter .material-icons { font-size: 16px; color: #667085; }
.kv-filter input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 13px; min-width: 0; background: transparent; }
.kv-filter span:last-child { font-size: 11px; color: #667085; white-space: nowrap; }
.code-studio__tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; }
.code-studio__empty { margin: 0; font-size: 0.75rem; color: #64748b; line-height: 1.4; }
.field-pick__options { list-style: none; margin: 8px 0 0; padding: 0; max-height: 220px; overflow: auto; }
.field-pick__option {
  display: flex; align-items: center; gap: 8px; width: 100%;
  text-align: left; border: 0; background: transparent; padding: 7px 8px;
  border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px;
}
.field-pick__option:hover { background: #eef6f3; }
.field-pick__option small { margin-left: auto; color: #667085; font-size: 11px; }
.spec-inspector-card summary, .property-group > summary.field-label { cursor: pointer; list-style: none; }
.spec-inspector-card summary::-webkit-details-marker, .property-group > summary::-webkit-details-marker { display: none; }
.property-group > summary.field-label { margin-bottom: 8px; }
.ss__btn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border: 1px solid #d5dbe4; border-radius: 10px; background: #fff; font: inherit; font-size: 14px; color: #172033; cursor: pointer; }
.ss__btn:hover { border-color: #98a2b3; }
.ss__btn.is-empty .ss__label { color: #667085; }
.ss__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ss__hint { font-size: 12px; color: #667085; }
.ss__chev { font-size: 18px; color: #667085; }
.ss__pop { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid #d5dbe4; border-radius: 12px; box-shadow: 0 12px 32px rgba(16,24,40,.14); overflow: hidden; }
.ss__search { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #eef2f6; }
.ss__search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 14px; }
.ss__search .material-icons { font-size: 18px; color: #667085; }
.ss__list { list-style: none; margin: 0; padding: 6px; max-height: 260px; overflow: auto; }
.ss__opt { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.ss__opt small { color: #667085; font-size: 12px; }
.ss__opt.is-at { background: #eef6f3; }
.ss__opt.is-on { font-weight: 600; color: #0b6b57; }
.ss__none { padding: 12px; color: #667085; font-size: 13px; }


/* ── Dynamic List (`list`) & Editable Table (`table`) ─────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Guarantee grid/flex parents never expand beyond 100% of the card */
.vagas-field,
.pub-cell,
.property-group.ff,
.fb-preview__paper {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.fb-collection-cfg {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 4px 0 8px;
  padding: 12px;
  background: var(--surface-subtle, #f7fbfc);
  border: 1px solid var(--line, #dbe5e8);
  border-radius: 10px;
}

.fb-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.fb-preset-chip {
  appearance: none;
  border: 1px solid var(--line-strong, #bdcdd2);
  background: #fff;
  color: var(--brand-dark, #002b49);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.fb-preset-chip:hover,
.fb-preset-chip.is-on {
  border-color: var(--brand-primary, #00bf9a);
  background: var(--tint-brand, #e8faf5);
  color: var(--brand-deepest, #075c51);
}

.fb-col-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 8px;
}

.fb-col-card {
  background: #fff;
  border: 1px solid var(--line, #dbe5e8);
  border-radius: 8px;
  overflow: hidden;
}
.fb-col-card.is-open {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 2px 8px rgba(0, 43, 73, 0.05);
}

.fb-col-card__head {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px 4px 10px;
}

.fb-col-card__toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary, #1e293b);
}

.fb-col-card__title {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fb-col-card__meta {
  font-size: 11px;
  color: var(--text-secondary, #64748b);
  background: var(--surface-sunken, #eef4f6);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.fb-col-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--surface-muted, #edf1f2);
  background: #fcfefe;
}

.fb-col-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 6px;
}

.fb-col-card__body input:not([type='checkbox']),
.fb-col-card__body select,
.fb-col-card__body textarea {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line-strong, #bdcdd2);
  border-radius: 7px;
  font: inherit;
  font-size: 12.5px;
  background: #fff;
  color: var(--text-primary, #1e293b);
}

.fb-col-sub {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: var(--surface-sunken, #eef4f6);
  border-radius: 7px;
}
.fb-col-sub > label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
}

.fb-col-formula {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  gap: 6px;
}

.fb-col-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fb-total-bind {
  margin-top: 2px;
}

.property-group.ff--full {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  grid-column: 1 / -1;
}

/* ── Form Filling: Unified Collection Cards (`.ff-list-card` & `.ff-table-card`) ── */
.ff-collection {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 2px;
  box-sizing: border-box;
  container-type: inline-size;
}

.ff-list-card,
.ff-table-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--line-strong-alt, #b9c9ce);
  border-radius: var(--pub-radius, 11px);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 43, 73, 0.03);
}

.ff-list-rows {
  display: flex;
  flex-direction: column;
}

.ff-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 12px;
  min-height: 43px;
  border-bottom: 1px solid #eef3f5;
  background: #fff;
  transition: background 0.12s ease;
}
.ff-list-row:focus-within {
  background: #f6fefc;
  box-shadow: inset 3px 0 0 var(--brand-primary, #00bf9a);
}

.ff-list-row__num {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 6px;
  background: #eff4f6;
  color: #5b6e7d;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.ff-list-row__input {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ff-inline-unit {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  user-select: none;
}

/* Override any outer `.vagas-field input` or `.property-group input` rules */
.ff-list-card .ff-list-row__input input,
.vagas-page .vagas-field .ff-list-card .ff-list-row__input input {
  width: 100% !important;
  height: 41px !important;
  min-height: 0 !important;
  padding: 0 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 14px !important;
  color: var(--text-primary, #1e293b);
  outline: none !important;
}

.ff-list-row__tools,
.ff-table__row-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  flex-shrink: 0;
}

.ff-row-btn {
  appearance: none;
  border: 0 !important;
  background: transparent !important;
  color: #7c8d9c;
  width: 26px !important;
  height: 26px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 6px !important;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.ff-row-btn .material-icons {
  font-size: 16px !important;
}
.ff-row-btn:hover:not(:disabled) {
  background: #edf3f5 !important;
  color: var(--brand-dark, #002b49);
}
.ff-row-btn--danger:hover:not(:disabled) {
  background: #ffebeb !important;
  color: #c92a2a;
}
.ff-row-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

/* Integrated bottom action & summary bar */
.ff-collection-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 7px 12px;
  background: #f8fbfc;
  border-top: 1px solid #e3ecef;
}

.ff-add-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px 0 8px;
  border: 1px solid #c6d6dc;
  border-radius: 7px;
  background: #fff;
  color: var(--brand-dark, #002b49);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.ff-add-btn .material-icons {
  font-size: 16px !important;
  color: var(--brand-deep, #087961);
}
.ff-add-btn:hover:not(:disabled) {
  border-color: var(--brand-primary, #00bf9a);
  background: var(--tint-brand-soft, #f0fffb);
  color: var(--brand-deepest, #075c51);
}
.ff-add-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.ff-table-totals {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-left: auto;
}

.ff-total-pill {
  font-size: 12.5px;
  color: var(--text-secondary, #64748b);
  font-variant-numeric: tabular-nums;
}
.ff-total-pill small {
  font-size: 11.5px;
  font-weight: 500;
  color: #64748b;
}
.ff-total-pill strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand-deepest, #075c51);
}

.ff-collection-meta {
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

/* ── Editable Table Grid (`.ff-table`) ── */
.ff-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.ff-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.ff-table__col-idx {
  width: 32px;
}
.ff-table__col-act {
  width: 58px;
}

.ff-table thead th {
  background: #f5f9fa;
  color: #526574;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 8px 9px;
  border-bottom: 1px solid #dfe8ec;
  border-right: 1px solid #eaf0f3;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ff-table thead th:last-child {
  border-right: 0;
}
.ff-table thead th.is-num,
.ff-table td.is-num {
  text-align: right;
}

.ff-table__th-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.ff-table__num-col {
  width: 30px;
  padding: 0 4px !important;
  text-align: center !important;
  color: #7c8d9c;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: #fafcfd;
  border-right: 1px solid #eaf0f3;
  user-select: none;
}

.ff-table__actions-col {
  width: 56px;
  padding: 0 2px !important;
  text-align: right;
  border-right: 0 !important;
  background: #fff;
}

.ff-table tbody tr {
  border-bottom: 1px solid #eef3f5;
  background: #fff;
}
.ff-table tbody tr:last-child {
  border-bottom: 0;
}
.ff-table tbody tr:hover {
  background: #fcfefe;
}

.ff-table tbody td {
  padding: 0;
  height: 41px;
  vertical-align: middle;
  border-right: 1px solid #eef3f5;
  position: relative;
  min-width: 0;
}
.ff-table tbody td:last-child {
  border-right: 0;
}

.ff-table tbody td:focus-within:not(.ff-table__actions-col):not(.ff-table__bool) {
  background: #f3fefb;
  box-shadow: inset 0 0 0 2px var(--brand-primary, #00bf9a);
  z-index: 1;
}

/* Seamless cell inputs & selects overriding `.vagas-field` defaults */
.ff-table tbody td input:not([type='checkbox']),
.ff-table tbody td select,
.vagas-page .vagas-field .ff-table tbody td input:not([type='checkbox']),
.vagas-page .vagas-field .ff-table tbody td select {
  width: 100% !important;
  height: 41px !important;
  min-height: 0 !important;
  padding: 0 9px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 13px !important;
  color: var(--text-primary, #1e293b);
  outline: none !important;
  box-sizing: border-box !important;
}

.ff-table tbody td select,
.vagas-page .vagas-field .ff-table tbody td select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  padding-right: 24px !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-position: right 6px center !important;
  background-size: 14px 14px !important;
  background-repeat: no-repeat !important;
  cursor: pointer;
  text-overflow: ellipsis;
}

/* Ensure `.vagas-field select` and `.vagas-field input` keep their custom chevron
   and identical 44px height even under `[data-skin='plain']` or vendor engines */
.vagas-field select,
.vagas-page[data-skin='plain'] .vagas-field select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-size: 16px 16px;
  background-repeat: no-repeat;
}
.vagas-field > input:not([type='checkbox']):not([type='radio']):not([type='file']),
.vagas-field > select {
  height: 44px;
  min-height: 44px;
  line-height: 42px;
  box-sizing: border-box;
}

.ff-table tbody td input.is-num,
.vagas-page .vagas-field .ff-table tbody td input.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Remove number spinner arrows inside tight table cells */
.ff-table tbody td input[type='number']::-webkit-outer-spin-button,
.ff-table tbody td input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ff-table tbody td input[type='number'] {
  -moz-appearance: textfield;
}

.ff-cell-affix {
  display: flex;
  align-items: center;
  width: 100%;
  height: 41px;
  padding: 0 9px;
  box-sizing: border-box;
  gap: 3px;
}
.ff-cell-affix > span {
  font-size: 11.5px;
  font-weight: 600;
  color: #7c8d9c;
  user-select: none;
  flex-shrink: 0;
}
.ff-cell-affix > input,
.vagas-page .vagas-field .ff-table tbody td .ff-cell-affix > input {
  padding: 0 !important;
  height: 100% !important;
}

.ff-table__computed {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13px;
  color: var(--brand-dark, #002b49);
  padding: 0 10px !important;
  background: #fafcfd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ff-table__bool {
  text-align: center;
}
.ff-table__bool input[type='checkbox'],
.vagas-page .vagas-field .ff-table tbody td.ff-table__bool input[type='checkbox'] {
  width: 16px !important;
  height: 16px !important;
  min-height: 0 !important;
  padding: 0 !important;
  accent-color: var(--brand-primary, #00bf9a);
  cursor: pointer;
}

/* Mobile / narrow container stacked cards for editable tables */
@container (max-width: 520px) {
  .ff-table colgroup,
  .ff-table thead {
    display: none;
  }
  .ff-table,
  .ff-table tbody,
  .ff-table tr,
  .ff-table td {
    display: block;
    width: 100% !important;
  }
  .ff-table tbody tr {
    padding: 8px 12px;
    border-bottom: 1px solid #dfe8ec;
  }
  .ff-table__num-col {
    display: none !important;
  }
  .ff-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: auto;
    min-height: 36px;
    border-right: 0;
    border-bottom: 1px dashed #eef3f5;
    padding: 2px 0;
  }
  .ff-table tbody td::before {
    content: attr(data-label);
    font-size: 11.5px;
    font-weight: 600;
    color: #526574;
    flex-shrink: 0;
  }
  .ff-table tbody td input:not([type='checkbox']),
  .ff-table tbody td select,
  .vagas-page .vagas-field .ff-table tbody td input:not([type='checkbox']),
  .vagas-page .vagas-field .ff-table tbody td select {
    text-align: left !important;
    padding: 0 4px !important;
  }
  .ff-table tbody td.is-num input:not([type='checkbox']),
  .vagas-page .vagas-field .ff-table tbody td.is-num input:not([type='checkbox']) {
    text-align: right !important;
  }
  .ff-table tbody td select,
  .vagas-page .vagas-field .ff-table tbody td select {
    padding-right: 20px !important;
  }
  .ff-cell-affix {
    justify-content: flex-end;
    padding: 0 4px;
  }
  .ff-table tbody td.ff-table__actions-col {
    border-bottom: 0;
    justify-content: flex-end;
    padding-top: 4px !important;
  }
  .ff-table tbody td.ff-table__actions-col::before {
    content: none;
  }
}

/* Read-only CaseDetail display for `list` & `table` */
.field-grid .field-cell--full {
  grid-column: 1 / -1;
  min-width: 0;
  max-width: 100%;
}

.case-list-items {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.case-list-items li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
  color: var(--brand-dark, #002b49);
}
.case-list-items__idx {
  min-width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--surface-sunken, #eef4f6);
  color: var(--text-secondary, #64748b);
  font-size: 11px;
  font-weight: 600;
  display: inline-grid;
  place-items: center;
}

.case-table-wrap {
  margin-top: 6px;
  border: 1px solid var(--line, #dbe5e8);
  border-radius: 10px;
  overflow-x: auto;
  max-width: 100%;
  background: #fff;
}

.case-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.case-table th {
  background: #f5f9fa;
  color: #526574;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line, #dbe5e8);
  white-space: nowrap;
}
.case-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--surface-muted, #edf1f2);
  color: var(--brand-dark, #002b49);
}
.case-table tbody tr:last-child td {
  border-bottom: 0;
}
.case-table th.is-num,
.case-table td.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.case-table__idx {
  width: 32px;
  color: var(--text-secondary, #64748b) !important;
  font-size: 12px;
  text-align: center !important;
}
.case-table tfoot td {
  border-top: 1px solid var(--line, #dbe5e8);
  background: var(--tint-brand-soft, #f0fffb);
  color: var(--brand-deepest, #075c51);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   2026-11 Visual & Ergonomics Polish (Canvas, REST, FormBuilder, BrandStudio, Mobile)
   ═══════════════════════════════════════════════════════════════════ */
.rest-url-bar {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.rest-url-bar__method {
  width: 96px !important;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.8125rem;
}
.rest-url-bar__url {
  flex: 1;
  min-width: 0;
}

.canvas-titlebar {
  gap: 8px;
}
.canvas-titlebar .header-actions {
  flex-shrink: 0;
}
.canvas-publish-btn {
  flex-shrink: 0;
}

/* Full-width FormBuilder preview mode (prevents 180px crushed paper on 1280px) */
.fb.fb--preview {
  grid-template-columns: minmax(0, 1fr) !important;
}
.fb.fb--preview .fb-palette,
.fb.fb--preview .fb-props {
  display: none !important;
}

/* Style bare textareas inside BrandStudio / Portal brand editor */
.brand-studio textarea,
.brand-card textarea,
.portal-brand textarea {
  width: 100%;
  border: 1px solid var(--line-strong, #bdcdd2);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-primary, #1e293b);
  background: #fff;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.brand-studio textarea:focus,
.brand-card textarea:focus,
.portal-brand textarea:focus {
  outline: none;
  border-color: var(--brand-cta, #087961);
  box-shadow: 0 0 0 3px rgba(8, 121, 97, 0.14);
}

/* Allow horizontal scrolling on wide dynamic tables instead of clipping action buttons */
.ff-table-scroll {
  overflow-x: auto !important;
}

/* Ensure PeopleView expand chevrons stay aligned on the row */
.member-row .app-btn,
.people-row .app-btn {
  flex-shrink: 0;
  align-self: center;
}

/* Scroll affordance fade on horizontally scrollable canvas toolbars */
.toolbar {
  mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 20px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 20px), transparent 100%);
}

/* Mobile 390px touch-target floor (>= 40px on primary header/table controls) */
@media (max-width: 720px) {
  .org-chip,
  .app-header-tool-btn {
    min-width: 40px;
    min-height: 40px;
  }
  .app-nav-link {
    min-height: 40px;
  }
  .ff-row-btn {
    width: 34px !important;
    height: 34px !important;
  }
}

/* ── REST Resilience Inspector, Developer Docs Drawer & Outbox Observability ── */
.insp-pill-summary {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--tint-brand);
  color: var(--brand-deep);
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
  max-width: 175px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rest-resilience {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rest-resilience__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.rest-resilience__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rest-docs-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--tint-brand-border);
  background: var(--tint-brand-soft);
  color: var(--brand-deep);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.rest-docs-trigger:hover {
  background: var(--tint-brand);
  border-color: var(--brand-cta);
}
.rest-docs-trigger .material-icons {
  font-size: 0.9rem;
}

.rest-attempts-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rest-compact-num {
  width: 64px !important;
  flex: 0 0 64px;
  text-align: center;
  font-weight: 600;
}

.rest-code-picker {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.rest-code-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.rest-code-add {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rest-code-add input {
  flex: 1;
  min-width: 0;
}

.rest-timeout-guard {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  cursor: pointer;
}
.rest-timeout-guard input[type='checkbox'] {
  width: auto !important;
  margin: 2px 0 0;
  flex: 0 0 auto;
}
.rest-timeout-guard small {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.35;
}

.rest-route-card {
  margin-top: 2px;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
}
.rest-route-card.is-wired {
  border-color: var(--tint-brand-border);
  background: var(--tint-brand-soft);
}
.rest-route-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--brand-dark);
}
.rest-route-card.is-wired .rest-route-card__head {
  color: var(--brand-deepest);
}
.rest-route-card__head .material-icons {
  font-size: 1rem;
  color: var(--brand-cta);
}
.rest-route-card__body {
  margin: 5px 0 0;
  font-size: 0.73rem;
  line-height: 1.4;
  color: var(--text-secondary);
}
.rest-err-field-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.rest-inline-doc-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--brand-cta);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.rest-inline-doc-link:hover {
  color: var(--brand-cta-hover);
}

/* ── Developer Docs Slide-Over Drawer ── */
.rest-docs-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: flex-end;
}

.rest-docs-drawer {
  width: min(660px, 100vw);
  height: 100%;
  background: var(--surface-color);
  box-shadow: -12px 0 36px rgba(0, 43, 73, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rest-docs-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  background: linear-gradient(135deg, var(--brand-dark) 0%, #053d5e 100%);
  color: #f8fafc;
}
.rest-docs-drawer__head .app-btn--ghost {
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.2);
}
.rest-docs-drawer__head .app-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}
.rest-docs-drawer__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5eead4;
}
.rest-docs-drawer__eyebrow .material-icons {
  font-size: 0.95rem;
}
.rest-docs-drawer__head h2 {
  margin: 5px 0 6px;
  font-size: 1.15rem;
  line-height: 1.25;
  color: #ffffff;
}
.rest-docs-drawer__lead {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.48;
  color: #cbd5e1;
}
.rest-docs-drawer__lead code {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.78rem;
}

.rest-docs-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 16px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
  overflow-x: auto;
}
.rest-docs-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.rest-docs-tab .material-icons {
  font-size: 1rem;
}
.rest-docs-tab:hover {
  color: var(--brand-dark);
}
.rest-docs-tab.is-on {
  color: var(--brand-cta);
  border-bottom-color: var(--brand-cta);
  background: var(--surface-color);
  border-radius: 6px 6px 0 0;
}

.rest-docs-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 28px;
}

.rest-docs-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rest-docs-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.rest-docs-diagram {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rest-docs-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
}
.rest-docs-step__num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand-dark);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  flex: 0 0 24px;
}
.rest-docs-step strong {
  display: block;
  font-size: 0.84rem;
  color: var(--brand-dark);
}
.rest-docs-step p {
  margin: 3px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.rest-docs-branches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 560px) {
  .rest-docs-branches {
    grid-template-columns: 1fr;
  }
}

.rest-docs-branch {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-color);
}
.rest-docs-branch.is-ok {
  border-color: #a7f3d0;
  background: #f0fdf8;
}
.rest-docs-branch.is-warn {
  border-color: #fde68a;
  background: #fffbeb;
}
.rest-docs-branch.is-info {
  border-color: #bae6fd;
  background: #f0f9ff;
}
.rest-docs-branch.is-danger {
  border-color: #fecaca;
  background: #fef2f2;
}
.rest-docs-branch__pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.rest-docs-branch.is-ok .rest-docs-branch__pill { background: var(--success-bg); color: var(--success-fg); }
.rest-docs-branch.is-warn .rest-docs-branch__pill { background: var(--warning-bg); color: var(--warning-fg); }
.rest-docs-branch.is-info .rest-docs-branch__pill { background: #e0f2fe; color: #0369a1; }
.rest-docs-branch.is-danger .rest-docs-branch__pill { background: var(--error-bg); color: var(--error-fg); }
.rest-docs-branch p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.rest-docs-card {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-color);
}
.rest-docs-card h3 {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: var(--brand-dark);
}
.rest-docs-card p,
.rest-docs-card li {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.rest-docs-card ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.rest-docs-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 560px) {
  .rest-docs-compare {
    grid-template-columns: 1fr;
  }
}
.rest-docs-compare strong {
  display: block;
  font-size: 0.8rem;
  color: var(--brand-dark);
}

.rest-docs-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.rest-docs-table__row {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-color);
}
.rest-docs-table__row:last-child {
  border-bottom: none;
}
.rest-docs-table__code {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.rest-docs-table__code strong {
  font-size: 0.8rem;
  color: var(--brand-dark);
}
.rest-docs-table__row p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.rest-docs-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 700;
}
.rest-docs-pill.is-ok { background: var(--success-bg); color: var(--success-fg); }
.rest-docs-pill.is-warn { background: var(--warning-bg); color: var(--warning-fg); }
.rest-docs-pill.is-info { background: #e0f2fe; color: #0369a1; }
.rest-docs-pill.is-danger { background: var(--error-bg); color: var(--error-fg); }

.rest-docs-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rest-docs-field-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-subtle);
}
.rest-docs-field-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rest-docs-field-card__top code {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.rest-docs-field-card__type {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-secondary);
}
.rest-docs-field-card p {
  margin: 5px 0 3px;
  font-size: 0.76rem;
  color: var(--text-primary);
}
.rest-docs-field-card small {
  font-size: 0.71rem;
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.rest-docs-copy-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-color);
  color: var(--brand-deep);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
}
.rest-docs-copy-btn:hover {
  border-color: var(--brand-cta);
  background: var(--tint-brand-soft);
}
.rest-docs-copy-btn .material-icons {
  font-size: 0.85rem;
}

.rest-docs-recipe {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  margin-top: 8px;
}
.rest-docs-recipe strong {
  display: block;
  font-size: 0.78rem;
  color: var(--brand-dark);
}
.rest-docs-recipe p {
  margin: 4px 0 0;
}

.rest-docs-pre {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.73rem;
  line-height: 1.5;
  overflow-x: auto;
}

/* ── Outbox Observability Panel & Attempt Timeline ── */
.outbox-obs-panel {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-color);
}
.outbox-obs-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.outbox-obs-panel__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--brand-dark);
  font-size: 0.88rem;
}
.outbox-obs-panel__title .material-icons {
  font-size: 1.15rem;
  color: var(--brand-cta);
}
.outbox-obs-sweep {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.outbox-obs-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 820px) {
  .outbox-obs-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 460px) {
  .outbox-obs-strip {
    grid-template-columns: 1fr;
  }
}
.outbox-obs-tile {
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.outbox-obs-tile__label {
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.outbox-obs-tile__value {
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--brand-dark);
}
.outbox-obs-tile__value.is-ok { color: var(--success-fg); }
.outbox-obs-tile__value.is-warn { color: var(--warning-fg); }
.outbox-obs-tile__value.is-danger { color: var(--error-fg); }
.outbox-obs-tile__sub {
  font-size: 0.73rem;
  color: var(--text-secondary);
}

.outbox-obs-breakdown {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.outbox-obs-breakdown__label {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 4px;
}

.outbox-row-wrap {
  border-bottom: 1px solid var(--line);
}
.outbox-row-wrap:last-of-type {
  border-bottom: none;
}
.outbox-row-wrap > .list-row {
  border-bottom: none;
}

.outbox-row-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.outbox-method-pill {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.outbox-url-code {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-subtle);
  padding: 1px 6px;
  border-radius: 5px;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.outbox-kind-muted {
  color: var(--text-secondary);
  font-weight: 500;
}
.outbox-row-sub {
  margin: 2px 0 0;
}

.outbox-telemetry-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.outbox-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 600;
  background: var(--surface-muted);
  color: var(--text-primary);
}
.outbox-badge .material-icons {
  font-size: 0.82rem;
}
.outbox-badge.is-ok { background: var(--success-bg); color: var(--success-fg); }
.outbox-badge.is-warn,
.outbox-badge.is-kind-5xx,
.outbox-badge.is-kind-429,
.outbox-badge.is-kind-rede,
.outbox-badge.is-kind-timeout { background: var(--warning-bg); color: var(--warning-fg); }
.outbox-badge.is-danger,
.outbox-badge.is-kind-4xx,
.outbox-badge.is-kind-config,
.outbox-badge.is-kind-ambiguous_timeout { background: var(--error-bg); color: var(--error-fg); }
.outbox-badge.is-info { background: #e0f2fe; color: #0369a1; }
.outbox-badge.is-neutral { background: var(--surface-muted); color: var(--text-secondary); }

.outbox-attempt-log {
  margin: 0 14px 12px 54px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
}
@media (max-width: 640px) {
  .outbox-attempt-log {
    margin: 0 8px 12px;
  }
}
.outbox-attempt-log__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--text-secondary);
}
.outbox-attempt-log__meta code {
  font-size: 0.72rem;
  color: var(--brand-dark);
}
.outbox-attempt-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.outbox-attempt-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--surface-color);
  border: 1px solid var(--line);
  font-size: 0.74rem;
}
.outbox-attempt-item.is-ok {
  border-left: 3px solid var(--success);
}
.outbox-attempt-item.is-err {
  border-left: 3px solid var(--error);
}
.outbox-attempt-item__num {
  font-weight: 700;
  color: var(--brand-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.outbox-attempt-item__at,
.outbox-attempt-item__ms,
.outbox-attempt-item__next {
  color: var(--text-secondary);
  font-size: 0.71rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.outbox-attempt-item__err {
  color: var(--error-fg);
  font-size: 0.73rem;
}

/* ── CaseDetail linear system delivery card ── */
.case-delivery-card {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
}
.case-delivery-card.is-dead {
  border-color: #fecaca;
  background: #fef2f2;
}
.case-delivery-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════
 * Flow Academy — Calm Editorial XXL Modal, /academy Page & Live Sandbox
 * ═══════════════════════════════════════════════════════════════════════ */

.help-menu-item--featured {
  width: 100%;
  border: 0;
  background: var(--tint-brand-soft, #ecfdf5);
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.help-menu-item--featured:hover {
  background: #d1fae5;
}
.help-menu-item--featured .material-icons {
  color: var(--brand-primary, #009a6e);
}

/* XXL Centered Modal — full viewport width */
.acad-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
  animation: acad-fade-in 0.14s ease-out;
}
@keyframes acad-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.acad-modal-dialog {
  width: calc(100vw - 24px);
  max-width: 1680px;
  height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.08);
  animation: acad-pop-in 0.16s ease-out;
}
@keyframes acad-pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Full-page /academy container */
.acad-page-wrap {
  height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.acad-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #ffffff;
  color: #0f172a;
}

/* Single Slim Calm Top Bar (54px) */
.acad-topbar {
  flex: none;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: #ffffff;
  border-bottom: 1px solid #e9eef3;
}
.acad-topbar__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}
.acad-topbar__icon {
  font-size: 20px;
  color: #009a6e;
}
.acad-topbar__title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #002b49;
  letter-spacing: -0.01em;
}

.acad-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  width: min(360px, 100%);
  padding: 0 12px;
  border-radius: 9px;
  background: #f5f7fa;
  border: 1px solid transparent;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.acad-search:focus-within {
  background: #ffffff;
  border-color: #cbd5e1;
}
.acad-search .material-icons {
  font-size: 17px;
  color: #94a3b8;
}
.acad-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.82rem;
  outline: none;
}
.acad-search input::placeholder {
  color: #94a3b8;
}

.acad-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.acad-topbar__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 0.79rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}
.acad-topbar__link:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #002b49;
}
.acad-topbar__link .material-icons {
  font-size: 16px;
  color: #64748b;
}
.acad-topbar__close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.acad-topbar__close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* 2-Column Body */
.acad-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

/* Quiet Borderless Editorial Sidebar */
.acad-nav {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fafbfc;
  border-right: 1px solid #eef2f6;
}
.acad-nav__filter {
  flex: none;
  padding: 14px 14px 8px;
}
.acad-nav__select {
  width: 100%;
  height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.acad-nav__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.acad-nav__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.acad-nav__group-title {
  padding: 0 10px 5px;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}
.acad-nav__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  text-align: left;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.acad-nav__item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.acad-nav__item.is-active {
  background: #edf9f5;
  color: #006b4e;
  font-weight: 600;
}
.acad-nav__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acad-nav__check {
  font-size: 15px;
  color: #10b981;
  flex: none;
}
.acad-nav__empty {
  padding: 12px 10px;
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.acad-nav__foot {
  flex: none;
  padding: 12px 16px 14px;
  border-top: 1px solid #eef2f6;
}
.acad-nav__foot-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}
.acad-nav__bar {
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.acad-nav__bar-fill {
  height: 100%;
  border-radius: inherit;
  background: #009a6e;
  transition: width 0.2s ease;
}

/* Spacious Reading & Sandbox Main Column */
.acad-main {
  overflow-y: auto;
  background: #ffffff;
  min-width: 0;
}
.acad-workspace {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 22px 28px 34px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-sizing: border-box;
}
.acad-workspace--wide {
  width: 100%;
  max-width: none;
  padding: 18px 24px 28px;
}

/* Clean Typography-First Document Header */
.acad-doc-head {
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid #eef2f6;
}
.acad-doc-head--compact {
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.acad-doc-head__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.acad-doc-head__titles {
  min-width: 0;
  flex: 1;
}
.acad-doc-head__crumb {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #009a6e;
  margin-bottom: 5px;
}
.acad-doc-head h3 {
  margin: 0;
  font-size: 1.48rem;
  font-weight: 700;
  color: #002b49;
  letter-spacing: -0.02em;
  line-height: 1.24;
}
.acad-doc-head--compact h3 {
  font-size: 1.15rem;
}
.acad-doc-head__lead {
  margin: 8px 0 0;
  font-size: 0.92rem;
  line-height: 1.58;
  color: #475569;
  max-width: none;
}

/* Quiet Segmented Switcher (Guia | Sandbox | Código) */
.acad-seg {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: #f1f5f9;
  flex: none;
}
.acad-seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.acad-seg__btn .material-icons {
  font-size: 16px;
}
.acad-seg__btn:hover {
  color: #0f172a;
}
.acad-seg__btn.is-on {
  background: #ffffff;
  color: #002b49;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

/* Editorial Article Body */
.acad-article {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Full-width responsive Key Points (4 cols wide, 2 medium, 1 mobile) */
.acad-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px 24px;
}
.acad-point {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid #eef2f6;
}
.acad-point__head {
  display: flex;
  align-items: center;
  gap: 7px;
}
.acad-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.acad-dot--ok { background: #10b981; }
.acad-dot--warn { background: #f59e0b; }
.acad-dot--info { background: #0ea5e9; }
.acad-dot--err { background: #ef4444; }
.acad-point__tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.01em;
}
.acad-point strong {
  font-size: 0.9rem;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.35;
}
.acad-point p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.58;
  color: #475569;
}

/* Clean Sections & Editorial Numbered Steps */
.acad-sec h4 {
  margin: 0 0 14px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #002b49;
  letter-spacing: -0.01em;
}
.acad-sec__sub {
  margin: -8px 0 14px;
  font-size: 0.83rem;
  color: #64748b;
}
.acad-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.acad-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.acad-step__num {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #002b49;
  font-size: 0.76rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.acad-step strong {
  display: block;
  font-size: 0.89rem;
  font-weight: 650;
  color: #0f172a;
}
.acad-step p {
  margin: 3px 0 0;
  font-size: 0.84rem;
  line-height: 1.58;
  color: #475569;
}

/* Clean Hairline Reference Table */
.acad-table {
  border-top: 1px solid #eef2f6;
}
.acad-table__row {
  display: grid;
  grid-template-columns: minmax(170px, 230px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid #eef2f6;
}
.acad-table__left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.acad-table__left code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 650;
  color: #002b49;
}
.acad-table__right p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.52;
  color: #334155;
}
.acad-table__ex {
  display: block;
  margin-top: 3px;
  font-size: 0.74rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #94a3b8;
}
.acad-badge-soft {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
}
.acad-badge-soft--ok { background: #ecfdf5; color: #047857; }
.acad-badge-soft--warn { background: #fffbeb; color: #b45309; }
.acad-badge-soft--info { background: #f1f5f9; color: #475569; }
.acad-badge-soft--err { background: #fef2f2; color: #b91c1c; }

.acad-copy-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font: inherit;
  font-size: 0.73rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.acad-copy-mini:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #002b49;
}
.acad-copy-mini .material-icons {
  font-size: 14px;
}

/* Collapsible Pitfalls Fold */
.acad-fold {
  border-top: 1px solid #eef2f6;
  border-bottom: 1px solid #eef2f6;
}
.acad-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  font-size: 0.88rem;
  font-weight: 650;
  color: #334155;
  cursor: pointer;
  list-style: none;
}
.acad-fold summary::-webkit-details-marker {
  display: none;
}
.acad-fold summary .material-icons {
  font-size: 19px;
  color: #94a3b8;
  transition: transform 0.15s ease;
}
.acad-fold[open] summary .material-icons {
  transform: rotate(180deg);
}
.acad-fold__body {
  padding: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.acad-pitfall p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.55;
}
.acad-pitfall__no {
  color: #991b1b;
  margin-bottom: 3px !important;
}
.acad-pitfall__yes {
  color: #166534;
}

/* Quiet Related Links Strip */
.acad-related {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}
.acad-related__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  margin-right: 4px;
}
.acad-related__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e9eef3;
  color: #334155;
  font-size: 0.79rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.14s ease, color 0.14s ease;
}
.acad-related__link:hover {
  border-color: #009a6e;
  color: #006b4e;
}
.acad-related__link .material-icons {
  font-size: 15px;
  color: #009a6e;
}

/* Interactive Go-Live Checklist (Clean & Airy) */
.acad-checklist {
  padding: 20px 22px;
  border-radius: 12px;
  border: 1px solid #e9eef3;
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.acad-checklist__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.acad-checklist__head h4 {
  margin: 0;
  font-size: 0.96rem;
  color: #002b49;
}
.acad-checklist__head p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: #64748b;
}
.acad-checklist__pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: #009a6e;
}
.acad-checklist__bar {
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.acad-checklist__bar-fill {
  height: 100%;
  border-radius: inherit;
  background: #009a6e;
  transition: width 0.2s ease;
}
.acad-checklist__group h5 {
  margin: 4px 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}
.acad-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid #eef2f6;
  cursor: pointer;
}
.acad-check-row:last-child {
  border-bottom: 0;
}
.acad-check-row input[type='checkbox'] {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  accent-color: #009a6e;
  cursor: pointer;
}
.acad-check-row__body {
  flex: 1;
  min-width: 0;
}
.acad-check-row__body strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
}
.acad-check-row.is-checked .acad-check-row__body strong {
  text-decoration: line-through;
  color: #94a3b8;
}
.acad-check-row__body small {
  display: block;
  margin-top: 2px;
  font-size: 0.77rem;
  color: #64748b;
}
.acad-check-row__link {
  font-size: 0.76rem;
  font-weight: 600;
  color: #009a6e;
  text-decoration: none;
  flex: none;
}

/* Code Snippets Tab */
.acad-code-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acad-code-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.acad-code-block__head strong {
  font-size: 0.88rem;
  color: #0f172a;
  margin-right: 8px;
}
.acad-code-block__lang {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}
.acad-code-block__btns {
  display: flex;
  align-items: center;
  gap: 6px;
}
.acad-code-block__note {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
}
.acad-shell .rest-docs-code {
  margin: 0;
  padding: 16px 18px;
  border-radius: 10px;
  background: #0b192c;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.79rem;
  line-height: 1.6;
  overflow-x: auto;
}

/* Minimal Footer */
.acad-footer {
  margin-top: auto;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid #eef2f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.acad-done-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
}
.acad-done-btn.is-done {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}
.acad-done-btn .material-icons {
  font-size: 16px;
}
.acad-footer__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.acad-pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
}
.acad-pager-btn:hover {
  background: #f8fafc;
  color: #002b49;
}
.acad-pager-btn--next {
  border-color: #002b49;
  background: #002b49;
  color: #ffffff;
}
.acad-pager-btn--next:hover {
  background: #003e66;
  color: #ffffff;
}
.acad-pager-btn .material-icons {
  font-size: 15px;
}

/* ── Focused Full-Width Interactive Sandbox ── */
.acad-sandbox-stage {
  display: flex;
  flex-direction: column;
}
.acad-sandbox {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.acad-sb-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.acad-sb-select {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #dce3eb;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 260px;
}
.acad-sb-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.acad-sb-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #dce3eb;
  background: #ffffff;
  color: #334155;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.acad-sb-btn:hover:not(:disabled) {
  background: #f8fafc;
  color: #002b49;
}
.acad-sb-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.acad-sb-btn .material-icons {
  font-size: 16px;
}
.acad-sb-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin-left: 4px;
}
.acad-sb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}
.acad-sb-status.is-run .acad-sb-dot { background: #0ea5e9; }
.acad-sb-status.is-wait { color: #b45309; }
.acad-sb-status.is-wait .acad-sb-dot { background: #f59e0b; }
.acad-sb-status.is-done { color: #047857; }
.acad-sb-status.is-done .acad-sb-dot { background: #10b981; }
.acad-sb-status.is-stop { color: #b91c1c; }
.acad-sb-status.is-stop .acad-sb-dot { background: #ef4444; }
.acad-sb-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Interactive SVG Canvas */
.acad-canvas-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fbfcfd;
}
.acad-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 310px;
}
.acad-node__box {
  fill: #ffffff;
  stroke: #d5dde5;
  stroke-width: 1.4;
  filter: drop-shadow(0 1px 4px rgba(15, 23, 42, 0.05));
}
.acad-node.is-visited .acad-node__box { stroke: #10b981; }
.acad-node.is-selected .acad-node__box { stroke: #002b49; stroke-width: 1.9; }
.acad-node.is-active .acad-node__box { stroke: #009a6e; stroke-width: 2; }
.acad-node.is-waiting .acad-node__box { stroke: #d97706; fill: #fffdf5; }
.acad-node__inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, sans-serif;
}
.acad-node__icon {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.acad-node__icon .material-icons { font-size: 16px; }
.acad-node__icon--start { background: #dcfce7; color: #15803d; }
.acad-node__icon--human { background: #dbeafe; color: #1d4ed8; }
.acad-node__icon--rest { background: #ccfbf1; color: #0f766e; }
.acad-node__icon--auto { background: #ede9fe; color: #6d28d9; }
.acad-node__icon--ai { background: #fae8ff; color: #a21caf; }
.acad-node__icon--gate { background: #fef3c7; color: #b45309; }
.acad-node__icon--portal { background: #e0e7ff; color: #4338ca; }
.acad-node__icon--end { background: #f1f5f9; color: #334155; }
.acad-node__meta { min-width: 0; flex: 1; }
.acad-node__type {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.acad-node__pill {
  padding: 0 4px;
  border-radius: 4px;
  background: #002b49;
  color: #5eead4;
  font-size: 8.5px;
}
.acad-node__title {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Inline Pause / Mock Decision Panel */
.acad-ask-card {
  padding: 14px 16px;
  border-top: 1px solid #f1d38a;
  background: #fffdf7;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.acad-ask-card__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.acad-ask-card__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #b45309;
}
.acad-ask-card__head strong {
  font-size: 0.92rem;
  color: #0f172a;
}
.acad-ask-rest__wire {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.76rem;
  margin-bottom: 10px;
}
.acad-ask-rest__wire code {
  background: transparent;
  color: #f8fafc;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.acad-http-method {
  padding: 2px 6px;
  border-radius: 4px;
  background: #009a6e;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.68rem;
}
.acad-ask-rest__policy {
  margin-left: auto;
  color: #94a3b8;
  font-size: 0.72rem;
}
.acad-ask-rest__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}
.acad-mock-btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid #dce3eb;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.acad-mock-btn:hover { background: #f8fafc; }
.acad-mock-btn strong { font-size: 0.8rem; color: #0f172a; }
.acad-mock-btn span { font-size: 0.72rem; color: #64748b; line-height: 1.35; }
.acad-mock-btn--ok:hover { border-color: #10b981; background: #f0fdf4; }
.acad-mock-btn--warn:hover { border-color: #f59e0b; background: #fffbeb; }
.acad-mock-btn--err:hover { border-color: #ef4444; background: #fef2f2; }
.acad-mock-btn--info:hover { border-color: #3b82f6; background: #eff6ff; }

.acad-ask-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.acad-ask-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
}
.acad-ask-field input {
  height: 32px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font: inherit;
  font-size: 0.8rem;
  min-width: 165px;
}
.acad-ask-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.acad-choice-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
}
.acad-choice-btn--ok { border-color: #009a6e; background: #009a6e; color: #ffffff; }
.acad-choice-btn--warn { border-color: #f59e0b; background: #fffbeb; color: #92400e; }
.acad-choice-btn--error { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }

/* Quiet Sandbox Bottom Inspector */
.acad-sb-insp {
  border: 1px solid #e9eef3;
  border-radius: 11px;
  overflow: hidden;
  background: #ffffff;
}
.acad-sb-insp__tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #fafbfc;
  border-bottom: 1px solid #eef2f6;
  flex-wrap: wrap;
}
.acad-mini-tab {
  padding: 4px 10px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
}
.acad-mini-tab:hover { color: #0f172a; }
.acad-mini-tab.is-on {
  background: #ffffff;
  color: #002b49;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.acad-sb-hint {
  margin-left: auto;
  font-size: 0.74rem;
  color: #64748b;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acad-sb-insp__body {
  padding: 12px 14px;
  max-height: 190px;
  overflow-y: auto;
}
.acad-sb-inputs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.acad-fields-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.acad-field-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 7px;
  background: #f5f7fa;
  font-size: 0.77rem;
}
.acad-field-pill.is-err {
  background: #fef2f2;
}
.acad-field-pill__k {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 650;
  color: #002b49;
}
.acad-field-pill.is-err .acad-field-pill__k { color: #b91c1c; }
.acad-field-pill__v { color: #334155; word-break: break-word; }

.acad-trace-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.acad-trace-empty {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}
.acad-trace-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.77rem;
  border-left: 2.5px solid #cbd5e1;
}
.acad-trace-row--ok { border-left-color: #10b981; }
.acad-trace-row--warn { border-left-color: #f59e0b; background: #fffdf5; }
.acad-trace-row--error { border-left-color: #ef4444; background: #fef2f2; }
.acad-trace-row__kind {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  min-width: 44px;
}
.acad-trace-row__msg { color: #334155; }

/* Responsive */
@media (max-width: 960px) {
  .acad-modal-backdrop { padding: 8px; }
  .acad-modal-dialog { width: 98vw; height: 95vh; border-radius: 12px; }
  .acad-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .acad-nav { max-height: 170px; border-right: 0; border-bottom: 1px solid #eef2f6; }
  .acad-workspace, .acad-workspace--wide { padding: 20px 18px 28px; }
  .acad-points { grid-template-columns: 1fr; }
  .acad-table__row { grid-template-columns: 1fr; gap: 4px; }
  .acad-sb-hint { display: none; }
}

/* ── Guided Interactive Flow IDE inside Flow Academy Sandbox ── */
.acad-sb-valid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid #d1fae5;
  background: #ecfdf5;
  color: #047857;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
}
.acad-sb-valid .material-icons { font-size: 14px; }
.acad-sb-valid.is-err {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.acad-sb-btn--promote {
  border-color: #002b49;
  background: #002b49;
  color: #ffffff;
}
.acad-sb-btn--promote:hover:not(:disabled) {
  background: #003e66;
  color: #ffffff;
}
.acad-sb-btn--danger {
  color: #b91c1c;
  border-color: #fecaca;
}
.acad-sb-btn--danger:hover:not(:disabled) {
  background: #fef2f2;
  color: #991b1b;
}

.acad-sb-toast {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 9px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.79rem;
  font-weight: 600;
}
.acad-sb-toast .material-icons {
  font-size: 16px;
  color: #059669;
}

/* Inline "Criar fluxo real" bar */
.acad-create-bar {
  padding: 13px 16px;
  border-radius: 11px;
  border: 1px solid #a7f3d0;
  background: #f2fdf8;
}
.acad-create-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.acad-create-form__left strong {
  display: block;
  font-size: 0.88rem;
  color: #002b49;
}
.acad-create-form__left small {
  display: block;
  margin-top: 2px;
  font-size: 0.77rem;
  color: #475569;
}
.acad-create-form__controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.acad-create-form__controls input {
  flex: 1 1 240px;
  height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.83rem;
}
.acad-create-done {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.84rem;
  color: #065f46;
}
.acad-create-done .material-icons {
  font-size: 19px;
  color: #059669;
}
.acad-create-err {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #b91c1c;
}

/* Full-width Split IDE Grid: Canvas + Console (left) | Guided Inspector (right) */
.acad-ide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}
.acad-ide-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acad-canvas-wrap {
  position: relative;
}
.acad-canvas-float {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #eef2f6;
  background: #ffffff;
  flex-wrap: wrap;
}
.acad-add-wrap {
  position: relative;
}
.acad-float-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid #dce3eb;
  background: #ffffff;
  color: #334155;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}
.acad-float-btn:hover {
  background: #f8fafc;
  color: #002b49;
}
.acad-float-btn .material-icons { font-size: 15px; }
.acad-add-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  min-width: 180px;
  padding: 5px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #dce3eb;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.acad-add-menu button {
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.acad-add-menu button:hover {
  background: #edf9f5;
  color: #006b4e;
}
.acad-canvas-tip {
  margin-left: auto;
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Right Guided IDE Panel */
.acad-ide-right {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.acad-ide-right__tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 5px;
  gap: 4px;
  background: #fafbfc;
  border-bottom: 1px solid #eef2f6;
}
.acad-ide-tab {
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  cursor: pointer;
}
.acad-ide-tab:hover { color: #0f172a; }
.acad-ide-tab.is-on {
  background: #ffffff;
  color: #002b49;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.acad-ide-right__body {
  padding: 14px;
  max-height: 520px;
  overflow-y: auto;
}

/* Guided Missions */
.acad-missions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acad-missions__bar {
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 4px;
}
.acad-missions__bar-fill {
  height: 100%;
  background: #009a6e;
  transition: width 0.25s ease;
}
.acad-mission {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid #eef2f6;
  background: #fafbfc;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.acad-mission:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}
.acad-mission.is-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.acad-mission__num {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.acad-mission.is-done .acad-mission__num {
  background: #009a6e;
  color: #ffffff;
}
.acad-mission.is-done .acad-mission__num .material-icons {
  font-size: 14px;
}
.acad-mission__text strong {
  display: block;
  font-size: 0.8rem;
  color: #0f172a;
  line-height: 1.3;
}
.acad-mission.is-done .acad-mission__text strong {
  color: #166534;
}
.acad-mission__text small {
  display: block;
  margin-top: 3px;
  font-size: 0.73rem;
  line-height: 1.42;
  color: #64748b;
}
.acad-missions__tip {
  margin-top: 4px;
  padding: 10px 11px;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  font-size: 0.74rem;
  line-height: 1.48;
  color: #475569;
}
.acad-missions__tip code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 0.71rem;
}

/* Live Property Editor */
.acad-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.acad-editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f6;
}
.acad-editor__type {
  font-size: 0.73rem;
  font-weight: 700;
  color: #009a6e;
}
.acad-editor__head code {
  font-size: 0.72rem;
  color: #64748b;
}
.acad-ed-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.acad-ed-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 600;
  color: #475569;
}
.acad-ed-field input,
.acad-ed-field select,
.acad-ed-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 9px;
  border-radius: 7px;
  border: 1px solid #d5dde5;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.79rem;
}
.acad-ed-field input,
.acad-ed-field select {
  height: 32px;
}
.acad-ed-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.75rem;
  color: #334155;
  line-height: 1.4;
  cursor: pointer;
}
.acad-ed-check input {
  margin-top: 2px;
  accent-color: #009a6e;
}
.acad-ed-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #eef2f6;
}

/* Editable JSON Pane */
.acad-json-ide {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.acad-json-ide__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.acad-json-ide__area {
  width: 100%;
  min-height: 290px;
  box-sizing: border-box;
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid #1e293b;
  background: #0b192c;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  line-height: 1.5;
  resize: vertical;
}

@media (max-width: 1140px) {
  .acad-ide-grid {
    grid-template-columns: 1fr;
  }
  .acad-ide-right__body {
    max-height: none;
  }
}

/* ---- Tela de quem decide: faixa "Para decidir", alertas, blocos (lib/caseScreen.ts) ---- */
.decide-strip {
  margin: 0 0 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--brand-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.decide-strip__kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9fe8d8;
}
.decide-strip__facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.decide-strip__facts dt { font-size: 0.75rem; color: #b8cfdc; margin: 0 0 2px; }
.decide-strip__facts dd { margin: 0; font-size: 1.0625rem; font-weight: 700; overflow-wrap: anywhere; }
.screen-alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.screen-alert {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--warning-bg);
  color: #7a4500;
}
.screen-alert--info {
  font-weight: 500;
  background: #e8f1f8;
  color: #1d3a52;
}
.decide-strip .screen-alert--info { background: #1d4766; color: #e6f0f7; }
.portal-card .screen-alerts { padding: 0 1.25rem 12px; }
.screen-alerts--row { margin-top: 6px; }
.screen-alerts--row .screen-alert { font-size: 0.75rem; padding: 2px 8px; }

.case-blocks { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 16px; }
.case-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-color);
  overflow: hidden;
}
.case-block__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 16px;
  cursor: pointer;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--surface-muted);
  list-style: none;
}
.case-block__head::-webkit-details-marker { display: none; }
.case-block__head::before {
  content: 'expand_more';
  font-family: 'Material Icons Round';
  font-size: 18px;
  color: var(--text-secondary);
  align-self: center;
  transition: transform 0.15s;
}
.case-block:not([open]) .case-block__head::before { transform: rotate(-90deg); }
.case-block__title { font-weight: 600; color: var(--brand-dark); }
.case-block__origin { margin-left: auto; font-size: 0.75rem; color: var(--text-secondary); text-align: right; }
.case-block .field-grid { border-bottom: 0; }
.case-block .field-block { padding: 12px 16px; }
.case-block__restricted { margin: 0; padding: 12px 16px; font-size: 0.875rem; color: var(--text-secondary); }
.case-block__restricted strong { color: var(--warning-fg); }

.form-section-heading { margin: 8px 0 -4px; padding-top: 8px; border-top: 1px solid var(--surface-muted); }
.form-section-heading:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section-heading h3 { margin: 0; font-size: 0.9375rem; font-weight: 700; color: var(--brand-dark); }
.form-section-heading p { margin: 2px 0 0; font-size: 0.8125rem; color: var(--text-secondary); }

.caixa-procs { padding: 10px 1rem 0; }
.caixa-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 1rem 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}
.caixa-bulk > span { flex: 1 1 200px; }
.caixa-bulk .app-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.inbox-row--select { grid-template-columns: 3.7rem minmax(0, 1fr) auto; }
.inbox-row__lead { display: inline-flex; align-items: center; gap: 0.5rem; }
.inbox-row__select { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-cta); cursor: pointer; }
.inbox-row__select-gap { display: inline-block; width: 18px; }
@media (max-width: 1100px) {
  .inbox-row--select { grid-template-columns: 3.7rem minmax(0, 1fr); }
}

/* Designer: "Tela de quem decide" and form sections (StepScreenEditor) */
.step-screen { display: flex; flex-direction: column; gap: 8px; }
.step-screen__sub { margin-top: 6px; }
.step-screen__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.step-screen__list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-color);
}
.step-screen__name { flex: 1 1 auto; min-width: 0; font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); }
.step-screen__name small { display: block; font-weight: 400; color: var(--text-secondary); }
.step-screen__suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--tint-brand-border);
  border-radius: 8px;
  background: var(--tint-brand-soft);
  font-size: 0.8125rem;
  color: var(--mint-fg);
}
.step-screen__suggest span { flex: 1 1 180px; }
.step-screen__new { display: grid; grid-template-columns: minmax(0, 1.3fr) 5.5rem minmax(0, 1fr); gap: 6px; }
.step-screen__new input[aria-label='Texto do alerta'] { grid-column: 1 / -1; }
.step-screen__new button { grid-column: 1 / -1; justify-self: start; }
.step-screen__section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  font-size: 0.8125rem;
}
.step-screen__section label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.step-screen .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-color);
  color: var(--text-secondary);
  cursor: pointer;
}
.step-screen .icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.step-screen .icon-btn .material-icons { font-size: 16px; }
.step-screen__auto {
  margin-left: 6px;
  font-style: normal;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--tint-brand);
  color: var(--mint-fg);
}
.step-screen__check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
