.nexo-tool-confirm {
  border: 1px solid var(--app-border, #d5dbe7);
  border-radius: 10px;
  padding: 0.75rem;
  background: #fff;
  display: grid;
  gap: 0.5rem;
}
.nexo-tool-confirm__title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
}
.nexo-tool-confirm__label {
  margin: 0;
}
.nexo-tool-confirm__details pre {
  margin: 0.5rem 0 0;
  max-height: 12rem;
  overflow: auto;
  background: #0b1220;
  color: #e6edf7;
  padding: 0.5rem;
  border-radius: 8px;
}
.nexo-tool-confirm__allow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.nexo-tool-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.nexo-src-pill {
  display: inline-block;
  margin: 0 0.125rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #c9d8ff;
  color: #1a4bb8;
  text-decoration: none;
  font-size: 0.78rem;
}
:root {
  /* iLiberty brand (aligned with Validador TISS / Central de Validação) */
  --brand-dark: #002b49;
  --brand-light: #00b6d6;
  /* UniConecta wordmark colors (sampled from branding/uniconecta-logo-white.png).
     Blue first, then white — swap these two to invert the logo treatment. */
  --app-logo-accent: #00b1d0;
  --app-logo-base: #ffffff;
  --brand-primary: #00bf9a;
  --brand-secondary: #002b49;
  --primary-color: #00bf9a;
  --primary-hover: #059669;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --background-color: #f8fafc;
  --surface-color: #ffffff;
  --border-color: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;

  /* Legacy names — map to brand so existing components keep working */
  --liberty-accent: var(--brand-primary);
  --liberty-accent-dark: var(--brand-dark);
  --liberty-accent-soft: rgb(0 182 214 / 0.2);
  --liberty-accent-deep: var(--brand-dark);
  --liberty-teal-mist: #e8f4f8;
  --liberty-ink: var(--text-primary);
  --liberty-text: var(--text-primary);
  --liberty-text-muted: var(--text-secondary);
  --liberty-bg: var(--surface-color);
  --liberty-surface: var(--background-color);
  --liberty-surface-warm: #f1f5f9;
  --liberty-border: var(--border-color);
  --liberty-sidebar-bg: #ffffff;
  --liberty-sidebar-border: #e5e7eb;
  --liberty-nav-active: #eff6ff;
  --liberty-violet-note: var(--text-secondary);
  --liberty-radius: 8px;
  --liberty-radius-sm: 6px;
  --liberty-shadow: 0 1px 3px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.06);
  --liberty-shadow-md:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
button {
  color: inherit;
}
button,
[role="button"] {
  cursor: pointer;
}
code {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 1em;
}
img,
svg {
  display: block;
}
img,
video {
  max-width: 100%;
  height: auto;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  color: var(--liberty-text);
  font-family:
    "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  height: 100%;
}

.app-body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  height: 100%;
  background: var(--background-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* App shell: fixed navy header + sidebar + main — scroll lives in .app-main-wrap only */
.app-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

:root {
  --app-header-bar: 4rem;
  --app-header-offset: calc(
    var(--app-header-bar) + env(safe-area-inset-top, 0px)
  );
}

.app-top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0);
  height: var(--app-header-offset);
  box-sizing: border-box;
  background: var(--brand-dark);
  color: #fff;
  border-bottom: 1px solid rgb(55 65 81);
}

.app-top-header-inner {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  height: 100%;
  padding: 0 0.75rem;
  gap: 0.5rem;
}

.app-top-header-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.35rem;
}

.app-top-header-center {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
}

.app-top-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  min-width: 0;
  flex-shrink: 0;
}

.app-top-header-tools {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

/* Unified icon / pill controls in the navy header */
.app-header-tool-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.45rem;
  margin: 0;
  border-radius: 9999px;
  border: 1px solid rgb(255 255 255 / 0.1);
  background: rgb(255 255 255 / 0.08);
  color: rgb(241 245 249);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.app-header-tool-btn:hover {
  background: rgb(255 255 255 / 0.14);
  border-color: rgb(255 255 255 / 0.18);
  color: #fff;
}

.app-header-tool-btn .material-icons {
  font-size: 1.2rem !important;
}

.app-header-search-kbd {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.75;
  white-space: nowrap;
}

.app-header-tool-badge {
  position: absolute;
  top: -0.15rem;
  right: -0.15rem;
  min-width: 1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
  border: 2px solid var(--brand-dark);
}

.app-header-notify-wrap {
  position: relative;
}

.app-header-notify-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 17.5rem;
  max-width: min(22.5rem, 92vw);
  z-index: 80;
  padding: 0.5rem 0;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.35);
}

.app-header-notify-pop-title {
  padding: 0 0.75rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.app-header-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -0.5rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  color: inherit;
  cursor: pointer;
}

.app-header-menu-btn:hover {
  background: rgb(255 255 255 / 0.1);
}

/* Desktop keeps the menu button too — it collapses the sidebar for more
   screen space on every route, not only the Kanban board. */

.app-header-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

/* Vendor logo + separator + UniConecta product wordmark */
.app-header-logo {
  height: 2rem;
  width: auto;
  max-width: min(10rem, 34vw);
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

.app-header-divider {
  display: none;
  width: 1px;
  height: 1.5rem;
  flex-shrink: 0;
  background: rgb(156 163 175);
}

@media (min-width: 640px) {
  .app-header-divider {
    display: block;
  }
}

.app-header-product-logo {
  display: block;
  height: 1.35rem;
  width: auto;
  max-width: min(8.5rem, 26vw);
  object-fit: contain;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .app-header-product-logo {
    height: 1.5rem;
  }
}

/* Header: connected-apps quick switcher (brand trigger) */
.app-switcher {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.app-switcher-trigger {
  appearance: none;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  border-radius: var(--liberty-radius-sm);
}

.app-switcher-trigger:hover {
  background: rgb(255 255 255 / 0.06);
}

.app-switcher-trigger:focus-visible {
  outline: 2px solid rgb(0 191 154 / 0.65);
  outline-offset: 2px;
}

.app-switcher-chevron {
  display: none;
  font-size: 1.15rem !important;
  flex-shrink: 0;
  opacity: 0.75;
  margin-left: -0.15rem;
}

@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;
  /* Wide enough for SupportCenter / Suíte de Testes wordmarks */
  min-width: min(22rem, 94vw);
  margin: 0;
  padding: 0.45rem;
  border-radius: var(--liberty-radius);
  /* Match header chrome so written wordmarks + Liberty mark stay on-brand */
  background: var(--brand-dark);
  color: #fff;
  border: 1px solid rgb(55 65 81);
  box-shadow: var(--liberty-shadow-md);
}

.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: rgb(255 255 255 / 0.55);
}

.app-switcher-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-switcher-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border-radius: var(--liberty-radius-sm);
  text-decoration: none;
  color: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  overflow: visible;
}

.app-switcher-item:hover {
  background: rgb(255 255 255 / 0.08);
}

.app-switcher-item--active {
  background: color-mix(in srgb, var(--app-logo-accent) 16%, transparent);
  outline: 1px solid
    color-mix(in srgb, var(--app-logo-accent) 45%, transparent);
}

/* Product wordmark images — shared metrics box with descender room.
   Cap band is ~52% of the asset; CSS height restores prior optical cap size. */
.app-switcher-wordmark {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  height: 2.4rem;
  overflow: visible;
}

.app-switcher-wordmark-product {
  display: block;
  height: 2.4rem;
  width: auto;
  max-width: min(17rem, 75vw);
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}

.app-switcher-item-check,
.app-switcher-item-external {
  font-size: 1rem !important;
  flex-shrink: 0;
  opacity: 0.55;
  color: var(--app-logo-base);
}

.app-switcher-item--active .app-switcher-item-check {
  opacity: 0.95;
  color: var(--app-logo-accent);
}

.app-top-header-center {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
}

/* Header: organização / workspace (multi-tenant) */
.workspace-switcher {
  position: relative;
  width: 100%;
  max-width: min(36rem, 100%);
  min-width: 0;
}

.workspace-switcher--error {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--liberty-radius-sm);
  background: rgb(239 68 68 / 0.15);
  font-size: 0.75rem;
  width: 100%;
  max-width: min(36rem, 100%);
  min-width: 0;
}

.workspace-switcher--error .workspace-switcher-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.workspace-switcher-retry {
  margin-left: auto;
  flex-shrink: 0;
}

.workspace-switcher-trigger {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: var(--liberty-radius-sm);
  background: rgb(0 0 0 / 0.12);
  color: inherit;
  font: inherit;
  text-align: left;
}

.workspace-switcher-trigger:hover:not(:disabled) {
  background: rgb(255 255 255 / 0.08);
}

.workspace-switcher-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.workspace-switcher-icon {
  font-size: 1.125rem !important;
  flex-shrink: 0;
  opacity: 0.9;
}

.workspace-switcher-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
  position: relative;
}

.workspace-switcher-kicker {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-switcher-label {
  font-size: 0.8125rem;
  font-weight: 600;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.workspace-switcher-chevron {
  font-size: 1.25rem !important;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Header — tablet / narrow: compact toolbar */
@media (max-width: 1024px) {
  .app-top-header-inner {
    padding: 0 0.5rem;
    gap: 0.35rem;
  }

  .app-header-product-logo {
    display: none;
  }

  .app-header-divider {
    display: none;
  }

  .app-header-search-kbd {
    display: none;
  }

  .app-header-search-btn {
    min-width: 2.25rem;
    padding: 0;
  }

  .workspace-switcher-kicker {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .workspace-switcher-label {
    font-size: 0.78rem;
    -webkit-line-clamp: 2;
  }

  .user-account-text,
  .user-account-chevron {
    display: none;
  }

  .user-account-trigger {
    max-width: none;
    padding: 0.15rem;
  }

  .user-account--loading {
    min-width: 2.5rem;
  }

  .user-account--loading .user-account-skeleton {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
  }
}

/* Mobile header: menu | logo | tools on top, workspace full width below */
@media (max-width: 767px) {
  :root {
    --app-header-bar: 5.375rem;
  }

  .app-top-header {
    height: auto;
    min-height: var(--app-header-offset);
  }

  .app-top-header-inner {
    display: grid;
    grid-template-areas:
      "menu brand tools"
      "center center center";
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 2.5rem minmax(0, auto);
    align-items: center;
    height: auto;
    min-height: var(--app-header-bar);
    padding: 0.3rem 0.5rem 0.35rem;
    gap: 0.3rem 0.35rem;
    column-gap: 0.35rem;
  }

  /* Flatten left wrapper so menu + logo land in separate grid columns */
  .app-top-header-left {
    display: contents;
  }

  .app-header-menu-btn {
    grid-area: menu;
    margin-left: -0.25rem;
    padding: 0.35rem;
    flex-shrink: 0;
  }

  .app-header-brand,
  .app-switcher {
    grid-area: brand;
    min-width: 0;
    max-width: 100%;
    justify-self: start;
  }

  .app-header-brand {
    overflow: hidden;
  }

  .app-switcher {
    overflow: visible;
  }

  .app-top-header-center {
    grid-area: center;
    justify-content: stretch;
    padding: 0;
    min-width: 0;
  }

  .app-top-header-right {
    grid-area: tools;
    gap: 0.15rem;
    flex-shrink: 0;
    justify-self: end;
    max-width: 100%;
  }

  .app-header-logo {
    display: none;
  }

  .app-header-product-logo {
    display: block;
    height: 1.3rem;
    width: auto;
    max-width: min(8rem, 100%);
    object-fit: contain;
    object-position: left center;
  }

  .workspace-switcher {
    max-width: none;
  }

  .workspace-switcher-trigger {
    padding: 0.28rem 0.45rem;
    min-height: 2rem;
  }

  .workspace-switcher-chevron {
    display: none;
  }

  .workspace-switcher-label {
    font-size: 0.75rem;
    max-width: none;
    -webkit-line-clamp: 2;
  }

  .app-top-header-tools {
    gap: 0.08rem;
  }

  .app-header-tool-btn,
  .help-menu-trigger {
    align-items: center;
    justify-content: center;
    min-width: 1.875rem;
    width: 1.875rem;
    height: 1.875rem;
    line-height: 1;
  }

  .user-account-avatar {
    width: 1.875rem;
    height: 1.875rem;
    font-size: 0.65rem;
  }

  .app-header-tool-btn {
    padding: 0;
  }

  .app-header-tool-btn .material-icons,
  .help-menu-icon {
    display: block;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    line-height: 1;
    text-align: center;
    font-size: 1.1rem !important;
  }

  .help-menu {
    display: none;
  }

  .user-account-trigger {
    padding: 0;
  }
}

@media (max-width: 420px) {
  .app-top-header .app-time-bar {
    display: none;
  }
}

@media (max-width: 360px) {
  .app-header-logo {
    display: none;
  }

  .app-header-product-logo {
    display: block;
    height: 1.15rem;
    max-width: min(7rem, 58vw);
  }
}

/* legacy narrow rules consolidated above — removed duplicate 900px / 380px blocks */

.workspace-switcher-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  width: max(100%, min(32rem, 94vw));
  min-width: min(24rem, 92vw);
  max-width: min(36rem, 94vw);
  max-height: 18rem;
  margin: 0;
  padding: 0.35rem;
  border-radius: var(--liberty-radius);
  background: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--liberty-shadow-md);
}

.workspace-switcher-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-bottom: 0.25rem;
  padding: 0.3rem 0.45rem;
  border-radius: var(--liberty-radius-sm);
  background: var(--liberty-nav-active, rgb(0 0 0 / 0.04));
  border: 1px solid var(--border-color);
}

.workspace-switcher-search-icon {
  font-size: 1rem !important;
  opacity: 0.65;
  flex-shrink: 0;
}

.workspace-switcher-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.8125rem;
  outline: none;
  padding: 0.15rem 0;
}

.workspace-switcher-search-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.85;
}

.workspace-switcher-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: auto;
  min-height: 0;
  flex: 1;
}

.workspace-switcher-empty {
  padding: 0.65rem 0.6rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.workspace-switcher-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: none;
  border-radius: var(--liberty-radius-sm);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.workspace-switcher-item:hover {
  background: var(--liberty-nav-active);
}

.workspace-switcher-item--active {
  outline: 1px solid rgb(0 191 154 / 0.45);
}

.workspace-switcher-item-name {
  font-weight: 600;
  font-size: 0.875rem;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.workspace-switcher-item-slug {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.workspace-switcher-error {
  position: absolute;
  z-index: 81;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: min(18rem, 92vw);
  margin: 0;
  padding: 0.45rem 0.6rem;
  border-radius: var(--liberty-radius-sm);
  background: rgb(254 242 242);
  color: rgb(185 28 28);
  border: 1px solid rgb(252 165 165);
  font-size: 0.75rem;
  line-height: 1.35;
  box-shadow: var(--liberty-shadow-md);
}

/* Full-screen org/workspace switch — entertaining loading state */
.org-switch-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000000002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: org-switch-overlay-in 0.55s ease-out both;
}

@keyframes org-switch-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.org-switch-overlay__backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(
      900px 520px at 12% 8%,
      rgb(0 191 154 / 0.28),
      transparent 58%
    ),
    radial-gradient(
    760px 480px at 92% 92%,
    rgb(14 165 233 / 0.22),
    transparent 55%
  ),
    linear-gradient(
    155deg,
    rgb(15 23 42) 0%,
    rgb(0 43 73) 52%,
    rgb(0 63 92) 100%
  );
}

.org-switch-overlay__grid {
  position: absolute;
  inset: -40%;
  opacity: 0.14;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: org-switch-grid-drift 18s linear infinite;
  mask-image: radial-gradient(circle at center, #000 24%, transparent 72%);
}

@keyframes org-switch-grid-drift {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    transform: translate3d(-48px, -48px, 0) rotate(0.5deg);
  }
}

.org-switch-overlay__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: org-switch-orb-float 7s ease-in-out infinite;
}

.org-switch-overlay__orb--1 {
  width: 18rem;
  height: 18rem;
  top: 8%;
  left: -4%;
  background: rgb(0 191 154 / 0.45);
}

.org-switch-overlay__orb--2 {
  width: 14rem;
  height: 14rem;
  right: 6%;
  bottom: 10%;
  background: rgb(56 189 248 / 0.35);
  animation-delay: -2.4s;
}

.org-switch-overlay__orb--3 {
  width: 10rem;
  height: 10rem;
  top: 42%;
  left: 58%;
  background: rgb(129 140 248 / 0.28);
  animation-delay: -4.8s;
}

@keyframes org-switch-orb-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -18px, 0) scale(1.06);
  }
}

.org-switch-overlay__card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(26rem, 100%);
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 1.25rem;
  text-align: center;
  color: #fff;
  background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.16);
  box-shadow:
    0 28px 80px rgb(0 0 0 / 0.38),
    0 0 0 1px rgb(255 255 255 / 0.04) inset;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: org-switch-card-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

@keyframes org-switch-card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.org-switch-overlay__logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 1.25rem;
}

.org-switch-overlay__logo {
  display: block;
  height: 2rem;
  width: 100%;
  max-width: 9.5rem;
  object-fit: contain;
  /* PNG art sits in the left ~46% of the canvas — anchor that to the card center */
  object-position: 28% center;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.org-switch-overlay__icon-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1rem;
}

.org-switch-overlay__icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 2rem !important;
  line-height: 1;
  color: rgb(167 243 208);
  animation: org-switch-icon-pulse 1.8s ease-in-out infinite;
}

@keyframes org-switch-icon-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.88;
  }
}

.org-switch-overlay__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgb(0 191 154 / 0.45);
  animation: org-switch-ring 2.4s ease-out infinite;
}

.org-switch-overlay__ring--2 {
  animation-delay: 1.2s;
}

@keyframes org-switch-ring {
  0% {
    transform: scale(0.72);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.org-switch-overlay__kicker {
  margin: 0 0 0.85rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(167 243 208);
}

.org-switch-overlay__route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  margin-bottom: 1rem;
  min-width: 0;
}

.org-switch-overlay__org {
  min-width: 0;
  max-width: 9.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-switch-overlay__org--from {
  background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.14);
  color: rgb(203 213 225);
}

.org-switch-overlay__org--to {
  background: linear-gradient(
    135deg,
    rgb(0 191 154 / 0.28),
    rgb(14 165 233 / 0.22)
  );
  border: 1px solid rgb(0 191 154 / 0.45);
  color: #fff;
  box-shadow: 0 0 24px rgb(0 191 154 / 0.18);
  animation: org-switch-to-glow 2s ease-in-out infinite;
}

@keyframes org-switch-to-glow {
  0%,
  100% {
    box-shadow: 0 0 18px rgb(0 191 154 / 0.16);
  }
  50% {
    box-shadow: 0 0 28px rgb(0 191 154 / 0.32);
  }
}

.org-switch-overlay__arrow {
  flex-shrink: 0;
  display: inline-flex;
  color: rgb(125 211 252);
  animation: org-switch-arrow 1.1s ease-in-out infinite;
}

.org-switch-overlay__arrow .material-icons {
  font-size: 1.35rem !important;
}

@keyframes org-switch-arrow {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.75;
  }
  50% {
    transform: translateX(5px);
    opacity: 1;
  }
}

.org-switch-overlay__tip {
  width: 100%;
  min-height: 2.6rem;
  margin: 0 0 1.15rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: rgb(226 232 240);
  animation: org-switch-tip-in 0.35s ease-out;
}

@keyframes org-switch-tip-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.org-switch-overlay__progress {
  width: 100%;
  height: 0.35rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgb(255 255 255 / 0.12);
}

.org-switch-overlay__progress-bar {
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgb(0 191 154),
    rgb(56 189 248),
    rgb(0 191 154)
  );
  background-size: 200% 100%;
  animation: org-switch-progress 1.35s ease-in-out infinite;
}

@keyframes org-switch-progress {
  0% {
    transform: translateX(-120%);
    background-position: 0% 50%;
  }
  100% {
    transform: translateX(320%);
    background-position: 100% 50%;
  }
}

.org-switch-overlay__brand {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(148 163 184);
}

@media (max-width: 480px) {
  .org-switch-overlay__route {
    flex-direction: column;
    gap: 0.4rem;
  }

  .org-switch-overlay__arrow .material-icons {
    transform: rotate(90deg);
  }

  .org-switch-overlay__org {
    max-width: 100%;
  }
}

/* Action deep-link — wrong org / no access gate */
.action-deeplink-gate {
  position: fixed;
  inset: 0;
  z-index: 1000000001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: org-switch-overlay-in 0.45s ease-out both;
}

.action-deeplink-gate__backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(
      900px 520px at 12% 8%,
      rgb(0 191 154 / 0.26),
      transparent 58%
    ),
    radial-gradient(
    760px 480px at 92% 92%,
    rgb(14 165 233 / 0.2),
    transparent 55%
  ),
    linear-gradient(
    155deg,
    rgb(15 23 42) 0%,
    rgb(0 43 73) 52%,
    rgb(0 63 92) 100%
  );
}

.action-deeplink-gate__grid {
  position: absolute;
  inset: -40%;
  opacity: 0.12;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, #000 24%, transparent 72%);
}

.action-deeplink-gate__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.5;
}

.action-deeplink-gate__orb--1 {
  width: 16rem;
  height: 16rem;
  top: 6%;
  left: -3%;
  background: rgb(0 191 154 / 0.42);
}

.action-deeplink-gate__orb--2 {
  width: 13rem;
  height: 13rem;
  right: 4%;
  bottom: 12%;
  background: rgb(56 189 248 / 0.32);
}

.action-deeplink-gate__orb--3 {
  width: 9rem;
  height: 9rem;
  top: 48%;
  left: 56%;
  background: rgb(248 113 113 / 0.22);
}

.action-deeplink-gate__card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(34rem, 100%);
  max-height: min(92dvh, 44rem);
  padding: 1.75rem 1.5rem 1.35rem;
  border-radius: 1.35rem;
  color: #fff;
  background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.16);
  box-shadow:
    0 28px 80px rgb(0 0 0 / 0.38),
    0 0 0 1px rgb(255 255 255 / 0.04) inset;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: org-switch-card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: hidden;
}

.action-deeplink-gate__card--compact {
  align-items: center;
  width: min(24rem, 100%);
  text-align: center;
  max-height: none;
}

.action-deeplink-gate__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.action-deeplink-gate__logo {
  display: block;
  height: 1.85rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.action-deeplink-gate__icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.85rem;
  border-radius: 1rem;
  background: rgb(248 113 113 / 0.16);
  border: 1px solid rgb(248 113 113 / 0.35);
  color: #fecaca;
  box-shadow: 0 10px 28px rgb(248 113 113 / 0.16);
}

.action-deeplink-gate__icon .material-icons {
  font-size: 1.65rem;
}

.action-deeplink-gate[data-kind="not_found"] .action-deeplink-gate__icon {
  background: rgb(56 189 248 / 0.14);
  border-color: rgb(56 189 248 / 0.35);
  color: #bae6fd;
  box-shadow: 0 10px 28px rgb(56 189 248 / 0.14);
}

.action-deeplink-gate__title {
  margin: 0 0 0.45rem;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.action-deeplink-gate__lead {
  margin: 0 0 1.15rem;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgb(203 213 225);
}

.action-deeplink-gate__error {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.75rem;
  background: rgb(248 113 113 / 0.14);
  border: 1px solid rgb(248 113 113 / 0.35);
  color: #fecaca;
  font-size: 0.84rem;
}

.action-deeplink-gate__spinner {
  width: 2.25rem;
  height: 2.25rem;
  margin: 0.35rem auto 1rem;
  border-radius: 50%;
  border: 3px solid rgb(255 255 255 / 0.16);
  border-top-color: #00bf9a;
  animation: action-deeplink-spin 0.85s linear infinite;
}

@keyframes action-deeplink-spin {
  to {
    transform: rotate(360deg);
  }
}

.action-deeplink-gate__orgs {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
  flex: 1 1 auto;
}

.action-deeplink-gate__orgs-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.action-deeplink-gate__orgs-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(148 163 184);
}

.action-deeplink-gate__orgs-active {
  font-size: 0.75rem;
  color: rgb(167 243 208);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}

.action-deeplink-gate__search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  background: rgb(15 23 42 / 0.45);
  border: 1px solid rgb(255 255 255 / 0.12);
}

.action-deeplink-gate__search .material-icons {
  font-size: 1.1rem;
  color: rgb(148 163 184);
}

.action-deeplink-gate__search input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.action-deeplink-gate__search input::placeholder {
  color: rgb(148 163 184);
}

.action-deeplink-gate__muted {
  margin: 0;
  padding: 1rem 0.25rem;
  text-align: center;
  font-size: 0.88rem;
  color: rgb(148 163 184);
}

.action-deeplink-gate__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: min(18rem, 42dvh);
  scrollbar-gutter: stable;
}

.action-deeplink-gate__org {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.9rem;
  border: 1px solid rgb(255 255 255 / 0.12);
  background: rgb(15 23 42 / 0.35);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.action-deeplink-gate__org:hover:not(:disabled) {
  border-color: rgb(0 191 154 / 0.45);
  background: rgb(0 191 154 / 0.12);
  transform: translateY(-1px);
}

.action-deeplink-gate__org:disabled {
  opacity: 0.7;
  cursor: wait;
}

.action-deeplink-gate__org--active {
  border-color: rgb(0 191 154 / 0.5);
  background: rgb(0 191 154 / 0.16);
}

.action-deeplink-gate__org-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, #00bf9a, #0ea5e9);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

.action-deeplink-gate__org-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.action-deeplink-gate__org-meta strong {
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-deeplink-gate__org-meta span {
  font-size: 0.75rem;
  color: rgb(148 163 184);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-deeplink-gate__org-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #a7f3d0;
}

.action-deeplink-gate__org-cta .material-icons {
  font-size: 1rem;
}

.action-deeplink-gate__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

.action-deeplink-gate__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.16);
  background: rgb(15 23 42 / 0.35);
  color: rgb(226 232 240);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.action-deeplink-gate__secondary:hover:not(:disabled) {
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.28);
}

.action-deeplink-gate__secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.action-deeplink-gate__secondary--link {
  background: transparent;
}

@media (max-width: 520px) {
  .action-deeplink-gate__card {
    padding: 1.35rem 1.1rem 1.15rem;
  }
}

/* Admin: assistente de bootstrap de organização */
.bootstrap-assistant-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 960px) {
  .bootstrap-assistant-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: start;
  }
}

.bootstrap-card,
.bootstrap-chat {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius);
  padding: 1.25rem;
  box-shadow: var(--liberty-shadow);
}

.bootstrap-card-title,
.bootstrap-chat-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.bootstrap-card-lead {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.bootstrap-field-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .bootstrap-field-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.bootstrap-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.bootstrap-input,
.bootstrap-textarea {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius-sm);
  background: #fff;
  color: var(--text-primary);
}

.bootstrap-textarea {
  resize: vertical;
  min-height: 6rem;
}

.bootstrap-actions {
  margin-top: 0.75rem;
}

.bootstrap-note {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.bootstrap-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 14rem;
  overflow: auto;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--liberty-radius-sm);
  background: var(--background-color);
  border: 1px solid var(--border-color);
}

.bootstrap-chat-bubble {
  max-width: 95%;
  padding: 0.5rem 0.65rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.bootstrap-chat-bubble--assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border-color);
}

.bootstrap-chat-bubble--user {
  align-self: flex-end;
  background: rgb(0 191 154 / 0.12);
  border: 1px solid rgb(0 191 154 / 0.35);
}

.bootstrap-preview {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.bootstrap-preview-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.bootstrap-pre {
  max-height: 14rem;
  overflow: auto;
  padding: 0.75rem;
  border-radius: var(--liberty-radius-sm);
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.bootstrap-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.bootstrap-error {
  margin-top: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--liberty-radius-sm);
  background: rgb(239 68 68 / 0.1);
  color: var(--error-color);
  font-size: 0.875rem;
}

.bootstrap-ceo-strip {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--liberty-radius);
  border: 1px solid rgb(0 191 154 / 0.35);
  background: linear-gradient(
    120deg,
    rgb(0 191 154 / 0.08),
    rgb(0 43 73 / 0.06)
  );
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.bootstrap-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.bootstrap-narrative-card {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--liberty-radius);
  border: 1px solid var(--border-color);
  background: linear-gradient(180deg, #fff, rgb(248 250 252 / 0.9));
  box-shadow: var(--liberty-shadow);
}

.bootstrap-narrative-title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
}

.bootstrap-narrative-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.bootstrap-narrative-block {
  margin-top: 1rem;
}

.bootstrap-narrative-subtitle {
  margin: 0 0 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
}

.bootstrap-narrative-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.bootstrap-narrative-list--compact li {
  margin-bottom: 0.2rem;
}

/* Nova organização — convites opcionais (mesma linguagem visual do bootstrap) */
.bootstrap-share {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--liberty-radius);
  border: 1px solid var(--border-color);
  background: linear-gradient(
    135deg,
    rgb(0 191 154 / 0.06),
    rgb(0 43 73 / 0.04)
  );
}

.bootstrap-share-summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bootstrap-share-summary::-webkit-details-marker {
  display: none;
}

.bootstrap-share-chevron {
  font-size: 1.25rem !important;
  color: var(--brand-primary);
}

.bootstrap-share-optional {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.bootstrap-share-lead {
  margin: 0.65rem 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.bootstrap-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
}

.bootstrap-share-known {
  margin-bottom: 0.85rem;
}

.bootstrap-share-known-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.bootstrap-share-known-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.bootstrap-share-known-search {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 18rem;
}

.bootstrap-input--compact {
  padding: 0.4rem 0.55rem;
  font-size: 0.8125rem;
}

.bootstrap-share-known-empty {
  margin: 0;
  padding: 0.55rem 0.65rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: rgb(255 255 255 / 0.55);
  border-radius: var(--liberty-radius-sm);
  border: 1px dashed rgb(0 191 154 / 0.25);
}

.bootstrap-share-known-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 11rem;
  overflow-y: auto;
  border: 1px solid rgb(0 191 154 / 0.2);
  border-radius: var(--liberty-radius-sm);
  background: rgb(255 255 255 / 0.72);
}

.bootstrap-share-known-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid rgb(0 43 73 / 0.06);
}

.bootstrap-share-known-row:last-child {
  border-bottom: none;
}

.bootstrap-share-known-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.bootstrap-share-known-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bootstrap-share-known-email {
  font-size: 0.75rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bootstrap-share-divider-label {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.app-btn--compact {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.bootstrap-label--inline {
  flex: 1 1 10rem;
  min-width: 0;
}

.bootstrap-share-chips {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bootstrap-share-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgb(0 191 154 / 0.35);
  font-size: 0.8125rem;
}

.bootstrap-share-chip-text {
  color: var(--text-primary);
}

.bootstrap-share-chip-role {
  color: var(--text-secondary);
}

.bootstrap-share-chip-remove {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.15rem;
  border-radius: 4px;
}

.bootstrap-share-chip-remove:hover {
  color: var(--error-color);
  background: rgb(239 68 68 / 0.08);
}

/* Sistema → Usuários — equipe e papéis por workspace */
.org-team {
  max-width: 52rem;
}

.org-team--loading {
  min-height: 8rem;
  display: flex;
  align-items: center;
}

.org-team-skeleton {
  display: block;
  width: 100%;
  height: 6rem;
  border-radius: var(--liberty-radius);
  background: linear-gradient(
    90deg,
    rgb(226 232 240 / 0.6) 0%,
    rgb(241 245 249 / 0.9) 50%,
    rgb(226 232 240 / 0.6) 100%
  );
  background-size: 200% 100%;
  animation: org-team-shimmer 1.2s ease-in-out infinite;
}

@keyframes org-team-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.org-team-hero {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 1.1rem 1.15rem;
  border-radius: var(--liberty-radius);
  border: 1px solid rgb(0 182 214 / 0.25);
  background: linear-gradient(
    125deg,
    rgb(0 191 154 / 0.09),
    rgb(0 43 73 / 0.06)
  );
  box-shadow: var(--liberty-shadow);
}

.org-team-hero-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-dark);
  color: #fff;
}

.org-team-hero-icon .material-icons {
  font-size: 1.5rem;
}

.org-team-hero-title {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.org-team-hero-lead {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.org-team-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.org-team-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: min(100%, 14rem);
}

.org-team-field--grow {
  flex: 1 1 12rem;
}

.org-team-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.org-team-select {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-primary);
  min-width: 0;
}

.org-team-select--compact {
  padding: 0.35rem 0.5rem;
  font-size: 0.8125rem;
}

.org-team-input {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--border-color);
  width: 100%;
}

.org-team-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.org-team-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.org-team-badge .material-icons {
  font-size: 1rem !important;
}

.org-team-badge--creator {
  background: rgb(0 191 154 / 0.15);
  color: var(--brand-dark);
}

.org-team-badge--admin {
  background: rgb(0 43 73 / 0.08);
  color: var(--brand-dark);
}

.org-team-badge--platform {
  background: rgb(0 182 214 / 0.18);
  color: var(--brand-dark);
  border: 1px solid rgb(0 182 214 / 0.45);
}

.org-team-error {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--liberty-radius-sm);
  background: rgb(239 68 68 / 0.1);
  color: var(--error-color);
  font-size: 0.875rem;
}

.org-team-notice {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--liberty-radius-sm);
  background: rgb(34 197 94 / 0.12);
  color: var(--brand-dark);
  font-size: 0.875rem;
}

.org-team-card {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--liberty-radius);
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  box-shadow: var(--liberty-shadow);
}

.org-team-card-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.org-team-card-lead {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.org-team-invite-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
}

.org-team-invite-btn {
  flex-shrink: 0;
}

.org-team-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.org-team-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
}

.org-team-row:last-child {
  border-bottom: none;
}

.org-team-row-main {
  flex: 1 1 12rem;
  min-width: 0;
}

.org-team-name {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.org-team-email {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.org-team-meta {
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.org-team-pill {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgb(100 116 139 / 0.12);
  color: var(--text-secondary);
}

.org-team-pill--you {
  background: rgb(0 191 154 / 0.18);
  color: var(--brand-dark);
}

.org-team-since {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.org-team-row-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.org-team-remove {
  padding: 0.35rem !important;
  min-width: auto;
}

.org-team-invite-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.org-team-pill--custom {
  background: rgb(99 102 241 / 0.15);
  color: rgb(67 56 202);
}

/* Invite user wizard */
.invite-wiz-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgb(15 23 42 / 0.45);
  backdrop-filter: blur(4px);
}

.invite-wiz {
  width: min(100%, 42rem);
  max-height: min(90vh, 44rem);
  display: flex;
  flex-direction: column;
  border-radius: var(--liberty-radius);
  background: #fff;
  box-shadow: 0 24px 48px rgb(15 23 42 / 0.18);
  overflow: hidden;
}

.invite-wiz-header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.invite-wiz-title {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.invite-wiz-subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.invite-wiz-close {
  flex-shrink: 0;
}

.invite-wiz-steps {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.invite-wiz-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.invite-wiz-step--active {
  color: var(--brand-dark);
  font-weight: 600;
}

.invite-wiz-step--done {
  color: var(--brand-teal);
}

.invite-wiz-step-num {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgb(226 232 240 / 0.8);
}

.invite-wiz-step--active .invite-wiz-step-num {
  background: var(--brand-dark);
  color: #fff;
}

.invite-wiz-step--done .invite-wiz-step-num {
  background: rgb(0 191 154 / 0.2);
  color: var(--brand-teal);
}

.invite-wiz-step-num .material-icons {
  font-size: 0.95rem;
}

.invite-wiz-step-label {
  display: none;
}

@media (min-width: 520px) {
  .invite-wiz-step-label {
    display: inline;
  }
}

.invite-wiz-error {
  margin: 0.75rem 1.25rem 0;
  padding: 0.5rem 0.65rem;
  border-radius: var(--liberty-radius-sm);
  background: rgb(254 226 226);
  color: rgb(153 27 27);
  font-size: 0.875rem;
}

.invite-wiz-body {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.25rem;
}

.invite-wiz-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* The wizard stacks fields vertically, so the horizontal-row `--grow`
   flex-basis must not stretch them — keep each field at its natural height. */
.invite-wiz-panel .org-team-field,
.invite-wiz-panel .org-team-field--grow {
  flex: 0 0 auto;
}

/* Tighten the gap between a field and the hint that explains it. */
.invite-wiz-panel .invite-wiz-hint {
  margin-top: -0.25rem;
}

.invite-wiz-panel--perms {
  gap: 0.65rem;
}

.invite-wiz-hint,
.invite-wiz-lead {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.invite-wiz-ws-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.invite-wiz-ws-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius-sm);
  cursor: pointer;
}

.invite-wiz-ws-item:has(input:checked) {
  border-color: rgb(0 191 154 / 0.55);
  background: rgb(0 191 154 / 0.06);
}

.invite-wiz-ws-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.invite-wiz-ws-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.invite-wiz-ws-slug {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.invite-wiz-perm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.35rem;
}

.invite-wiz-defaults {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.invite-wiz-perm-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.invite-wiz-accordions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.invite-wiz-accordion {
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius-sm);
  overflow: hidden;
}

.invite-wiz-accordion-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border: none;
  background: rgb(248 250 252);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.invite-wiz-group-icon,
.member-access-group-icon {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: var(--liberty-radius-sm);
  background: rgb(0 43 73 / 0.06);
  color: var(--brand-dark);
  overflow: hidden;
}

.invite-wiz-group-glyph,
.invite-wiz-group-icon .material-icons,
.member-access-group-icon .material-icons {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  font-size: 1.05rem !important;
  line-height: 1 !important;
  text-align: center;
}

.invite-wiz-accordion-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.invite-wiz-accordion-meta {
  flex: 0 0 auto;
  min-width: 2.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.invite-wiz-chevron {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
}

.invite-wiz-chevron .material-icons {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  font-size: 1.125rem !important;
  line-height: 1 !important;
}

.invite-wiz-accordion-body {
  padding: 0.4rem 0.6rem 0.55rem;
  border-top: 1px solid var(--border-color);
}

.invite-wiz-group-toggle {
  margin-bottom: 0.45rem;
  font-size: 0.8125rem !important;
}

.invite-wiz-perm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.invite-wiz-perm-item {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.8125rem;
  cursor: pointer;
  line-height: 1.35;
}

.invite-wiz-perm-label {
  display: block;
  font-weight: 600;
}

.invite-wiz-perm-desc {
  display: block;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.invite-wiz-perm-key {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.6875rem;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  background: rgb(226 232 240 / 0.7);
}

.invite-wiz-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: rgb(248 250 252 / 0.8);
}

/* Member access — stepped profile / details / permissions editor */
.member-access-backdrop {
  padding: var(--ds-space-4, 1rem);
  background: rgb(0 27 47 / 0.58);
  backdrop-filter: blur(6px);
}

.member-access-modal {
  width: min(100%, 42rem);
  max-height: min(92vh, 40rem);
  border: 1px solid rgb(226 232 240 / 0.85);
  border-radius: var(--ds-radius-xl, 16px);
  box-shadow: 0 28px 80px rgb(0 27 47 / 0.28);
}

.member-access-header {
  align-items: center;
  padding: 1rem 1.25rem 0.85rem;
  background: linear-gradient(135deg, #fff 70%, rgb(0 191 154 / 0.07));
}

.member-access-header .invite-wiz-close {
  flex: 0 0 auto;
  align-self: flex-start;
}

.member-access-header .invite-wiz-close .material-icons {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 1.25rem !important;
  line-height: 1 !important;
}

.member-access-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--ds-space-3, 0.75rem);
}

.member-access-avatar {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: var(--ds-radius-lg, 12px);
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 12px rgb(0 43 73 / 0.18);
}

.member-access-heading .invite-wiz-title {
  font-size: 1.125rem;
}

.member-access-heading .invite-wiz-subtitle {
  line-height: 1.4;
}

.member-access-heading .invite-wiz-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

.member-access-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: #fff;
}

.member-access-steps > li {
  min-width: 0;
}

.member-access-step-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--ds-radius-md, 8px);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.member-access-step-btn:disabled {
  cursor: default;
  opacity: 0.72;
}

.member-access-step-btn:not(:disabled):hover {
  background: #f8fafc;
}

.member-access-step-btn--active {
  border-color: rgb(0 191 154 / 0.28);
  background: rgb(0 191 154 / 0.08);
  color: var(--brand-dark);
  font-weight: 700;
}

.member-access-step-btn--done {
  color: #007d69;
}

.member-access-step-num {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  border-radius: var(--ds-radius-pill, 100px);
  background: rgb(226 232 240 / 0.9);
  color: inherit;
  font-size: 0.7rem;
  font-weight: 800;
}

.member-access-step-btn--active .member-access-step-num {
  background: var(--brand-dark);
  color: #fff;
}

.member-access-step-btn--done .member-access-step-num {
  background: rgb(0 191 154 / 0.18);
  color: #007d69;
}

.member-access-step-num .material-icons {
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  font-size: 0.9rem !important;
  line-height: 1 !important;
}

.member-access-step-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-access-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  background: #fff;
  overflow: auto;
}

.member-access-modal .material-icons {
  display: block;
  line-height: 1 !important;
}

.member-access-loading {
  flex: 1 1 auto;
  width: 100%;
  min-height: 14rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-3, 0.75rem);
  padding: var(--ds-space-7, 2rem) var(--ds-space-6, 1.5rem);
  background: #fff;
  color: var(--text-secondary);
}

.member-access-loading-icon {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: var(--ds-radius-lg, 12px);
  background: rgb(0 191 154 / 0.12);
  color: #007d69;
}

.member-access-loading-glyph {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 1.25rem !important;
  line-height: 1 !important;
}

.member-access-loading-copy {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-1, 0.25rem);
}

.member-access-loading-copy strong {
  color: var(--brand-dark);
  font-size: 0.875rem;
  line-height: 1.35;
}

.member-access-loading-copy small {
  font-size: 0.75rem;
  line-height: 1.45;
}

.member-access-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.member-access-pane {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3, 0.75rem);
  padding: 1rem 1.25rem 1.15rem;
  animation: member-access-pane-in 0.18s ease;
}

@keyframes member-access-pane-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.member-access-pane-head h3 {
  margin: 0 0 0.25rem;
  color: var(--brand-dark);
  font-size: 0.95rem;
  line-height: 1.35;
}

.member-access-pane-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.member-access-name-field {
  margin: 0;
}

.member-access-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.member-access-profile {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.7rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--ds-radius-lg, 12px);
  background: #fff;
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.member-access-profile:last-child {
  grid-column: 1 / -1;
}

.member-access-profile:hover {
  border-color: rgb(0 191 154 / 0.5);
  transform: translateY(-1px);
  box-shadow: var(--ds-shadow-sm);
}

.member-access-profile:focus-visible {
  outline: none;
  box-shadow: var(--ds-focus-ring);
}

.member-access-profile--selected {
  border-color: var(--brand-primary);
  background: rgb(0 191 154 / 0.055);
  box-shadow: 0 0 0 1px rgb(0 191 154 / 0.12);
}

.member-access-profile-icon {
  flex: 0 0 auto;
  width: 1.875rem;
  height: 1.875rem;
  display: grid;
  place-items: center;
  border-radius: var(--ds-radius-md, 8px);
  background: rgb(0 43 73 / 0.07);
  color: var(--brand-dark);
}

.member-access-profile-glyph {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  font-size: 1.05rem !important;
  line-height: 1 !important;
  text-align: center;
}

.member-access-profile--selected .member-access-profile-icon {
  background: rgb(0 191 154 / 0.15);
  color: #007d69;
}

.member-access-profile-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.member-access-profile-copy strong {
  font-size: 0.8125rem;
  line-height: 1.35;
}

.member-access-profile-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.member-access-profile-check {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  margin-top: 0.1rem;
  color: #94a3b8;
}

.member-access-profile-check .material-icons {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  font-size: 1.125rem !important;
  line-height: 1 !important;
}

.member-access-profile--selected .member-access-profile-check {
  color: var(--brand-primary);
}

.member-access-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.member-access-summary-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--ds-radius-md, 8px);
  background: #f8fafc;
}

.member-access-summary-icon {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: var(--ds-radius-md, 8px);
  background: rgb(0 191 154 / 0.12);
  color: #007d69;
}

.member-access-summary-icon .material-icons {
  display: block;
  width: 1rem;
  height: 1rem;
  font-size: 1rem !important;
  line-height: 1 !important;
  text-align: center;
}

.member-access-summary-item > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.member-access-summary-item small {
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.member-access-summary-item strong {
  overflow: hidden;
  color: var(--brand-dark);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-access-custom-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

.member-access-review-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgb(0 191 154 / 0.28);
  border-radius: var(--ds-radius-lg, 12px);
  background: rgb(0 191 154 / 0.055);
}

.member-access-review-icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: var(--ds-radius-md, 8px);
  background: rgb(0 191 154 / 0.14);
  color: #007d69;
}

.member-access-review-icon .material-icons {
  width: 1.15rem;
  height: 1.15rem;
  font-size: 1.15rem !important;
}

.member-access-review-card strong,
.member-access-recommended-copy strong,
.member-access-perm-summary-copy strong {
  display: block;
  color: var(--brand-dark);
  font-size: 0.85rem;
  line-height: 1.35;
}

.member-access-review-card small,
.member-access-recommended-copy small,
.member-access-perm-summary-copy small {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.45;
}

.member-access-perm-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: var(--ds-radius-lg, 12px);
  background: #f8fafc;
}

.member-access-badge {
  flex: 0 0 auto;
  padding: 0.2rem 0.55rem;
  border-radius: var(--ds-radius-pill, 100px);
  background: rgb(0 191 154 / 0.13);
  color: #007d69;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.member-access-recommended {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgb(0 191 154 / 0.28);
  border-radius: var(--ds-radius-lg, 12px);
  background: linear-gradient(180deg, rgb(0 191 154 / 0.06), #fff 55%);
}

.member-access-recommended-copy {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.member-access-recommended-icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: var(--ds-radius-md, 8px);
  background: rgb(0 191 154 / 0.14);
  color: #007d69;
}

.member-access-recommended-icon .material-icons {
  width: 1.1rem;
  height: 1.1rem;
  font-size: 1.1rem !important;
}

.member-access-area-preview {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.member-access-area-preview li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgb(226 232 240 / 0.9);
  border-radius: var(--ds-radius-md, 8px);
  background: #fff;
  color: var(--brand-dark);
  font-size: 0.8125rem;
  font-weight: 600;
}

.member-access-area-preview li span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.member-access-area-preview li strong {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.member-access-customize-btn {
  align-self: stretch;
  justify-content: center;
}

.member-access-defaults {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-3, 0.75rem);
  padding: 0.7rem 0.85rem;
  border: 1px solid rgb(0 191 154 / 0.28);
  border-radius: var(--ds-radius-lg, 12px);
  background: rgb(0 191 154 / 0.055);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.member-access-defaults:hover {
  border-color: rgb(0 191 154 / 0.45);
  background: rgb(0 191 154 / 0.08);
}

.member-access-defaults input,
.member-access-perm-item input {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0.15rem 0 0;
  accent-color: var(--brand-primary);
}

.member-access-defaults > span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.member-access-defaults strong {
  color: var(--brand-dark);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.member-access-defaults small {
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.45;
}

.member-access-accordions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.member-access-accordion {
  border-radius: var(--ds-radius-md, 8px);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.member-access-accordion:hover {
  border-color: rgb(0 43 73 / 0.16);
}

.member-access-accordion .invite-wiz-accordion-head {
  min-height: 2.75rem;
  gap: 0.65rem;
  padding: 0.5rem 0.7rem;
  background: #fff;
  transition: background-color 0.15s ease;
}

.member-access-accordion .invite-wiz-accordion-head:hover {
  background: #f8fafc;
}

.member-access-accordion .invite-wiz-accordion-head:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgb(0 191 154 / 0.35);
}

.member-access-accordion .invite-wiz-chevron {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  color: #94a3b8;
}

.member-access-accordions--readonly .member-access-perm-list {
  opacity: 0.65;
}

.member-access-perm-list {
  gap: 0;
}

.member-access-perm-item {
  gap: var(--ds-space-2, 0.5rem);
  align-items: flex-start;
  padding: 0.4rem 0.15rem;
  border-bottom: 1px solid rgb(226 232 240 / 0.72);
  border-radius: 4px;
}

.member-access-perm-item:hover {
  background: rgb(248 250 252 / 0.85);
}

.member-access-perm-list li:last-child .member-access-perm-item {
  border-bottom: 0;
}

.member-access-footer {
  justify-content: space-between;
  gap: var(--ds-space-2, 0.5rem);
  padding: 0.75rem 1.25rem;
  background: #fff;
  box-shadow: 0 -8px 24px rgb(15 23 42 / 0.04);
}

.member-access-footer .app-btn {
  min-width: 7.5rem;
}

.member-access-footer .app-btn .material-icons {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  font-size: 1.05rem !important;
  line-height: 1 !important;
}

@media (max-width: 640px) {
  .member-access-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .member-access-modal {
    max-height: 94vh;
    border-radius: var(--ds-radius-xl, 16px) var(--ds-radius-xl, 16px) 0 0;
  }

  .member-access-header,
  .member-access-steps,
  .member-access-pane,
  .member-access-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .member-access-step-label {
    display: none;
  }

  .member-access-profile-grid,
  .member-access-summary,
  .member-access-custom-fields {
    grid-template-columns: 1fr;
  }

  .member-access-profile:last-child {
    grid-column: auto;
  }

  .member-access-profile-copy small {
    -webkit-line-clamp: 3;
  }

  .member-access-footer .app-btn {
    flex: 1;
  }
}

.org-team-remove .material-icons {
  font-size: 1.25rem !important;
}

.org-team-role-readonly {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.org-team-muted {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.org-team-hint {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: var(--liberty-radius-sm);
  background: rgb(245 158 11 / 0.12);
  border: 1px solid rgb(245 158 11 / 0.35);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Conta: menu no header (nome, papel, sair) */
.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);
  animation: user-skel 1.1s ease-in-out infinite alternate;
}

@keyframes user-skel {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 0.9;
  }
}

.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 {
  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;
  letter-spacing: 0.02em;
  overflow: hidden;
  color: #fff;
}

.user-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.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 {
  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;
  overflow: hidden;
}

.user-account-panel-identity strong,
.user-account-panel-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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-panel-divider {
  height: 1px;
  margin: 0.25rem 0.35rem;
  background: rgb(51 65 85);
}

.user-account-profile {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: rgb(226 232 240);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.user-account-profile:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}

.user-account-profile .material-icons {
  color: rgb(94 234 212);
  font-size: 1.125rem !important;
}

.user-account[open] .user-account-trigger {
  background: rgb(255 255 255 / 0.12);
  border-color: rgb(255 255 255 / 0.16);
}

.user-account-tour {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.15rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: rgb(167 243 208);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.user-account-tour:hover {
  background: rgb(255 255 255 / 0.08);
}

.user-account-tour .material-icons {
  font-size: 1.125rem !important;
  opacity: 0.95;
}

.user-account-logout {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: rgb(248 250 252);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.user-account-logout:hover {
  background: rgb(255 255 255 / 0.08);
}

.user-account-logout .material-icons {
  font-size: 1.125rem !important;
  opacity: 0.9;
}

/* Self-service profile editor */
.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  /* Above global floating assistants and portaled pickers. */
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgb(2 6 23 / 0.68);
  backdrop-filter: blur(8px);
  animation: profile-backdrop-in 160ms ease-out;
}

@keyframes profile-backdrop-in {
  from {
    opacity: 0;
  }
}

.profile-modal {
  width: min(100%, 38rem);
  max-height: min(92vh, 50rem);
  overflow: hidden;
  border: 1px solid rgb(203 213 225 / 0.75);
  border-radius: 1.25rem;
  background: #fff;
  color: rgb(15 23 42);
  box-shadow: 0 28px 80px rgb(2 6 23 / 0.35), 0 2px 8px rgb(2 6 23 / 0.12);
  animation: profile-modal-in 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes profile-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.profile-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.5rem 1.15rem;
  border-bottom: 1px solid rgb(226 232 240);
  background: linear-gradient(145deg, rgb(248 250 252), #fff 70%);
}

.profile-modal-heading {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.profile-modal-heading-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.8rem;
  color: rgb(13 148 136);
  background: linear-gradient(145deg, rgb(204 251 241), rgb(240 253 250));
  box-shadow: inset 0 0 0 1px rgb(45 212 191 / 0.24);
}

.profile-modal-heading h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.profile-modal-heading p {
  margin: 0.2rem 0 0;
  color: rgb(100 116 139);
  font-size: 0.82rem;
}

.profile-modal-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  color: rgb(71 85 105);
  background: transparent;
  cursor: pointer;
}

.profile-modal-close:hover:not(:disabled) {
  color: rgb(15 23 42);
  background: rgb(226 232 240 / 0.75);
}

.profile-modal-body {
  display: flex;
  max-height: calc(min(92vh, 50rem) - 10rem);
  overflow-y: auto;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.4rem 1.5rem;
}

.profile-avatar-editor {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-avatar-preview {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 5.75rem;
  height: 5.75rem;
  border: 4px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, rgb(13 148 136), rgb(37 99 235));
  box-shadow: 0 0 0 1px rgb(203 213 225), 0 8px 24px rgb(15 23 42 / 0.14);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.profile-avatar-status {
  position: absolute;
  right: -0.15rem;
  bottom: 0.1rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: rgb(15 118 110);
  font-size: 0.9rem !important;
  box-shadow: 0 3px 8px rgb(15 23 42 / 0.2);
}

.profile-avatar-copy {
  min-width: 0;
}

.profile-avatar-copy > strong {
  font-size: 0.95rem;
}

.profile-avatar-copy > p {
  margin: 0.2rem 0 0.65rem;
  color: rgb(100 116 139);
  font-size: 0.78rem;
}

.profile-avatar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.profile-avatar-change,
.profile-avatar-remove {
  min-height: 2.2rem;
  border-radius: 0.55rem;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.profile-avatar-change {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgb(13 148 136 / 0.4);
  color: rgb(15 118 110);
  background: rgb(240 253 250);
}

.profile-avatar-change:hover {
  background: rgb(204 251 241);
}

.profile-avatar-change .material-icons {
  font-size: 1rem !important;
}

.profile-avatar-remove {
  border: 1px solid transparent;
  color: rgb(190 24 93);
  background: transparent;
}

.profile-avatar-remove:hover {
  background: rgb(253 242 248);
}

.profile-dropzone {
  display: flex;
  min-height: 6.4rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.25rem;
  border: 1.5px dashed rgb(148 163 184);
  border-radius: 0.85rem;
  color: rgb(71 85 105);
  background: rgb(248 250 252);
  cursor: pointer;
  transition: 150ms ease;
}

.profile-dropzone:hover,
.profile-dropzone--dragging {
  border-color: rgb(13 148 136);
  color: rgb(15 118 110);
  background: rgb(240 253 250);
  transform: translateY(-1px);
}

.profile-dropzone > .material-icons {
  color: rgb(13 148 136);
  font-size: 1.5rem !important;
}

.profile-dropzone span:not(.material-icons) {
  font-size: 0.8rem;
}

.profile-dropzone small {
  color: rgb(100 116 139);
  font-size: 0.7rem;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.profile-field > span {
  color: rgb(51 65 85);
  font-size: 0.78rem;
  font-weight: 650;
}

.profile-field > small {
  color: rgb(100 116 139);
  font-size: 0.7rem;
}

.profile-input-wrap {
  display: flex;
  align-items: center;
  min-height: 2.8rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.7rem;
  padding: 0 0.75rem;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  transition: 150ms ease;
}

.profile-input-wrap:focus-within {
  border-color: rgb(13 148 136);
  box-shadow: 0 0 0 3px rgb(20 184 166 / 0.12);
}

.profile-input-wrap > .material-icons {
  flex: 0 0 auto;
  color: rgb(148 163 184);
  font-size: 1.1rem !important;
}

.profile-input-wrap input {
  min-width: 0;
  width: 100%;
  border: none;
  outline: none;
  padding: 0.65rem 0.6rem;
  color: rgb(15 23 42);
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
}

.profile-field--readonly .profile-input-wrap {
  background: rgb(248 250 252);
}

.profile-field--readonly input {
  color: rgb(100 116 139);
  cursor: not-allowed;
}

.profile-verified {
  color: rgb(13 148 136) !important;
}

.profile-modal-error {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgb(254 202 202);
  border-radius: 0.65rem;
  color: rgb(185 28 28);
  background: rgb(254 242 242);
  font-size: 0.78rem;
}

.profile-modal-error .material-icons {
  font-size: 1.1rem !important;
}

.profile-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgb(226 232 240);
  background: rgb(248 250 252 / 0.8);
}

.profile-privacy-note {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: rgb(100 116 139);
  font-size: 0.68rem;
}

.profile-privacy-note .material-icons {
  color: rgb(13 148 136);
  font-size: 0.9rem !important;
}

.profile-modal-footer > div {
  display: flex;
  gap: 0.55rem;
}

.profile-modal-cancel,
.profile-modal-save {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.65rem;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.profile-modal-cancel {
  border: 1px solid rgb(203 213 225);
  color: rgb(51 65 85);
  background: #fff;
}

.profile-modal-save {
  border: 1px solid rgb(13 148 136);
  color: #fff;
  background: linear-gradient(135deg, rgb(13 148 136), rgb(15 118 110));
  box-shadow: 0 5px 14px rgb(13 148 136 / 0.25);
}

.profile-modal-save:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgb(13 148 136 / 0.3);
}

.profile-modal-cancel:disabled,
.profile-modal-save:disabled,
.profile-modal-close:disabled {
  opacity: 0.6;
  cursor: wait;
}

.profile-modal-save .material-icons {
  font-size: 1rem !important;
}

.profile-save-spinner {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgb(255 255 255 / 0.45);
  border-top-color: #fff;
  border-radius: 999px;
  animation: profile-spin 650ms linear infinite;
}

@keyframes profile-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .profile-modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .profile-modal {
    width: 100%;
    max-height: 94vh;
    border-width: 1px 0 0;
    border-radius: 1.25rem 1.25rem 0 0;
  }

  .profile-modal-header,
  .profile-modal-body,
  .profile-modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .profile-modal-body {
    max-height: calc(94vh - 10rem);
  }

  .profile-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-privacy-note {
    justify-content: center;
  }

  .profile-modal-footer > div,
  .profile-modal-footer button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-modal-backdrop,
  .profile-modal {
    animation: none;
  }
}

.app-nav-loading {
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-nav-loading-line {
  height: 0.65rem;
  border-radius: 0.25rem;
  background: rgb(228 231 236);
  animation: user-skel 1s ease-in-out infinite alternate;
}

.app-nav-loading-line--short {
  width: 66%;
}

/* Admin — usuários e matriz */
.admin-users-header {
  margin-bottom: 1rem;
}

.admin-users-lede {
  max-width: 42rem;
}

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding: 0.2rem;
  border-radius: 0.5rem;
  background: rgb(241 245 249);
  width: fit-content;
}

.admin-tab {
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(71 85 105);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-tab:hover {
  color: rgb(15 23 42);
}

.admin-tab--active {
  background: #fff;
  color: rgb(0 43 73);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
}

.admin-alert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.admin-alert--error {
  background: rgb(254 242 242);
  border: 1px solid rgb(252 165 165);
  color: rgb(127 29 29);
}

.admin-card {
  background: #fff;
  border: 1px solid rgb(228 231 236);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.04);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgb(241 245 249);
}

.admin-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgb(100 116 139);
}

.admin-table-mono {
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
  color: rgb(51 65 85);
}

.admin-invite-section {
  margin-bottom: 1.25rem;
}

.admin-invite-hint {
  font-size: 0.875rem;
  color: rgb(100 116 139);
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.admin-invite-hint code {
  font-size: 0.8125rem;
}

.admin-invite-heading {
  margin-bottom: 0.75rem;
}

.admin-invite-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.admin-invite-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 12rem;
}

.admin-invite-field label {
  font-size: 0.8rem;
  color: rgb(100 116 139);
  font-weight: 500;
}

.admin-invite-field input,
.admin-invite-field select {
  padding: 0.45rem 0.6rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.375rem;
  font: inherit;
}

.admin-inline-field {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.admin-inline-field input {
  min-width: 8rem;
  max-width: 16rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.375rem;
  font: inherit;
  font-size: 0.875rem;
}

.admin-btn-small {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: 0.375rem;
  border: 1px solid rgb(203 213 225);
  background: #fff;
  color: rgb(30 41 59);
}

.admin-btn-small:hover:not(:disabled) {
  background: rgb(248 250 252);
}

.admin-btn-danger {
  color: rgb(220 38 38);
  border-color: rgb(252 165 165);
}

.admin-btn-danger:hover:not(:disabled) {
  background: rgb(254 242 242);
}

.admin-select {
  min-width: 11rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid rgb(203 213 225);
  font-size: 0.875rem;
  background: #fff;
}

.admin-matrix {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-matrix-card {
  padding: 1.25rem;
}

.admin-matrix-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-matrix-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgb(15 23 42);
}

.admin-matrix-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

@media (min-width: 720px) {
  .admin-matrix-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-matrix-label {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.65rem;
  row-gap: 0.1rem;
  align-items: start;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(241 245 249);
  cursor: pointer;
}

.admin-matrix-label:hover {
  background: rgb(248 250 252);
}

.admin-matrix-label input[type="checkbox"] {
  grid-row: span 2;
  margin-top: 0.2rem;
}

.admin-matrix-key {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: rgb(37 99 235);
  font-weight: 600;
}

.admin-matrix-desc {
  font-size: 0.8125rem;
  color: rgb(51 65 85);
  grid-column: 2;
}

.admin-matrix-cat {
  grid-column: 2;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(148 163 184);
}

.admin-page-loading,
.admin-page-denied {
  padding: 2rem;
  text-align: center;
  color: rgb(71 85 105);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

@keyframes um-spin {
  to {
    transform: rotate(360deg);
  }
}
.um-spin {
  animation: um-spin 1s linear infinite;
  display: inline-block;
}

/* ── Toast ─────────────────────────────────────────────────────────────────── */
.um-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.125rem;
  border-radius: 0.625rem;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.14);
  animation: um-toast-in 0.2s ease;
  max-width: 22rem;
}
@keyframes um-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.um-toast--success {
  background: #002b49;
  color: #fff;
  border: 1px solid rgb(0 182 214 / 0.35);
}
.um-toast--error {
  background: rgb(254 242 242);
  color: rgb(185 28 28);
  border: 1px solid rgb(252 165 165);
}
.um-toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ── Tabs (icon variant) ────────────────────────────────────────────────────── */
.admin-tab-icon {
  font-size: 1rem;
  vertical-align: middle;
  margin-right: 0.3rem;
}

/* ── Invite card ────────────────────────────────────────────────────────────── */
.um-invite-card {
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--brand-primary);
}
.um-invite-card-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.um-invite-card-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgb(0 191 154 / 0.1);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.um-invite-card-icon .material-icons {
  font-size: 1.25rem;
}
.um-invite-title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.um-invite-subtitle {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.um-invite-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  align-items: flex-end;
}
.um-invite-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0;
}
.um-invite-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.um-invite-btn .material-icons {
  font-size: 1rem;
}

/* ── Form primitives ────────────────────────────────────────────────────────── */
.um-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 13rem;
  flex: 1 1 13rem;
}
.um-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.um-required {
  color: var(--error-color);
}
.um-input {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.um-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgb(0 191 154 / 0.15);
}
.um-input--error {
  border-color: var(--error-color);
}
.um-input--sm {
  padding: 0.35rem 0.55rem;
  font-size: 0.8125rem;
}
.um-select {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: #fff;
  width: 100%;
}
.um-select--sm {
  padding: 0.3rem 0.5rem;
  font-size: 0.8125rem;
}
.um-field-error {
  font-size: 0.78rem;
  color: var(--error-color);
}

/* ── Users table card ───────────────────────────────────────────────────────── */
.um-users-card {
  padding: 0;
  overflow: hidden;
}
.um-users-card-head {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
}
.um-section-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.um-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  background: rgb(0 43 73 / 0.08);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-dark);
}
.um-empty {
  padding: 2.5rem;
  text-align: center;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.um-empty .material-icons {
  font-size: 2rem;
  opacity: 0.35;
}

/* ── Table ──────────────────────────────────────────────────────────────────── */
.um-table th {
  background: rgb(248 250 252);
}
.um-row:hover {
  background: rgb(248 250 252);
}
.um-th-actions,
.um-td-actions {
  width: 3rem;
  text-align: center;
}

/* ── User cell ──────────────────────────────────────────────────────────────── */
.um-user-cell {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.um-avatar {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-light));
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.03em;
}
.um-inline-edit {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Role cell ──────────────────────────────────────────────────────────────── */
.um-role-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.role-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge--admin {
  background: rgb(0 43 73 / 0.1);
  color: var(--brand-dark);
}
.badge--pm {
  background: rgb(0 191 154 / 0.12);
  color: #047857;
}
.badge--finance {
  background: rgb(245 158 11 / 0.12);
  color: #92400e;
}
.badge--default {
  background: rgb(100 116 139 / 0.1);
  color: var(--text-secondary);
}

/* ── Icon buttons ───────────────────────────────────────────────────────────── */
.um-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  flex-shrink: 0;
}
.um-icon-btn .material-icons {
  font-size: 1rem;
}
.um-icon-btn:hover:not(:disabled) {
  background: rgb(0 191 154 / 0.08);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
.um-icon-btn--danger:hover:not(:disabled) {
  background: rgb(239 68 68 / 0.08);
  border-color: rgb(239 68 68);
  color: rgb(220 38 38);
}
.um-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Permission groups ──────────────────────────────────────────────────────── */
.um-perm-group {
  margin-top: 1rem;
}
.um-perm-group-label {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.app-header-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: min(100%, 20rem);
}

.app-header-auth--muted {
  font-size: 0.875rem;
  color: rgb(203 213 225);
}

.app-header-auth-user {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgb(226 232 240);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}

@media (min-width: 640px) {
  .app-header-auth-user {
    max-width: 16rem;
  }
}

.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;
}

.app-header-auth-spinner {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border: 2px solid rgb(255 255 255 / 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

.auth-callback-shell {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(160deg, rgb(15 23 42) 0%, rgb(0 43 73) 100%);
  color: #fff;
}

.auth-callback-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2.5rem 2rem;
  border-radius: 0.75rem;
  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);
  min-width: 18rem;
}

.auth-callback-mark {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.auth-callback-message {
  margin: 0;
  font-size: 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: rgb(203 213 225);
}

.auth-callback-message--error {
  color: rgb(252 165 165);
}

.auth-callback-hint {
  margin: 0;
  max-width: 22rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
  color: rgb(148 163 184);
}

.auth-callback-confirm {
  appearance: none;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--brand-light);
  color: rgb(15 23 42);
}

.auth-callback-confirm:hover {
  filter: brightness(1.08);
}

.auth-callback-retry {
  font-size: 0.875rem;
  color: var(--brand-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-callback-retry:hover {
  color: #fff;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-callback-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgb(255 255 255 / 0.25);
  border-top-color: var(--brand-light);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

.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: 22rem;
  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;
  filter: brightness(0) invert(1);
}

.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-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-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-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.25rem;
}

.login-email-forgot {
  background: none;
  border: none;
  color: rgb(125 211 252);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-email-forgot:hover {
  color: rgb(186 230 253);
}

.login-email-forgot:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-email-back {
  background: none;
  border: none;
  color: rgb(148 163 184);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.25rem;
  text-decoration: underline;
}

.org-team-pill--readonly {
  background: rgb(234 179 8 / 0.15);
  color: rgb(161 98 7);
}

.org-team-pill--email {
  background: rgb(14 165 233 / 0.12);
  color: rgb(3 105 161);
}

.org-team-edit-access {
  padding: 0.35rem;
  min-width: 2rem;
}

.app-header-data-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.12);
  color: rgb(226 232 240);
  transition: background 0.15s ease;
}

.app-header-data-pill:hover {
  background: rgb(255 255 255 / 0.2);
}

.app-header-data-pill-icon {
  font-size: 1.125rem !important;
  opacity: 0.95;
}

/* ── Help menu ────────────────────────────────────────────────────────────── */
.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;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  border: 1px solid rgb(255 255 255 / 0.1);
  flex-shrink: 0;
}

.help-menu-trigger::-webkit-details-marker {
  display: none;
}

.help-menu-trigger:hover {
  background: rgb(255 255 255 / 0.18);
  border-color: rgb(255 255 255 / 0.14);
  color: #fff;
}

.help-menu[open] .help-menu-trigger {
  background: rgb(255 255 255 / 0.2);
  color: #fff;
}

.help-menu-icon {
  font-size: 1.2rem !important;
}

.help-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  width: 17rem;
  padding: 0.5rem;
  border-radius: 0.625rem;
  background: rgb(15 23 42);
  border: 1px solid rgb(51 65 85);
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.5), 0 2px 8px rgb(0 0 0 / 0.25);
  z-index: 60;
}

.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;
  transition: background 0.12s ease;
}

.help-menu-item:hover {
  background: rgb(255 255 255 / 0.07);
  color: #fff;
}

.help-menu-item--primary {
  color: rgb(110 231 183);
}

.help-menu-item--primary:hover {
  background: rgb(0 191 154 / 0.12);
  color: rgb(110 231 183);
}

.help-menu-item .material-icons {
  font-size: 1.2rem !important;
  flex-shrink: 0;
  opacity: 0.9;
}

.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;
  line-height: 1.25;
}

.help-menu-item-sub {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.7;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.help-menu-divider {
  height: 1px;
  margin: 0.4rem 0.5rem;
  background: rgb(51 65 85);
}

.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);
  opacity: 0.8;
}

.help-menu-status-text {
  font-size: 0.75rem;
  color: rgb(100 116 139);
}

.app-header-meta {
  display: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(226 232 240);
}

@media (min-width: 640px) {
  .app-header-meta {
    display: block;
    max-width: 14rem;
    text-align: right;
  }
}

.app-below-header {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding-top: var(--app-header-offset);
  position: relative;
  overflow: hidden;
}

.app-nav-backdrop {
  display: none;
  position: fixed;
  top: var(--app-header-offset);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgb(0 0 0 / 0.5);
  cursor: pointer;
}

@media (max-width: 1023px) {
  #app-nav-toggle:checked ~ .app-below-header .app-nav-backdrop {
    display: block;
  }
}

/* Sidebar — column height follows shell (main scrolls separately; nav scrolls inside if needed) */
.app-sidebar {
  flex-shrink: 0;
  width: 14.5rem;
  align-self: stretch;
  min-height: 0;
  background: rgb(252 252 253);
  border-right: 1px solid rgb(228 231 236);
}

.app-sidebar-inner {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  padding: 0.85rem 0.7rem 1rem;
  padding-left: max(0.7rem, env(safe-area-inset-left, 0px));
  overflow: hidden;
}

@media (min-width: 640px) {
  .app-sidebar-inner {
    padding: 1rem 0.75rem 1.15rem;
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
  }
}

.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: rgb(156 163 175 / 0.5);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: rgb(107 114 128 / 0.8);
}

.app-sidebar-drawer-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.app-sidebar-drawer-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.app-sidebar-drawer-close {
  display: flex;
  padding: 0.25rem;
  color: rgb(107 114 128);
  cursor: pointer;
  border-radius: 0.25rem;
}

.app-sidebar-drawer-close:hover {
  color: var(--text-primary);
}

@media (max-width: 1023px) {
  .app-sidebar {
    position: fixed;
    top: var(--app-header-offset);
    left: 0;
    z-index: 50;
    width: min(16.5rem, 100vw - 1.5rem);
    max-width: 90vw;
    height: calc(
      100dvh - var(--app-header-bar) - env(safe-area-inset-top, 0px)
    );
    max-height: calc(
      100dvh - var(--app-header-bar) - env(safe-area-inset-top, 0px)
    );
    align-self: auto;
    box-shadow:
      0 20px 25px -5px rgb(0 0 0 / 0.1),
      0 8px 10px -6px rgb(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);
  }

  .app-sidebar-inner {
    position: relative;
    top: 0;
    height: 100%;
    max-height: 100%;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  }

  .app-sidebar-drawer-head {
    display: flex;
  }

  .app-below-header {
    flex: 1;
    min-width: 0;
  }
}

@media (min-width: 1024px) {
  .app-sidebar {
    transform: none !important;
    height: auto;
    max-height: none;
  }
}

/* Collapse the global sidebar on desktop too — every route's chrome gets
   this menu toggle now, not only the Kanban board. */
@media (min-width: 1024px) {
  .app-sidebar {
    transition:
      width 0.24s ease,
      min-width 0.24s ease,
      opacity 0.2s ease,
      border-color 0.24s ease;
  }

  #app-nav-toggle:checked ~ .app-below-header .app-sidebar {
    width: 0;
    min-width: 0;
    overflow: hidden;
    opacity: 0;
    border-right-width: 0;
    pointer-events: none;
  }

  .app-sidebar-edge-reveal {
    display: none;
    position: absolute;
    left: 0;
    top: 50%;
    z-index: 40;
    transform: translateY(-50%);
    width: 28px;
    height: 56px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-left: none;
    border-radius: 0 10px 10px 0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    box-shadow: 0 2px 12px rgb(15 23 42 / 0.12);
  }

  .app-sidebar-edge-reveal:hover {
    background: #eef2ff;
    color: #4338ca;
  }

  #app-nav-toggle:checked ~ .app-below-header .app-sidebar-edge-reveal {
    display: inline-flex;
  }
}

.app-sidebar-product {
  margin: 0 0 1rem;
  padding-left: 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

@media (max-width: 1023px) {
  .app-sidebar-product {
    margin-top: 0;
  }
}

.app-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: auto;
  padding-right: 0;
}

.app-sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.app-sidebar-nav::-webkit-scrollbar-thumb {
  background-color: rgb(148 163 184 / 0.55);
  border-radius: 99px;
}

.app-sidebar-nav::-webkit-scrollbar-thumb:hover {
  background-color: rgb(100 116 139 / 0.75);
}

/*
 * Navegação por seções (referência: dashboards SaaS — seção + links,
 * sem acordeão: hierarquia por tipografia e espaçamento).
 */
.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;
}

.app-nav-section-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* Collapsible section header (rendered as a button). */
.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-toggle:focus-visible {
  outline: 2px solid rgb(96 165 250);
  outline-offset: 1px;
}

.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-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  margin: 0;
  border-radius: 0.45rem;
  text-decoration: none;
  color: rgb(51 65 85);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  border: 1px solid transparent;
  transition:
    background 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

@media (max-width: 1023px) {
  .app-nav-link {
    min-height: 2.625rem;
  }
}

.app-nav-link:hover {
  background: rgb(255 255 255);
  border-color: rgb(226 232 240);
  color: rgb(15 23 42);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.app-nav-link:focus-visible {
  outline: 2px solid rgb(0 182 214 / 0.45);
  outline-offset: 1px;
}

.app-nav-link--active {
  background: rgb(255 255 255);
  border-color: rgb(0 191 154 / 0.35);
  color: var(--brand-dark);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgb(0 191 154 / 0.12), 0 1px 3px rgb(0 43 73 / 0.06);
}

.app-nav-link-icon {
  font-size: 1.125rem !important;
  flex-shrink: 0;
  color: rgb(148 163 184);
  transition: color 0.12s ease;
}

.app-nav-link:hover .app-nav-link-icon {
  color: rgb(100 116 139);
}

.app-nav-link--active .app-nav-link-icon {
  color: var(--brand-primary);
}

.app-nav-link-label {
  min-width: 0;
  flex: 1;
}

.app-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.app-nav-group--active .app-nav-group-head {
  color: var(--brand-dark);
  font-weight: 600;
}

.app-nav-group--active .app-nav-group-head .app-nav-link-icon {
  color: var(--brand-primary);
}

.app-nav-group-head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.45rem 0.625rem 0.2rem;
  color: rgb(71 85 105);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.app-nav-group-label {
  min-width: 0;
  flex: 1;
}

.app-nav-sublist {
  list-style: none;
  margin: 0;
  padding: 0 0 0.15rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  border-left: 2px solid rgb(226 232 240);
  margin-left: 1.15rem;
}

.app-nav-link--sub {
  padding: 0.42rem 0.55rem;
  font-size: 0.78rem;
}

.app-sidebar-link {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  text-decoration: none;
  color: rgb(55 65 81);
  border: 2px solid transparent;
  border-right: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Drawer / narrow screens: comfortable tap targets (mobile-first touch) */
@media (max-width: 1023px) {
  .app-sidebar-link {
    align-items: center;
    min-height: 2.75rem;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
  }
}

.app-sidebar-link:hover {
  background: rgb(249 250 251);
  color: rgb(17 24 39);
}

.app-sidebar-link--active {
  background: var(--liberty-nav-active);
  color: rgb(29 78 216);
  border-right-color: rgb(29 78 216);
}

.app-sidebar-link-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: rgb(100 116 139);
}

.app-sidebar-link--active .app-sidebar-link-icon {
  color: rgb(29 78 216);
}

.app-sidebar-link-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.1rem;
}

.app-sidebar-link-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.app-sidebar-link--active .app-sidebar-link-label {
  font-weight: 600;
}

.app-sidebar-link-desc {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--liberty-text-muted);
}

.app-sidebar-link--active .app-sidebar-link-desc {
  color: rgb(29 78 216 / 0.85);
}

.app-sidebar-footer {
  flex-shrink: 0;
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--liberty-sidebar-border);
}

.app-sidebar-footnote {
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgb(107 114 128);
}

.app-sidebar-copyright {
  margin-top: 0.25rem;
}

.app-main-wrap {
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: rgb(249 250 251);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  padding-right: env(safe-area-inset-right, 0);
}

/*
 * Page shells — mobile-first spacing.
 * Use `page-shell page-shell--fluid` on every main screen (Cockpit, Config, Relatórios,
 * Capacidade, Novo quadro, Financeiro) so content uses the full main column with the same
 * horizontal padding (`clamp`) on large viewports.
 */
.page-shell {
  flex: 1;
  min-width: 0;
  padding: 1rem var(--ds-page-pad-x, 1rem) 1.5rem;
  max-width: none;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .page-shell {
    padding: 1.25rem var(--ds-page-pad-x, 1.25rem) 2rem;
  }
}

/** @deprecated Prefer `page-shell--fluid` so all main screens match Cockpit / Config width. */
.page-shell--config {
  max-width: 960px;
}

.config-page-lede {
  max-width: 48rem;
}

.config-inline-code {
  font-size: 0.88em;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: var(--liberty-surface-warm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.board-sync-api-line {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--liberty-radius-sm);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.board-sync-api-line--ok {
  border: 1px solid rgb(167 243 208);
  background: rgb(240 253 244);
  color: rgb(20 83 45);
}

.board-sync-api-line--bad {
  border: 1px solid rgb(254 202 202);
  background: rgb(254 242 242);
  color: rgb(127 29 29);
}

.board-sync-api-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.board-sync-help {
  margin: 1.25rem 0 0;
  padding: 0.65rem 0.9rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: rgb(248 250 252);
}

.board-sync-help summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--liberty-accent-deep);
}

.board-sync-help-lede {
  margin: 0.65rem 0 0.45rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--liberty-text-muted);
}

.board-sync-help-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--liberty-text);
}

/** @deprecated Prefer `page-shell--fluid` for the same usable width as Cockpit on large viewports. */
.page-shell--wide {
  max-width: 1400px;
}

/** Cockpit / wide dashboards: use full main column width (no arbitrary max-width cap). */
.page-shell--fluid {
  display: flex;
  flex-direction: column;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  padding-left: clamp(1rem, 2.5vw, 2rem);
  padding-right: clamp(1rem, 2.5vw, 2rem);
}

.config-page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-header {
  margin-bottom: 1.25rem;
}

.page-title {
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--liberty-text);
}

@media (min-width: 640px) {
  .page-title {
    font-size: 1.5rem;
    line-height: 1.2;
  }
}

.page-lede {
  margin-top: 0.4rem;
  max-width: 40rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--liberty-text-muted);
}

.report-inline-link {
  color: var(--liberty-accent-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgb(110 176 204 / 0.45);
}

.report-inline-link:hover {
  color: var(--liberty-accent-dark);
  border-bottom-color: var(--liberty-accent-dark);
}

/* Quadros sincronizados (island) */
.board-sync {
  margin-bottom: 1.25rem;
  border-radius: var(--liberty-radius);
  border: 1px solid var(--liberty-border);
  background: var(--liberty-bg);
  box-shadow: var(--liberty-shadow);
  overflow: hidden;
}

.board-sync-toggle {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border: none;
  background: linear-gradient(
    180deg,
    rgb(110 176 204 / 0.08) 0%,
    var(--liberty-bg) 100%
  );
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.board-sync-toggle-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--liberty-text);
}

.board-sync-toggle-hint {
  font-size: 0.8125rem;
  color: var(--liberty-text-muted);
}

.board-sync-panel {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--liberty-border);
}

.board-sync-lede {
  margin: 0.85rem 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--liberty-text-muted);
  max-width: 52rem;
}

.board-sync-muted {
  font-size: 0.875rem;
  color: var(--liberty-text-muted);
}

.board-sync-alert {
  margin: 0.5rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.875rem;
}

.board-sync-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.board-sync-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  align-items: start;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--liberty-border);
  font-size: 0.875rem;
}

.board-sync-row-body {
  min-width: 0;
}

.board-sync-row:last-child {
  border-bottom: none;
}

.board-sync-row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}

.board-sync-name {
  color: var(--liberty-text);
  font-weight: 500;
}

.board-sync-id {
  font-size: 0.75rem;
  color: var(--liberty-text-muted);
  font-variant-numeric: tabular-nums;
}

.board-sync-status {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.board-sync-status--ok {
  background: rgb(110 176 204 / 0.25);
  color: var(--liberty-accent-dark);
}

.board-sync-status--warn {
  background: #fef3c7;
  color: #92400e;
}

.board-sync-status--err {
  background: #fee2e2;
  color: #991b1b;
}

.board-sync-status--pending {
  background: #f1f5f9;
  color: #64748b;
}

.board-sync-warnings {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  color: #92400e;
}

.board-sync-error-detail {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: #991b1b;
}

.board-sync-remove {
  border: 1px solid var(--liberty-border);
  border-radius: var(--liberty-radius-sm);
  background: var(--liberty-bg);
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  color: var(--liberty-text-muted);
}

.board-sync-remove:hover {
  border-color: #fecaca;
  color: #991b1b;
}

.board-sync-add {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.board-sync-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--liberty-text);
}

.board-sync-field input {
  min-width: 12rem;
  border: 1px solid var(--liberty-border);
  border-radius: var(--liberty-radius-sm);
  padding: 0.45rem 0.6rem;
  font-size: 0.875rem;
}

.board-sync-footnote {
  margin: 0;
  font-size: 0.75rem;
  color: var(--liberty-text-muted);
}

.board-sync-code {
  font-size: 0.7rem;
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  background: var(--liberty-surface);
}

/* Column mapping health (Configurações) */
.column-health {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--liberty-border);
}

.column-health-panel {
  max-width: 52rem;
}

.column-health-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--liberty-text);
}

.column-health-lede,
.column-health-persist {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--liberty-text-muted);
}

.column-health-code {
  font-size: 0.75rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: var(--liberty-surface-warm);
  color: var(--liberty-text);
}

.column-health-muted {
  font-size: 0.8125rem;
  color: var(--liberty-text-muted);
}

.column-health-alert {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--liberty-radius);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.column-health-alert-icon {
  font-size: 1.25rem !important;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.column-health-alert--critical {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
}

.column-health-alert--warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
}

.column-health-alert--ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.column-health-alert--err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.column-health-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.column-health-boards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.column-health-card {
  border-radius: var(--liberty-radius);
  border: 1px solid var(--liberty-border);
  padding: 1rem 1.1rem;
  background: var(--liberty-bg);
}

.column-health-card--ok {
  border-color: rgb(167 243 208 / 0.8);
}

.column-health-card--warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.column-health-card--err {
  border-color: #fecaca;
  background: #fef2f2;
}

.column-health-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.column-health-board-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--liberty-text);
}

.column-health-board-id {
  font-size: 0.75rem;
  color: var(--liberty-text-muted);
}

.column-health-source {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--liberty-text-muted);
}

.column-health-admin-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgb(0 182 214 / 0.12);
  font-size: 0.72rem;
  color: var(--brand-dark);
}

.column-health-resolve-err {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: #991b1b;
}

.column-health-issues-details {
  margin: 0 0 0.65rem;
}

.column-health-issues-details .column-health-issues {
  margin-top: 0.5rem;
}

.column-health-issues-summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.column-health-issues {
  margin: 0 0 0.65rem;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
}

.column-health-issue {
  margin-bottom: 0.35rem;
}

.column-health-issue--err {
  color: #7f1d1d;
}

.column-health-issue--warn {
  color: #92400e;
}

.column-health-issue-label {
  display: inline-block;
  min-width: 2.5rem;
  font-weight: 600;
  margin-right: 0.35rem;
}

.column-health-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.column-health-actions .btn-primary,
.column-health-actions .btn-secondary {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-primary {
  border: none;
  border-radius: var(--liberty-radius-sm);
  background: #1e293b;
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.btn-primary:hover {
  background: #0f172a;
  transform: translateY(-1px);
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -2px rgb(0 0 0 / 0.05);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  border: 1px solid var(--liberty-border);
  border-radius: var(--liberty-radius-sm);
  background: var(--liberty-bg);
  color: var(--liberty-text);
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--liberty-accent);
  color: var(--liberty-accent-dark);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.transition-colors {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.my-6 {
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
}
.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}
.mx-2 {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}
.my-4 {
  margin-bottom: 1rem;
  margin-top: 1rem;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-8 {
  padding-bottom: 2rem;
  padding-top: 2rem;
}
.bg-\[\#86efac\] {
  background-color: #86efac;
}
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.py-6 {
  padding-bottom: 1.5rem;
  padding-top: 1.5rem;
}
.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.py-1 {
  padding-bottom: 0.25rem;
  padding-top: 0.25rem;
}
.border-gray-500 {
  border-color: #6b7280;
}
.bg-white {
  background-color: #fff;
}
.flex {
  display: flex;
}
.gap-8 {
  grid-gap: 2rem;
  gap: 2rem;
}
.font-bold {
  font-weight: 700;
}
.max-w-screen-md {
  max-width: 768px;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.border-2 {
  border-width: 2px;
}
.rounded {
  border-radius: 0.25rem;
}
.hover\:bg-gray-200:hover {
  background-color: #e5e7eb;
}
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* AG Grid — summary report header (Liberty accent) */
.hours-header-accent {
  background: var(--liberty-accent-dark) !important;
  color: white !important;
}

/* Relatórios padrão (AUO + planilha) */
.std-report {
  margin-bottom: 2rem;
  padding: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}
.std-report-header {
  margin-bottom: 1rem;
}
.std-report-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--liberty-text);
}
.std-report-meta {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: #475569;
}
.std-report-table-wrap {
  overflow-x: auto;
}
.std-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.std-report-table th,
.std-report-table td {
  border: 1px solid #cbd5e1;
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}
.std-report--auo .std-report-table thead th {
  background: var(--liberty-accent-dark);
  color: #fff;
  font-weight: 600;
}
.std-report--excel .std-report-table thead th {
  background: var(--liberty-accent-dark);
  color: #fff;
  font-weight: 600;
}
.std-report-num {
  text-align: right;
  white-space: nowrap;
}
.std-report-total-label {
  font-weight: 600;
  background: #f1f5f9;
}
.std-report-total {
  font-weight: 700;
}
.std-report-task-total {
  background: #e0f2fe;
}
.std-report-task-total td {
  font-weight: 500;
}
.std-report-sub-indent {
  width: 1.25rem;
  border-right: none !important;
  background: #fafafa;
}
.std-report-controle {
  font-weight: 500;
  color: #475569;
}
.std-report-muted {
  font-size: 0.8125rem;
  color: #64748b;
  font-style: italic;
}

.std-report--consultant .std-report-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.std-report-meta-note {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}
.std-report-consultant-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.std-report-consultant-block {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid rgb(110 176 204 / 0.35);
  background: linear-gradient(
    165deg,
    #fff 0%,
    var(--liberty-teal-mist) 100%
  );
}
.std-report-consultant-name {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--liberty-accent-deep);
  letter-spacing: 0.01em;
}
.std-report--consultant .std-report-table--nested thead th {
  background: var(--liberty-accent-dark);
  color: #fff;
  font-weight: 600;
}
.std-report-grand-total-wrap {
  margin-top: 1rem;
}
.std-report-grand-total-wrap .std-report-table {
  max-width: 36rem;
  margin-left: auto;
}

.std-report-project-block {
  margin: 0 0 1rem;
}
.std-report-project-title {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--liberty-accent-deep);
  line-height: 1.35;
}
.std-report-table--zebra tbody tr:nth-child(even) {
  background: rgb(110 176 204 / 0.08);
}
.std-report-consultant-total-wrap {
  margin-top: 0.5rem;
}
.std-report-table--consultant-sum {
  max-width: 100%;
}

.report-field-static {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.report-static-value {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px dashed var(--liberty-border);
  background: var(--liberty-teal-mist);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--liberty-accent-deep);
  max-width: 22rem;
}

.report-board-pick {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--liberty-radius);
  border: 1px solid rgb(110 176 204 / 0.45);
  background: linear-gradient(
    165deg,
    #fff 0%,
    var(--liberty-teal-mist) 100%
  );
}
.report-board-pick-lede {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--liberty-text-muted);
}
.report-board-pick-list {
  margin: 0 0 0.65rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 14rem;
  overflow-y: auto;
}
.report-board-pick-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  cursor: pointer;
  color: var(--liberty-text);
}
.report-board-pick-item input {
  margin-top: 0.15rem;
  accent-color: var(--liberty-accent);
  flex-shrink: 0;
}
.report-board-pick-reset {
  border: 1px solid var(--liberty-border);
  border-radius: var(--liberty-radius-sm);
  background: var(--liberty-bg);
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--liberty-accent-deep);
  cursor: pointer;
}
.report-board-pick-reset:hover {
  border-color: var(--liberty-accent);
  background: var(--liberty-teal-mist);
}

/* Hours report shell */
.report-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  color: var(--liberty-text);
  background: transparent;
}
.report-header {
  border-bottom: 1px solid var(--liberty-border);
  background: var(--liberty-bg);
  padding: 1.25rem 0;
  box-shadow: var(--liberty-shadow);
}
.report-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--liberty-text);
}
.report-lede {
  margin-top: 0.35rem;
  max-width: 48rem;
  font-size: 0.875rem;
  color: var(--liberty-text-muted);
  line-height: 1.55;
}
.report-main {
  margin: 0;
  width: 100%;
  max-width: none;
  padding: 1.5rem 0;
}
.report-toolbar {
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--liberty-radius);
  border: 1px solid var(--liberty-border);
  background: var(--liberty-bg);
  box-shadow: var(--liberty-shadow);
}
.report-field-report-type select {
  min-width: min(100%, 22rem);
  max-width: 100%;
}
.report-toolbar-ws-err {
  flex: 1 1 12rem;
  align-self: center;
}
.report-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}
.report-field span {
  font-weight: 500;
  color: var(--liberty-text);
}
.report-field input,
.report-field select {
  border: 1px solid var(--liberty-border);
  border-radius: var(--liberty-radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--liberty-text);
}
.report-field-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
.report-field-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--liberty-accent);
}
.report-btn-primary {
  border: none;
  border-radius: var(--liberty-radius-sm);
  background: var(--liberty-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(110 176 204 / 0.35);
}
.report-btn-primary:hover {
  background: var(--liberty-accent-dark);
}
.report-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.report-toolbar-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}
.report-export {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}
.report-export-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--liberty-border);
  border-radius: var(--liberty-radius-sm);
  background: var(--surface-color);
  color: var(--liberty-text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}
.report-export-trigger:hover:not(:disabled) {
  border-color: rgb(0 43 73 / 0.22);
  color: var(--brand-dark);
  background: rgb(248 250 252);
}
.report-export-trigger:focus-visible {
  outline: 2px solid rgb(0 191 154 / 0.45);
  outline-offset: 2px;
}
.report-export-trigger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.report-export-trigger-label {
  letter-spacing: 0.01em;
}
.report-export-trigger[aria-expanded="true"] {
  border-color: rgb(0 43 73 / 0.28);
  color: var(--brand-dark);
  background: rgb(255 255 255);
  box-shadow: 0 1px 3px rgb(0 43 73 / 0.08);
}
.report-export-chevron {
  flex-shrink: 0;
  opacity: 0.85;
  transition: transform 0.18s ease;
}
.report-export-chevron--open {
  transform: rotate(180deg);
}
.report-export-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  right: 0;
  min-width: 12.5rem;
  padding: 0.25rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: var(--surface-color);
  box-shadow:
    0 4px 6px -1px rgb(15 23 42 / 0.07),
    0 10px 20px -8px rgb(0 43 73 / 0.12);
}
.report-export-menu-item {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.45rem 0.6rem;
  border: none;
  border-radius: calc(var(--liberty-radius-sm) - 2px);
  background: transparent;
  color: var(--liberty-text);
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}
.report-export-menu-item:hover {
  background: rgb(0 191 154 / 0.08);
}
.report-export-menu-item:focus-visible {
  outline: 2px solid rgb(0 191 154 / 0.45);
  outline-offset: 0;
}
.report-export-menu-item--pdf {
  margin-top: 1px;
  border-top: 1px solid var(--liberty-border);
  border-radius: 0 0 calc(var(--liberty-radius-sm) - 2px)
    calc(var(--liberty-radius-sm) - 2px);
  padding-top: 0.5rem;
}
.report-export-menu-title {
  font-weight: 600;
  color: var(--brand-dark);
}
.report-export-menu-meta {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--liberty-text-muted);
  line-height: 1.3;
}
.report-export-busy {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  white-space: nowrap;
  font-size: 0.6875rem;
  color: var(--liberty-text-muted);
}
.report-export-err {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  max-width: 14rem;
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--error-color);
  text-align: right;
}
.report-note--scope {
  margin-bottom: 0.75rem;
}
.report-note {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  border: 1px solid #fde68a;
  background: #fffbeb;
  font-size: 0.875rem;
  color: #78350f;
}
.report-dimensions {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.8125rem;
  color: #334155;
}
.report-dimensions-title {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  color: #0f172a;
}
.report-dimensions-lede {
  margin: 0 0 0.5rem;
  max-width: 42rem;
  line-height: 1.45;
  color: #64748b;
}
.report-dimension-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.report-dimension-list li {
  margin: 0;
}
.report-dimension-pill {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.75rem;
  color: #0f172a;
}
.text-gray-600 {
  color: #475569;
}
.rounded-lg {
  border-radius: 0.5rem;
}
.border-red-200 {
  border-color: #fecaca;
}
.bg-red-50 {
  background: #fef2f2;
}
.text-red-800 {
  color: #991b1b;
}
.text-sm {
  font-size: 0.875rem;
}
.mx-1 {
  margin-left: 0.25rem;
  margin-right: 0.25rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.rounded {
  border-radius: 0.25rem;
}
.border {
  border-width: 1px;
  border-style: solid;
}

.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;
}

/* Cockpit central */
.cockpit-page {
  color: var(--liberty-text);
}
.cockpit-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--liberty-radius);
  border: 1px solid rgb(110 176 204 / 0.35);
  background:
    radial-gradient(
      ellipse 120% 80% at 100% 0%,
      rgb(110 176 204 / 0.18),
      transparent 55%
    ),
    linear-gradient(145deg, #fff 0%, var(--liberty-teal-mist) 100%);
  box-shadow: var(--liberty-shadow-md);
}
.cockpit-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--liberty-accent-deep);
}
.cockpit-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--liberty-ink);
}
.cockpit-lede {
  margin: 0.5rem 0 0;
  max-width: 40rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--liberty-text-muted);
}
.cockpit-kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cockpit-kpi-pill {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgb(110 176 204 / 0.4);
  background: rgb(255 255 255 / 0.85);
  font-size: 0.78rem;
  color: var(--liberty-text-muted);
}
.cockpit-kpi-pill strong {
  color: var(--liberty-accent-deep);
  font-weight: 700;
}
.cockpit-kpi-pill--warn {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.cockpit-api-note {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px dashed var(--liberty-border);
  background: var(--liberty-surface-warm);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--liberty-text-muted);
}
.cockpit-toolbar {
  margin-bottom: 1rem;
}
.cockpit-search-input {
  width: 100%;
  max-width: 28rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  font-size: 0.875rem;
}
.cockpit-muted {
  font-size: 0.875rem;
  color: #64748b;
}
.cockpit-error {
  padding: 0.75rem 1rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.875rem;
}
.cockpit-section {
  margin-bottom: 2rem;
}
.cockpit-section-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--liberty-ink);
}
.cockpit-overview-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cockpit-overview-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: var(--liberty-bg);
}
.cockpit-overview-name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--liberty-text);
}
.cockpit-overview-meta {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}
.cockpit-workspace-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.cockpit-workspace {
  border-radius: var(--liberty-radius);
  border: 1px solid var(--liberty-border);
  background: var(--liberty-bg);
  overflow: hidden;
}
.cockpit-workspace-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.cockpit-workspace-summary::-webkit-details-marker {
  display: none;
}
.cockpit-workspace-name {
  font-size: 0.9rem;
  color: var(--liberty-ink);
}
.cockpit-workspace-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
}
.cockpit-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.65rem;
  padding: 0 1rem 1rem;
}
.cockpit-board-card {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  min-height: 7rem;
}
.cockpit-board-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.cockpit-board-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--liberty-text);
}
.cockpit-board-id {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
}
.cockpit-board-badges {
  margin-bottom: 0.35rem;
}
.cockpit-badge {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f1f5f9;
  color: #64748b;
}
.cockpit-badge--sync {
  background: rgb(110 176 204 / 0.25);
  color: var(--liberty-accent-deep);
}
.cockpit-board-drill {
  margin-top: auto;
  font-size: 0.72rem;
}
.cockpit-board-drill summary {
  cursor: pointer;
  color: var(--liberty-accent-dark);
  font-weight: 500;
}
.cockpit-board-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.4rem;
}
.cockpit-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.55rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-accent);
  background: var(--liberty-accent);
  color: #fff !important;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}
.cockpit-link-btn:hover {
  background: var(--liberty-accent-dark);
  border-color: var(--liberty-accent-dark);
}
.cockpit-link-btn--secondary {
  border-color: var(--liberty-border);
  background: #fff;
  color: var(--liberty-accent-deep) !important;
}
.cockpit-link-btn--secondary:hover {
  border-color: var(--liberty-accent);
  background: var(--liberty-teal-mist);
}

.cockpit-section--primary {
  margin-bottom: 2rem;
}
.cockpit-board-card--selected {
  border-color: var(--liberty-accent) !important;
  box-shadow: 0 0 0 1px rgb(110 176 204 / 0.45);
}
.cockpit-board-actions--inline {
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.cockpit-pick-board {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-accent);
  background: var(--liberty-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.cockpit-pick-board:hover {
  background: var(--liberty-accent-dark);
}
.cockpit-pick-board--active {
  background: var(--liberty-accent-deep);
  border-color: var(--liberty-accent-deep);
}

.cockpit-views-shell {
  padding: 1rem 1.1rem 1.25rem;
  border-radius: var(--liberty-radius);
  border: 1px solid rgb(110 176 204 / 0.4);
  background: linear-gradient(
    165deg,
    #f8fafc 0%,
    #fff 40%,
    var(--liberty-teal-mist) 100%
  );
}
.cockpit-views-head {
  margin-bottom: 0.75rem;
}
.cockpit-views-heading {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--liberty-ink);
}
.cockpit-views-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

.cockpit-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--liberty-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cockpit-view-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  min-width: 7rem;
  max-width: 14rem;
}
.cockpit-view-tab:hover {
  background: rgb(110 176 204 / 0.12);
}
.cockpit-view-tab--active {
  border-color: var(--liberty-accent);
  background: rgb(110 176 204 / 0.18);
}
.cockpit-view-tab-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--liberty-ink);
  line-height: 1.25;
}
.cockpit-view-tab-type {
  font-size: 0.62rem;
  color: #64748b;
  font-family: ui-monospace, monospace;
  word-break: break-all;
}

.cockpit-view-panel {
  min-height: 8rem;
}

.cockpit-dash-mirror {
  padding: 1rem;
  border-radius: var(--liberty-radius);
  background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0;
  border: 1px solid #334155;
}
.cockpit-dash-mirror-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}
.cockpit-dash-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}
.cockpit-dash-note {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #94a3b8;
}
.cockpit-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.65rem;
}
.cockpit-dash-widget {
  padding: 0.55rem 0.6rem;
  border-radius: 0.35rem;
  background: rgb(15 23 42 / 0.85);
  border: 1px solid #475569;
}
.cockpit-dash-widget-title {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #cbd5e1;
  line-height: 1.3;
}
.cockpit-dash-widget-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.cockpit-dash-chart-ph {
  height: 3.25rem;
  border-radius: 0.25rem;
  background: linear-gradient(
    90deg,
    rgb(110 176 204 / 0.35) 0%,
    rgb(110 176 204 / 0.08) 40%,
    rgb(251 191 36 / 0.25) 100%
  );
}
.cockpit-dash-widget-hint {
  font-size: 0.58rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cockpit-dash-meta {
  margin: 0.75rem 0 0;
  font-size: 0.68rem;
  color: #94a3b8;
}

.cockpit-plain-view {
  padding: 1rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: var(--liberty-bg);
}
.cockpit-plain-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--liberty-ink);
}
.cockpit-plain-type {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
}
.cockpit-plain-copy {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--liberty-text-muted);
}

.cockpit-api-note--tight {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* Painel de Gestão-Equipe (overview Monday) */
.cockpit-painel-section {
  margin-bottom: 2rem;
  padding: 1.1rem 1.15rem 1.25rem;
  border-radius: var(--liberty-radius);
  border: 2px solid rgb(110 176 204 / 0.55);
  background: linear-gradient(
    145deg,
    #fff 0%,
    rgb(232 244 248) 55%,
    var(--liberty-teal-mist) 100%
  );
  box-shadow: var(--liberty-shadow-md);
}
.cockpit-painel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}
.cockpit-painel-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--liberty-ink);
}
.cockpit-painel-sub {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--liberty-text-muted);
  max-width: 42rem;
}
.cockpit-painel-notes {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #64748b;
}
.cockpit-painel-notes li {
  margin-bottom: 0.25rem;
}
.cockpit-painel-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.75rem;
}
.cockpit-painel-card {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.9rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
.cockpit-painel-ws {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--liberty-accent-deep);
}
.cockpit-painel-board {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--liberty-text);
}
.cockpit-painel-id {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  color: #94a3b8;
}

/* Cockpit — dashboard-first layout */
.cockpit-hero--compact {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
}
.cockpit-hero--compact .cockpit-title {
  font-size: 1.35rem;
}
.cockpit-dashboard-toolbar {
  align-items: flex-end;
}
.cockpit-dashboard-toolbar--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}
.cockpit-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}
.cockpit-toolbar-row--search {
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--liberty-border);
}
.cockpit-dashboard-field-ws {
  flex: 1 1 12rem;
  min-width: min(100%, 11rem);
}
.cockpit-dashboard-field-ws select {
  min-width: min(100%, 22rem);
  max-width: 100%;
}
.cockpit-dashboard-field-painel {
  flex: 2 1 18rem;
  min-width: min(100%, 14rem);
}
.cockpit-dashboard-field-painel select {
  min-width: min(100%, 36rem);
  max-width: 100%;
}
.cockpit-dashboard-field-grow {
  flex: 1 1 14rem;
  min-width: min(100%, 12rem);
}
.cockpit-dashboard-field-grow .cockpit-search-input {
  max-width: none;
  width: 100%;
}
.cockpit-link-btn--toolbar {
  flex: 0 0 auto;
  align-self: flex-end;
  white-space: nowrap;
}
.cockpit-help-details {
  margin: 0 0 0.75rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: var(--liberty-bg);
  font-size: 0.78rem;
  color: var(--liberty-text-muted);
}
.cockpit-help-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--liberty-text);
  list-style-position: outside;
}
.cockpit-help-inner {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--liberty-border);
}
.cockpit-help-heading {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--liberty-text-muted);
}
.cockpit-help-list {
  margin: 0;
  padding-left: 1.1rem;
}
.cockpit-help-list li {
  margin: 0.2rem 0;
}
.cockpit-help-text {
  margin: 0.35rem 0 0;
  line-height: 1.45;
}
.cockpit-help-text:first-child {
  margin-top: 0;
}
.cockpit-dashboard-stage {
  margin-top: 0.5rem;
}
.cockpit-dash-context {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  color: var(--liberty-text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.cockpit-dash-board-ref {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--liberty-text);
}
.cockpit-dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.cockpit-badge--inline {
  margin-left: 0.15rem;
  vertical-align: middle;
}

/* Cockpit v2 — PM / capacity dashboards */
.cockpit-v2 {
  color: var(--liberty-text);
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cockpit-v2-loading {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: min(52vh, 32rem);
  margin: 0.25rem 0 1.5rem;
  padding: 2rem 1.5rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px dashed rgb(148 163 184 / 0.65);
  background: rgb(255 255 255 / 0.75);
  box-shadow: var(--liberty-shadow);
}

@keyframes cockpit-spin {
  to {
    transform: rotate(360deg);
  }
}
.cockpit-v2-spin {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  line-height: 1.25rem;
  transform-origin: center center;
  animation: cockpit-spin 1s linear infinite;
  color: var(--liberty-primary, #22789e);
  font-size: 1.25rem;
  vertical-align: middle;
}
.cockpit-v2-tile-spin {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1.5rem;
  transform-origin: center center;
  font-size: 1.5rem;
  margin: 0.5rem 0;
}
.cockpit-v2-hero {
  display: grid;
  grid-template-columns: minmax(0, min(46rem, 100%)) minmax(0, 1fr);
  align-items: start;
  gap: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--liberty-radius);
  border: 1px solid rgb(110 176 204 / 0.35);
  background:
    radial-gradient(
      ellipse 100% 80% at 100% 0%,
      rgb(110 176 204 / 0.14),
      transparent 50%
    ),
    linear-gradient(160deg, #fff 0%, var(--liberty-teal-mist) 100%);
  box-shadow: var(--liberty-shadow-md);
}

@media (max-width: 960px) {
  .cockpit-v2-hero {
    grid-template-columns: 1fr;
  }
}
.cockpit-v2-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--liberty-accent-deep);
}
.cockpit-v2-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--liberty-ink);
}
.cockpit-v2-lede {
  margin: 0.5rem 0 0;
  max-width: 46rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--liberty-text-muted);
}
.cockpit-v2-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-width: 0;
  padding: 0;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: rgb(255 255 255 / 0.92);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  overflow: hidden;
}
.cockpit-v2-toolbar-presets {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem 0.95rem 0.7rem;
  background: linear-gradient(
    180deg,
    rgb(110 176 204 / 0.07) 0%,
    rgb(255 255 255 / 0.65) 100%
  );
  border-bottom: 1px solid rgb(110 176 204 / 0.2);
}
.cockpit-v2-preset-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
}
.cockpit-v2-preset-group-label {
  flex: 0 0 auto;
  min-width: 4.75rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--liberty-accent-deep);
}
.cockpit-v2-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  flex: 1 1 12rem;
}
.cockpit-v2-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.78rem;
  min-height: 2rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--liberty-text);
  border-radius: 999px;
  border: 1px solid rgb(203 213 225 / 0.95);
  background: #fff;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.8) inset;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}
.cockpit-v2-chip:hover {
  border-color: rgb(110 176 204 / 0.65);
  background: var(--liberty-teal-mist);
  color: var(--liberty-ink);
}
.cockpit-v2-chip:focus {
  outline: none;
}
.cockpit-v2-chip:focus-visible {
  outline: 2px solid var(--liberty-accent);
  outline-offset: 2px;
}
.cockpit-v2-chip[aria-pressed="true"] {
  border-color: rgb(110 176 204 / 0.85);
  background: linear-gradient(
    165deg,
    rgb(110 176 204 / 0.22) 0%,
    rgb(110 176 204 / 0.1) 100%
  );
  color: var(--liberty-accent-deep);
  box-shadow:
    0 1px 2px rgb(61 122 144 / 0.12),
    0 1px 0 rgb(255 255 255 / 0.5) inset;
}
.cockpit-v2-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
}

/* Let filter fields use extra width on large screens instead of leaving a gap. */
.cockpit-v2-toolbar-controls .report-field {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: min(22rem, 100%);
}

.cockpit-v2-toolbar-controls .report-btn-primary {
  flex: 0 0 auto;
}
.cockpit-v2-muted {
  font-size: 0.875rem;
  color: #64748b;
}
.cockpit-v2-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.cockpit-v2-tile {
  padding: 1rem 1.1rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: #fff;
  box-shadow: var(--liberty-shadow);
}
.cockpit-v2-tile--accent {
  border-color: rgb(110 176 204 / 0.45);
  background: linear-gradient(145deg, #fff 0%, rgb(110 176 204 / 0.08) 100%);
}
.cockpit-v2-tile--warn {
  border-color: rgb(245 158 11 / 0.45);
  background: linear-gradient(145deg, #fff 0%, rgb(254 243 199 / 0.55) 100%);
}
.cockpit-v2-tile-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--liberty-text-muted);
}
.cockpit-v2-tile-value {
  margin: 0.35rem 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--liberty-accent-deep);
  letter-spacing: -0.02em;
}
.cockpit-v2-tile-hint {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}
.cockpit-v2-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 960px) {
  .cockpit-v2-charts {
    grid-template-columns: 1fr;
  }
}
.cockpit-v2-chart-card {
  padding: 0.75rem 1rem 1rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: #fff;
  box-shadow: var(--liberty-shadow);
}
.cockpit-v2-chart-card--wide {
  grid-column: 1 / -1;
}
.cockpit-v2-chart-wrap {
  position: relative;
  height: 280px;
}
.cockpit-v2-chart-wrap--tall {
  height: 320px;
}
.cockpit-v2-section {
  margin-bottom: 1.75rem;
}
.cockpit-v2-section-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--liberty-ink);
}
.cockpit-v2-table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.65rem;
}
.cockpit-v2-table-head .cockpit-v2-section-title {
  margin: 0;
  flex: 1 1 12rem;
}
.cockpit-v2-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  font-size: 0.78rem;
  color: var(--liberty-text-muted);
}
.cockpit-v2-pagination-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.cockpit-v2-pagination-select {
  padding: 0.25rem 1.5rem 0.25rem 0.45rem;
  font-size: 0.78rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: #fff;
  color: var(--liberty-text);
}
.cockpit-v2-pagination-meta {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cockpit-v2-pagination-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.cockpit-v2-pagination-pages {
  font-variant-numeric: tabular-nums;
  padding: 0 0.15rem;
  color: var(--liberty-text);
}
.cockpit-v2-pagination-btn {
  padding: 0.3rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: #fff;
  color: var(--liberty-accent-dark);
  cursor: pointer;
}
.cockpit-v2-pagination-btn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.cockpit-v2-pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.cockpit-v2-cards {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.85rem;
}
.cockpit-v2-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  min-height: 10rem;
}
.cockpit-v2-card-ws {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--liberty-accent-deep);
}
.cockpit-v2-card-name {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--liberty-text);
}
.cockpit-v2-card-hours {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--liberty-accent-deep);
}
.cockpit-v2-card-share {
  margin: 0.15rem 0 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
}
.cockpit-v2-card-bar {
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  margin-bottom: 0.65rem;
  overflow: hidden;
}
.cockpit-v2-card-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--p, 0%);
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    var(--liberty-accent),
    var(--liberty-accent-dark)
  );
}
.cockpit-v2-card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cockpit-v2-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--liberty-accent-dark);
  text-decoration: none;
}
.cockpit-v2-link:hover {
  text-decoration: underline;
}
.cockpit-v2-table-wrap {
  overflow-x: auto;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: #fff;
}
.cockpit-v2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.cockpit-v2-table th,
.cockpit-v2-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}
.cockpit-v2-table--align-top td {
  vertical-align: top;
}
.cockpit-v2-table th {
  font-weight: 600;
  background: #f8fafc;
  color: var(--liberty-ink);
}
.cockpit-v2-n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cockpit-v2-warnings {
  margin: 1rem 0;
  padding: 0.5rem 0.75rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: var(--liberty-bg);
  font-size: 0.8125rem;
  color: var(--liberty-text-muted);
}
.cockpit-v2-warnings summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--liberty-text);
}
.cockpit-v2-warnings ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}
.cockpit-v2-note {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px dashed var(--liberty-border);
  background: var(--liberty-surface-warm);
  font-size: 0.78rem;
  color: var(--liberty-text-muted);
}

/* Accordion Section Styles */
.accordion-section {
  margin-bottom: 1.75rem;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1.1rem;
  margin-bottom: 0;
  border: 1px solid rgb(110 176 204 / 0.3);
  border-radius: var(--liberty-radius-sm);
  background: linear-gradient(145deg, #fff 0%, rgb(110 176 204 / 0.04) 100%);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.accordion-header:hover {
  border-color: rgb(110 176 204 / 0.5);
  background: linear-gradient(145deg, #fff 0%, rgb(110 176 204 / 0.08) 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.accordion-header:focus {
  outline: none;
}

.accordion-header:focus-visible {
  outline: 2px solid var(--liberty-accent);
  outline-offset: 2px;
}

.accordion-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--liberty-accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.accordion-icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  color: var(--liberty-accent);
  transition: transform 0.2s ease;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(0deg);
}

.accordion-header[aria-expanded="false"] .accordion-icon {
  transform: rotate(0deg);
}

.accordion-content {
  animation: accordion-slide-down 0.25s ease-out;
  padding-top: 1rem;
}

@keyframes accordion-slide-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Adjust spacing for accordion sections */
.accordion-section .cockpit-v2-kpi {
  margin-bottom: 0;
}

.accordion-section .cockpit-v2-charts {
  margin-bottom: 0;
}

.accordion-section .cockpit-v2-section {
  margin-bottom: 0;
}

.cockpit-v2-kpi-section .accordion-content {
  padding-top: 0.5rem;
}

/* Filter section accordion styling */
.cockpit-filters-section {
  margin-bottom: 1.5rem;
}

.cockpit-filters-section .accordion-header {
  background: linear-gradient(
    145deg,
    rgb(110 176 204 / 0.06) 0%,
    rgb(110 176 204 / 0.12) 100%
  );
  border-color: rgb(110 176 204 / 0.35);
}

.cockpit-filters-section .accordion-header:hover {
  background: linear-gradient(
    145deg,
    rgb(110 176 204 / 0.1) 0%,
    rgb(110 176 204 / 0.16) 100%
  );
  border-color: rgb(110 176 204 / 0.5);
}

.cockpit-filters-section .accordion-content {
  padding: 1.25rem;
  border: 1px solid rgb(110 176 204 / 0.2);
  border-top: none;
  border-radius: 0 0 var(--liberty-radius-sm) var(--liberty-radius-sm);
  background: linear-gradient(145deg, #fff 0%, rgb(110 176 204 / 0.02) 100%);
}

.cockpit-filters-section .cockpit-v2-toolbar {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.cockpit-filters-section .cockpit-v2-filters-row {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(110 176 204 / 0.15);
}

/* Visão financeira — extra controls (same tokens as Cockpit) */
.cockpit-v2-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: #fff;
  box-shadow: var(--liberty-shadow);
}
.cockpit-v2-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 10rem;
}
.cockpit-v2-filter-field--grow {
  flex: 1 1 16rem;
  min-width: min(100%, 14rem);
}
.cockpit-v2-filter-field label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--liberty-text-muted);
}
.cockpit-v2-select,
.cockpit-v2-search {
  border: 1px solid var(--liberty-border);
  border-radius: var(--liberty-radius-sm);
  padding: 0.5rem 0.65rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--liberty-text);
  background: #fff;
}
.cockpit-v2-search {
  width: 100%;
}
.cockpit-v2-cell-main {
  display: block;
  font-weight: 600;
  color: var(--liberty-text);
}
.cockpit-v2-cell-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--liberty-text-muted);
}
.cockpit-v2-n--muted {
  color: var(--liberty-text-muted);
}
.cockpit-v2-inline-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f1f5f9;
  color: #64748b;
}

/* Matriz planejado vs realizado */
.matrix-pr {
  margin-top: 1.25rem;
}
.matrix-pr-header {
  margin-bottom: 1rem;
}
.matrix-pr-heading {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--liberty-ink, #0f172a);
  line-height: 1.3;
}

@media (min-width: 640px) {
  .matrix-pr-heading {
    font-size: 1.25rem;
  }
}
.matrix-pr-meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--liberty-text-muted, #64748b);
  line-height: 1.5;
}
.matrix-pr-link {
  color: var(--liberty-accent, #0c4a6e);
  text-decoration: underline;
}
.matrix-pr-code {
  font-size: 0.8em;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.matrix-pr-warnings {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--liberty-radius-sm, 6px);
  border: 1px solid #fde68a;
  background: #fffbeb;
  font-size: 0.8125rem;
  color: #92400e;
}

.matrix-pr-mirror-hint {
  margin: 0.65rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #64748b;
}

.matrix-pr-kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  font-size: 0.75em;
  font-family: inherit;
  background: #f8fafc;
  color: #475569;
}

.matrix-pr-scroll {
  overflow-x: auto;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: var(--liberty-radius-sm, 6px);
  background: #fff;
}

.matrix-pr-scroll--unified {
  max-width: 100%;
}

.matrix-pr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.matrix-pr-table--unified {
  width: max-content;
  min-width: 100%;
}

.matrix-pr-table th,
.matrix-pr-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.matrix-pr-table thead th {
  background: #f8fafc;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.matrix-pr-section {
  padding: 0.5rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 2px solid #cbd5e1;
}

.matrix-pr-section--planned {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
}

.matrix-pr-section--realized {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
}

.matrix-pr-corner-head {
  vertical-align: middle;
  z-index: 3;
  min-width: 6.5rem;
  max-width: 10rem;
}

.matrix-pr-split {
  border-left: 2px solid #94a3b8;
}

.matrix-pr-mirror-cell {
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.matrix-pr-mirror-lit {
  background: rgb(254 249 195 / 0.95) !important;
  box-shadow: inset 0 0 0 1px #f59e0b;
}

.matrix-pr-mirror-pinned {
  background: rgb(254 240 138 / 0.98) !important;
  box-shadow: inset 0 0 0 2px #d97706;
}

.matrix-pr-sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 2px 0 4px rgba(15, 23, 42, 0.06);
  min-width: 6.5rem;
}

.matrix-pr-table thead .matrix-pr-sticky-col {
  background: #f8fafc;
  z-index: 2;
}

.matrix-pr-table thead .matrix-pr-corner-head {
  background: #f8fafc;
}
.matrix-pr-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.matrix-pr-total {
  font-weight: 600;
  background: #fafafa;
}
.matrix-pr-saldo-th {
  min-width: 10rem;
}

.matrix-pr-saldo-th--head {
  min-width: 8.5rem;
}
.matrix-pr-footer th,
.matrix-pr-footer td {
  background: #f1f5f9;
  font-weight: 600;
}

.matrix-pr-footer .matrix-pr-sticky-col {
  background: #f1f5f9;
}

.matrix-pr-capacity th,
.matrix-pr-capacity td {
  background: #ecfeff;
}

.matrix-pr-capacity .matrix-pr-sticky-col {
  background: #ecfeff;
}
.matrix-pr-saldo-cell {
  white-space: nowrap;
  max-width: 14rem;
}

.matrix-pr-saldo {
  display: inline;
  text-align: right;
  font-size: 0.78rem;
}

.matrix-pr-saldo-ref {
  display: inline;
  font-weight: 400;
  color: #64748b;
  font-size: 0.72rem;
  margin-left: 0.25rem;
}

@media (max-width: 639px) {
  .matrix-pr-saldo-cell {
    white-space: normal;
    max-width: none;
  }

  .matrix-pr-saldo-ref {
    display: block;
    margin-left: 0;
    margin-top: 0.15rem;
  }
}
.matrix-pr-grand {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--liberty-text-muted, #64748b);
}

/* Capacidade — layout */
.capacity-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.capacity-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgb(15 23 42 / 0.08);
}

.capacity-hero-main {
  display: contents;
}

.capacity-pill--snapshots {
  position: relative;
}

.capacity-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  padding: 0 0.3rem;
  margin-left: 0.15rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  background: #e0f2fe;
  color: #0369a1;
}

.capacity-snapshots-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1950;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgb(15 23 42 / 0.45);
  backdrop-filter: blur(4px);
}

.capacity-snapshots-modal-panel {
  width: min(26rem, 100%);
  max-height: min(85vh, 40rem);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgb(15 23 42 / 0.1);
  background: #fff;
  box-shadow:
    0 8px 40px rgb(15 23 42 / 0.18),
    0 0 0 1px rgb(255 255 255 / 0.06) inset;
  overflow: hidden;
}

.capacity-snapshots-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgb(15 23 42 / 0.08);
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
  flex-shrink: 0;
}

.capacity-snapshots-modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.capacity-snapshots-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.capacity-snapshots-modal-close:hover {
  background: rgb(15 23 42 / 0.06);
  color: #0f172a;
}

.capacity-snapshots-modal-close .material-icons {
  font-size: 1.35rem !important;
}

.capacity-snapshots-modal-empty {
  margin: 0;
  padding: 1.25rem 1rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.45;
}

.capacity-snapshots-modal-list {
  margin: 0;
  padding: 0.65rem 1rem 1rem;
  list-style: none;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.capacity-snapshots-modal-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid rgb(15 23 42 / 0.08);
  background: #fafafa;
  flex-shrink: 0;
}

.capacity-snapshots-modal-page-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.capacity-snapshots-modal-page-muted {
  font-weight: 500;
  color: #94a3b8;
}

.capacity-snapshots-modal-page-note {
  margin: 0;
  padding: 0 1rem 0.85rem;
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
}

.capacity-snapshot-card {
  border-radius: 10px;
  border: 1px solid rgb(15 23 42 / 0.1);
  background: linear-gradient(165deg, #fafafa 0%, #fff 55%);
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.capacity-snapshot-card--modal {
  width: 100%;
}

.capacity-snapshot-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
}

.capacity-snapshot-titles {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.capacity-snapshot-date {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.capacity-snapshot-code {
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
}

.capacity-snapshot-badge {
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: #d1fae5;
  color: #065f46;
}

.capacity-snapshot-stats {
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.35;
}

.capacity-snapshot-hours {
  font-weight: 800;
  font-size: 0.9375rem;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.capacity-snapshot-stat-muted {
  font-weight: 500;
  color: #64748b;
}

.capacity-snapshot-sep {
  margin: 0 0.2rem;
  opacity: 0.45;
}

.capacity-snapshot-preview {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.capacity-snapshot-restore {
  align-self: flex-start;
  margin-top: 0.15rem;
}

.capacity-snapshot-restore .material-icons {
  font-size: 1rem !important;
}

.capacity-hero-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.15;
}

.capacity-hero-sub {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.capacity-hero-dot {
  opacity: 0.45;
}

.capacity-hero-link {
  color: #0d9488;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgb(13 148 136 / 0.35);
}

.capacity-hero-link:hover {
  color: #0f766e;
  border-bottom-color: #0f766e;
}

.capacity-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 540px) {
  .capacity-hero-actions {
    width: 100%;
  }

  .capacity-hero-actions .capacity-pill {
    flex: 1;
    justify-content: center;
  }
}

.capacity-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.capacity-pill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.capacity-pill-icon {
  font-size: 1.1rem !important;
  opacity: 0.9;
}

.capacity-pill--primary {
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
  color: #fff;
  border-color: rgb(13 148 136 / 0.5);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}

.capacity-pill--primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.capacity-pill--secondary {
  background: #fff;
  color: #0f172a;
  border-color: #e2e8f0;
}

.capacity-pill--secondary:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.capacity-pill--ghost {
  background: #fff;
  color: #475569;
  border-color: #e2e8f0;
}

.capacity-pill--ghost:hover:not(:disabled) {
  background: #f8fafc;
  color: #0f172a;
}

.capacity-pill--sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
}

.capacity-flash {
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.capacity-flash--error {
  border: 1px solid #fecaca;
  background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
  color: #991b1b;
}

.capacity-flash--ok {
  border: 1px solid #a7f3d0;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
}

.capacity-archive-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgb(15 23 42 / 0.45);
  backdrop-filter: blur(4px);
}

.capacity-archive-panel {
  width: min(22rem, 100%);
  border-radius: 12px;
  border: 1px solid rgb(15 23 42 / 0.1);
  background: #fff;
  box-shadow:
    0 4px 24px rgb(15 23 42 / 0.12),
    0 0 0 1px rgb(255 255 255 / 0.06) inset;
  padding: 1.25rem 1.35rem;
  text-align: center;
}

.capacity-archive-title {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
}

.capacity-archive-bar-wrap {
  height: 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.capacity-archive-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #6366f1);
  transition: width 0.2s ease-out;
}

.capacity-archive-pct {
  margin: 0.65rem 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.capacity-archive-label {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #64748b;
}

.capacity-restore-overlay {
  position: fixed;
  inset: 0;
  z-index: 1900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgb(15 23 42 / 0.4);
  backdrop-filter: blur(3px);
}

.capacity-restore-panel {
  width: min(26rem, 100%);
  border-radius: 12px;
  border: 1px solid rgb(15 23 42 / 0.1);
  background: #fff;
  padding: 1.25rem 1.35rem 1.1rem;
  box-shadow:
    0 8px 32px rgb(15 23 42 / 0.14),
    0 0 0 1px rgb(255 255 255 / 0.06) inset;
}

.capacity-restore-title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.capacity-restore-text {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #475569;
}

.capacity-restore-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #334155;
  cursor: pointer;
}

.capacity-restore-check input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.capacity-restore-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.capacity-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.capacity-skeleton-line {
  height: 0.65rem;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    #f1f5f9 0%,
    #e2e8f0 50%,
    #f1f5f9 100%
  );
  background-size: 200% 100%;
  animation: capacity-shimmer 1.2s ease-in-out infinite;
}

.capacity-skeleton-line--short {
  width: 55%;
}

@keyframes capacity-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.capacity-sync-details {
  border-radius: 8px;
  border: 1px solid rgb(15 23 42 / 0.08);
  background: #fafafa;
  font-size: 0.75rem;
  color: #64748b;
}

.capacity-sync-summary {
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: #475569;
}

.capacity-sync-summary::-webkit-details-marker {
  display: none;
}

.capacity-sync-summary-icon {
  font-size: 1rem !important;
  color: #94a3b8;
}

.capacity-sync-list {
  margin: 0;
  padding: 0 0.85rem 0.65rem 1.85rem;
  line-height: 1.45;
}

.capacity-card {
  border-radius: 12px;
  border: 1px solid rgb(15 23 42 / 0.08);
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 4px 12px rgb(15 23 42 / 0.04);
}

.capacity-card--controls {
  padding: 0.65rem 1rem;
}

.capacity-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.capacity-restore-toolbar {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgb(15 23 42 / 0.08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
}

.capacity-restore-toolbar-label {
  display: block;
  margin-bottom: 0.1rem;
}

.capacity-restore-inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.capacity-field-select--grow {
  flex: 1;
  min-width: 12rem;
}

.capacity-period-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #64748b;
  max-width: 40rem;
}

.capacity-period-hint--tight {
  margin-bottom: 0.15rem;
}

.capacity-controls-spacer {
  flex: 1;
  min-width: 0.5rem;
}

.capacity-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.capacity-field-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.capacity-field-select {
  min-width: 11rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
}

.capacity-field-select:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgb(20 184 166 / 0.2);
}

.capacity-field-select--grow {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.capacity-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.capacity-badge--live {
  background: rgb(20 184 166 / 0.12);
  color: #0f766e;
}

.capacity-badge--archive {
  background: #f1f5f9;
  color: #64748b;
}

.capacity-readonly-chip {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.capacity-inline-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
}

.capacity-inline-confirm--stack {
  flex-direction: column;
  align-items: stretch;
}

.capacity-inline-confirm-text {
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.35;
}

.capacity-inline-confirm-actions {
  display: flex;
  gap: 0.4rem;
}

.capacity-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  padding: 1rem 1.1rem;
  align-items: stretch;
}

@media (max-width: 720px) {
  .capacity-split {
    grid-template-columns: 1fr;
  }

  .capacity-split-divider {
    height: 1px;
    width: 100% !important;
    min-height: 0;
  }
}

.capacity-split-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.capacity-split-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.capacity-split-icon {
  font-size: 1.1rem !important;
  color: #94a3b8;
}

.capacity-split-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
}

.capacity-split-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.capacity-split-muted {
  margin: 0;
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.4;
}

.capacity-split-ok {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: #15803d;
  font-weight: 600;
}

.capacity-split-ok .material-icons {
  font-size: 1.1rem !important;
}

.capacity-split-divider {
  width: 1px;
  min-height: 3rem;
  background: linear-gradient(
    180deg,
    transparent,
    #e2e8f0 15%,
    #e2e8f0 85%,
    transparent
  );
  align-self: stretch;
}

.capacity-code {
  font-size: 0.75rem;
  padding: 0.05rem 0.25rem;
  border-radius: 4px;
  background: #f1f5f9;
}

.capacity-panel {
  overflow: hidden;
}

.capacity-panel--matrix {
  border-radius: 12px;
  border: 1px solid rgb(15 23 42 / 0.08);
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 8px 28px rgb(15 23 42 / 0.06);
}

.capacity-panel-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgb(15 23 42 / 0.06);
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.capacity-panel-headline {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.capacity-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.capacity-panel-tagline {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.capacity-micro-icon {
  font-size: 0.95rem !important;
  vertical-align: -3px;
  color: #cbd5e1;
}

.capacity-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.capacity-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.capacity-th,
.capacity-td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}

.capacity-th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
  font-size: 0.78rem;
}

.capacity-th--sticky,
.capacity-td--sticky {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 8rem;
  max-width: 14rem;
  background: #fff;
  box-shadow: 2px 0 4px rgba(15, 23, 42, 0.05);
}

.capacity-th--sticky {
  z-index: 2;
  background: #f8fafc;
}

.capacity-th-num,
.capacity-td-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.capacity-th-project {
  max-width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.capacity-th-hint {
  display: block;
  font-weight: 400;
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.capacity-th-actions {
  width: 3rem;
  text-align: center;
}

.capacity-empty {
  padding: 1.25rem 1rem !important;
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
}

.capacity-input {
  width: 5.25rem;
  max-width: 100%;
  padding: 0.4rem 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
  font-size: 0.8125rem;
  text-align: right;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.capacity-input:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgb(20 184 166 / 0.18);
}

.capacity-input:disabled {
  cursor: wait;
  opacity: 0.92;
  background: #f1f5f9;
  color: #0f172a;
}

.capacity-td-actions {
  text-align: center;
  width: 3rem;
}

.capacity-icon-btn {
  display: inline-flex;
  padding: 0.35rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.capacity-icon-btn:hover {
  background: #f1f5f9;
  color: #b91c1c;
}

.capacity-input--readonly {
  cursor: default;
  background: #f8fafc;
  color: #0f172a;
}

.capacity-th--drag {
  width: 2.5rem;
  min-width: 2.5rem;
  padding: 0.35rem;
  text-align: center;
}

.capacity-td-drag {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 2.5rem;
  min-width: 2.5rem;
  padding: 0.25rem;
  text-align: center;
  vertical-align: middle;
  background: #fff;
  box-shadow: 2px 0 4px rgba(15, 23, 42, 0.05);
}

.capacity-th--sticky:not(.capacity-th--drag) {
  left: 2.5rem;
}

.capacity-td-name.capacity-td--sticky {
  left: 2.5rem;
}

.capacity-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  border-radius: 6px;
  color: #94a3b8;
  cursor: grab;
}

.capacity-drag-handle:active {
  cursor: grabbing;
}

.capacity-drag-handle:hover {
  background: #f1f5f9;
  color: #475569;
}

.capacity-drag-handle .material-icons {
  font-size: 1.35rem;
}

/* Novo quadro (provisionamento) */
.page-header--provision {
  margin-bottom: 1.5rem;
}

.page-lede--tight {
  max-width: 28rem;
}

.provision-flow {
  flex: 1;
  min-width: 0;
}

.provision-muted {
  font-size: 0.9rem;
  color: var(--liberty-text-muted);
}

.provision-alert {
  border-radius: var(--liberty-radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.provision-alert--error {
  border: 1px solid rgb(254 202 202);
  background: rgb(254 242 242);
  color: rgb(127 29 29);
}

.provision-alert--ok {
  border: 1px solid rgb(167 243 208);
  background: rgb(240 253 244);
  color: rgb(20 83 45);
}

.provision-success-title {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.provision-success-line {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.provision-id {
  font-weight: 500;
  opacity: 0.85;
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
}

.provision-success-hint {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
}

.provision-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--liberty-radius-sm);
  background: var(--brand-dark);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  transition: background 0.15s ease;
}

.provision-link-btn:hover {
  background: #003d6b;
}

.provision-link-btn .material-icons {
  font-size: 1.15rem;
}

.provision-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: min(52rem, 100%);
}

.provision-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.provision-legend {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--liberty-text-muted);
  margin-bottom: 0.65rem;
}

.provision-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .provision-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.provision-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: var(--liberty-radius);
  border: 2px solid var(--liberty-border);
  background: var(--liberty-bg);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.provision-card:hover:not(:disabled) {
  border-color: rgb(110 176 204 / 0.55);
  box-shadow: var(--liberty-shadow);
}

.provision-card--selected {
  border-color: var(--brand-primary);
  background: linear-gradient(
    180deg,
    rgb(0 191 154 / 0.08) 0%,
    var(--liberty-bg) 100%
  );
  box-shadow: var(--liberty-shadow);
}

.provision-card--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.provision-card-icon {
  font-size: 1.75rem;
  color: var(--brand-dark);
}

.provision-card-icon--muted {
  color: var(--text-secondary);
}

.provision-card-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--liberty-text);
  line-height: 1.35;
}

.provision-card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--warning-color);
}

.provision-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.provision-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--liberty-text);
}

.provision-input,
.provision-select {
  width: 100%;
  max-width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: #fff;
  font: inherit;
  font-size: 0.9375rem;
}

.provision-input:focus,
.provision-select:focus {
  outline: 2px solid rgb(0 191 154 / 0.35);
  outline-offset: 1px;
  border-color: var(--brand-primary);
}

.provision-actions {
  padding-top: 0.25rem;
}

.provision-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: none;
  border-radius: var(--liberty-radius);
  background: var(--brand-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.provision-submit:hover:not(:disabled) {
  background: var(--primary-hover);
}

.provision-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.provision-submit-icon {
  font-size: 1.25rem;
}

.provision-toggle-wrap {
  margin-bottom: 0.25rem;
}

.provision-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--liberty-text);
  cursor: pointer;
}

.provision-toggle input {
  margin-top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--brand-primary);
}

.provision-toggle--inline {
  margin-bottom: 0.65rem;
}

.provision-file-btn--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.provision-branding {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.provision-branding-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.provision-color-wrap {
  display: inline-flex;
  flex-shrink: 0;
}

.provision-color-input {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--liberty-border);
  border-radius: var(--liberty-radius-sm);
  cursor: pointer;
  background: transparent;
}

.provision-input--hex {
  max-width: 7.5rem;
  font-family: ui-monospace, monospace;
  font-size: 0.875rem;
}

.provision-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--liberty-radius-sm);
  border: 1px solid var(--liberty-border);
  background: var(--liberty-bg);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.provision-file-btn:hover {
  border-color: rgb(110 176 204 / 0.55);
}

.provision-file-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.provision-file-btn:has(.provision-file-native:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

.provision-hint {
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0;
}

.provision-hint--warn {
  color: #b45309;
}

.provision-icon-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.provision-icon-preview img {
  border-radius: 6px;
  border: 1px solid var(--liberty-border);
  object-fit: cover;
}

.provision-warnings {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.8125rem;
  color: #92400e;
  line-height: 1.45;
}

.capacity-row--drop {
  outline: 2px dashed var(--brand-primary);
  outline-offset: -2px;
  background: rgb(0 191 154 / 0.06);
}

.capacity-table thead .capacity-th--drag {
  background: #f8fafc;
  z-index: 3;
}

/* UniConecta — páginas placeholder (alinhado ao shell iLiberty) */
.app-page {
  padding: 1.25rem 1.5rem 2rem;
}

.app-breadcrumbs {
  margin-bottom: 0.75rem;
}

.app-breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--liberty-text-muted, #64748b);
}

.app-breadcrumbs-link {
  color: var(--brand-light, #00b6d6);
  text-decoration: none;
}

.app-breadcrumbs-link:hover {
  text-decoration: underline;
}

.app-breadcrumbs-current {
  color: var(--liberty-text, #0f172a);
  font-weight: 500;
}

.app-breadcrumbs-sep {
  margin: 0 0.15rem;
  opacity: 0.5;
}

.app-page-header {
  margin-bottom: 1.25rem;
}

.app-page-title {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--liberty-text, #0f172a);
}

.app-page-lead {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--liberty-text-muted, #64748b);
  max-width: 42rem;
}

.app-page-body {
  background: #fff;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--liberty-shadow-sm, 0 1px 2px rgb(15 23 42 / 0.06));
}

.app-muted {
  margin: 0;
  color: var(--liberty-text-muted, #64748b);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.uniconecta-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.uniconecta-shortcut {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: #fff;
  color: var(--liberty-text, #0f172a);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--liberty-shadow-sm, 0 1px 2px rgb(15 23 42 / 0.06));
  transition: border-color 0.15s, box-shadow 0.15s;
}

.uniconecta-shortcut:hover {
  border-color: var(--brand-light, #00b6d6);
  box-shadow: 0 2px 8px rgb(0 182 214 / 0.12);
}

.uniconecta-shortcut .material-icons {
  font-size: 1.25rem;
  color: var(--brand-primary, #00bf9a);
}

/* Admin / forms (Slice 1+) */
.stack-gap {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
}

.app-card {
  background: #f8fafc;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.app-card--tight {
  padding: 0.65rem 1rem;
}

.app-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}

.app-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: min(100%, 16rem);
  flex: 1;
}

.app-field-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--liberty-text-muted, #64748b);
}

.app-input {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 6px;
  font-size: 0.9375rem;
}

.app-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: #fff;
  cursor: pointer;
}

.app-btn--primary {
  background: var(--brand-primary, #00bf9a);
  border-color: var(--brand-primary, #00bf9a);
  color: #fff;
}

.app-btn--secondary {
  background: #fff;
  color: var(--brand-dark, #002b49);
  border-color: var(--brand-dark, #002b49);
}

.app-btn--secondary:hover {
  background: rgb(0 43 73 / 0.06);
}

.app-btn--ghost {
  background: transparent;
  color: var(--text-secondary, #64748b);
  border-color: transparent;
}

.app-btn--ghost:hover:not(:disabled) {
  background: rgb(0 43 73 / 0.06);
  color: var(--text-primary, #1e293b);
}

/* Destructive variant of ghost — neutral by default, red only on hover. */
.app-btn--ghost-danger {
  color: var(--text-secondary, #64748b);
}

.app-btn--ghost-danger:hover:not(:disabled),
.app-btn--ghost-danger:focus-visible {
  background: #fef2f2;
  color: #dc2626;
}

.app-btn--danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.app-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.app-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-error-banner {
  margin: 0;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.875rem;
}

/* Floating, non-blocking toast for failed kanban/inline action writes. */
.acoes-write-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: min(92vw, 560px);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #7f1d1d;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.875rem;
  animation: acoes-write-toast-in 0.18s ease-out;
}

.acoes-write-toast .material-icons {
  font-size: 1.15rem;
}

.acoes-write-toast__msg {
  flex: 1;
  line-height: 1.3;
}

.acoes-write-toast__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 0.1rem;
  border-radius: 6px;
}

.acoes-write-toast__close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

@keyframes acoes-write-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.app-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(15 23 42 / 0.45);
  display: grid;
  place-items: center;
  z-index: 80;
  padding: 1rem;
}

.app-modal {
  width: min(100%, 30rem);
  background: #fff;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgb(15 23 42 / 0.25);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.app-modal-title {
  margin: 0;
  color: var(--brand-dark, #002b49);
  font-size: 1rem;
}

.app-modal-message {
  margin: 0;
  color: var(--liberty-text, #0f172a);
  font-size: 0.9375rem;
}

.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.org-workspace-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.org-tab {
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: #fff;
  font-size: 0.875rem;
  cursor: pointer;
}

.org-tab--active {
  border-color: var(--brand-primary, #00bf9a);
  background: rgba(0, 191, 154, 0.08);
  font-weight: 600;
}

.org-section-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

/* Painel: arranque CEO em linguagem natural */
.ceo-nl {
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgb(0 191 154 / 0.28);
  background: linear-gradient(
    145deg,
    rgb(255 255 255 / 0.98),
    rgb(248 250 252 / 1)
  );
  box-shadow: 0 12px 40px rgb(0 43 73 / 0.08), var(--liberty-shadow);
}

.ceo-nl__glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 55%;
  background: radial-gradient(
    ellipse at 30% 0%,
    rgb(0 191 154 / 0.18),
    transparent 55%
  );
  pointer-events: none;
}

.ceo-nl__inner {
  position: relative;
  padding: 1.35rem 1.5rem 1.5rem;
}

.ceo-nl__head {
  margin-bottom: 1rem;
}

.ceo-nl__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--brand-primary, #00bf9a);
}

.ceo-nl__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--brand-dark, #002b49);
}

.ceo-nl__lead {
  margin: 0;
  max-width: 52rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--liberty-text-muted, #64748b);
}

.ceo-nl__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.ceo-nl__chip {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--liberty-text, #0f172a);
  cursor: pointer;
}

.ceo-nl__chip:hover {
  border-color: rgb(0 191 154 / 0.45);
  background: rgb(0 191 154 / 0.06);
}

.ceo-nl__label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.ceo-nl__label--inline {
  max-width: 28rem;
}

.ceo-nl__label-text {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--liberty-text-muted, #64748b);
}

.ceo-nl__textarea,
.ceo-nl__input {
  font: inherit;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: #fff;
  color: var(--liberty-text, #0f172a);
}

.ceo-nl__textarea {
  min-height: 7.5rem;
  resize: vertical;
  line-height: 1.5;
}

.ceo-nl__check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--liberty-text-muted, #64748b);
}

.ceo-nl__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ceo-nl__hint {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--liberty-text-muted, #64748b);
}

.ceo-nl__link {
  color: var(--brand-primary, #00bf9a);
  font-weight: 600;
}

.ceo-nl__error {
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: rgb(254 226 226);
  color: #991b1b;
  font-size: 0.875rem;
}

.ceo-nl__note {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--liberty-text-muted, #64748b);
}

.ceo-nl__card {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: #fff;
}

.ceo-nl__card--muted {
  background: rgb(248 250 252 / 0.95);
}

.ceo-nl__card-title {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
}

.ceo-nl__card-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--liberty-text, #0f172a);
}

.ceo-nl__block {
  margin-top: 0.85rem;
}

.ceo-nl__sub {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--liberty-text-muted, #64748b);
}

.ceo-nl__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

.ceo-nl__list--compact li {
  margin-bottom: 0.15rem;
}

.ceo-nl__kv {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--liberty-text, #0f172a);
}

.ceo-nl__details {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--liberty-text-muted, #64748b);
}

.ceo-nl__pre {
  margin-top: 0.5rem;
  max-height: 12rem;
  overflow: auto;
  padding: 0.75rem;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.72rem;
  line-height: 1.4;
}

.ceo-nl__success {
  margin: 1rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgb(209 250 229);
  color: #065f46;
  font-size: 0.875rem;
}

/* Compact AI launcher + modal (Painel CEO bootstrap, fill specs, etc.) */
.ceo-nl-prompt,
.ai-launcher-prompt {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgb(0 191 154 / 0.22);
  background: linear-gradient(
    135deg,
    rgb(255 255 255 / 0.98),
    rgb(240 253 250 / 0.65)
  );
  box-shadow: 0 4px 18px rgb(0 43 73 / 0.06);
}

.ceo-nl-prompt__icon,
.ai-launcher-prompt__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: rgb(0 191 154 / 0.12);
  color: var(--brand-primary, #00bf9a);
}

.ceo-nl-prompt__icon .material-icons,
.ai-launcher-prompt__icon .material-icons {
  font-size: 1.35rem;
}

.ceo-nl-prompt__copy,
.ai-launcher-prompt__copy {
  flex: 1;
  min-width: 0;
}

.ceo-nl-prompt__eyebrow,
.ai-launcher-prompt__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-primary, #00bf9a);
}

.ceo-nl-prompt__title,
.ai-launcher-prompt__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--brand-dark, #002b49);
}

.ceo-nl-prompt__lead,
.ai-launcher-prompt__lead {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--liberty-text-muted, #64748b);
}

.ceo-nl-prompt__cta,
.ai-launcher-prompt__cta {
  flex-shrink: 0;
  white-space: nowrap;
}

.ceo-nl-modal-backdrop,
.ai-launcher-modal-backdrop {
  align-items: flex-start;
  padding: 1.25rem 1rem;
  overflow-y: auto;
}

.ceo-nl-modal,
.ai-launcher-modal {
  width: min(100%, 52rem);
  max-height: none;
  margin: auto 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  box-shadow: 0 24px 48px rgb(15 23 42 / 0.22);
}

.ceo-nl-modal__hdr,
.ai-launcher-modal__hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem 1rem;
  border-bottom: 1px solid var(--liberty-border, #e2e8f0);
  background: linear-gradient(
    180deg,
    rgb(240 253 250 / 0.55),
    rgb(255 255 255 / 1)
  );
}

.ceo-nl-modal__hdr-copy,
.ai-launcher-modal__hdr-copy {
  min-width: 0;
}

.ceo-nl-modal__title,
.ai-launcher-modal__title {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--brand-dark, #002b49);
}

.ceo-nl-modal__lead,
.ai-launcher-modal__lead {
  margin: 0;
  max-width: 44rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--liberty-text-muted, #64748b);
}

.ceo-nl-modal__close,
.ai-launcher-modal__close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: rgb(241 245 249);
  color: var(--liberty-text, #0f172a);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ceo-nl-modal__close:hover:not(:disabled),
.ai-launcher-modal__close:hover:not(:disabled) {
  background: rgb(226 232 240);
}

.ceo-nl-modal__close:disabled,
.ai-launcher-modal__close:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ceo-nl-modal__body,
.ai-launcher-modal__body {
  overflow-y: auto;
  max-height: min(72vh, 44rem);
  padding: 0.25rem 1.35rem 1.35rem;
}

.ceo-nl__embedded .ceo-nl__chips {
  margin-top: 0.35rem;
}

.ai-launcher-prompt--error {
  padding: 1rem;
  border-color: rgb(239 68 68 / 0.35);
  color: #991b1b;
}

@media (max-width: 720px) {
  .ceo-nl-prompt,
  .ai-launcher-prompt {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .ceo-nl-prompt__cta,
  .ai-launcher-prompt__cta {
    width: 100%;
    justify-content: center;
  }

  .ceo-nl-modal-backdrop,
  .ai-launcher-modal-backdrop {
    padding: 0.75rem 0.5rem;
  }

  .ceo-nl-modal__hdr,
  .ai-launcher-modal__hdr {
    padding: 1rem;
  }

  .ceo-nl-modal__body,
  .ai-launcher-modal__body {
    padding: 0.25rem 1rem 1rem;
    max-height: min(78vh, 44rem);
  }
}

.painel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.painel-card-label {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  color: var(--liberty-text-muted, #64748b);
}

.painel-card-value {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--liberty-text, #0f172a);
}

.app-table-wrap {
  overflow-x: auto;
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.app-table th,
.app-table td {
  border: 1px solid var(--liberty-border, #e2e8f0);
  padding: 0.4rem 0.5rem;
  text-align: left;
}

.app-table th {
  background: #f1f5f9;
  font-weight: 600;
}

.app-textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
}

.app-link-strong {
  color: var(--brand-primary, #00bf9a);
  font-weight: 600;
  text-decoration: none;
}

.app-link-strong:hover {
  text-decoration: underline;
}

/* Legacy chat aliases — superseded by comm-hub below */
.chat-layout {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) 1fr;
  gap: 1rem;
}

@media (max-width: 720px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }
}

.chat-messages {
  max-height: 22rem;
  overflow-y: auto;
}

.chat-line {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
}

/* First-visit product tour + empty states */
.app-tour-welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgb(0 43 73 / 0.45);
  backdrop-filter: blur(4px);
}

.app-tour-welcome-card {
  max-width: 26rem;
  width: 100%;
  padding: 1.5rem 1.65rem;
  border-radius: 12px;
  background: var(--surface-color, #fff);
  box-shadow: var(--liberty-shadow-md, 0 8px 30px rgb(0 0 0 / 0.12));
  border: 1px solid var(--liberty-border, #e2e8f0);
}

.app-tour-welcome-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
}

.app-tour-welcome-lead {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary, #64748b);
}

.app-tour-welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-tour-dismiss-link {
  margin-top: 0.25rem;
  padding: 0.35rem 0;
  border: none;
  background: none;
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
  text-decoration: underline;
  cursor: pointer;
  text-align: center;
}

.app-tour-dismiss-link:hover {
  color: var(--brand-dark, #002b49);
}

.empty-state-hint {
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px dashed var(--liberty-border, #e2e8f0);
  background: var(--liberty-surface-warm, #f1f5f9);
}

.empty-state-hint__text {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary, #64748b);
}

.empty-state-hint__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.empty-state-hint__btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.driverPopoverUni.driver-popover {
  max-width: 380px;
  min-width: 300px;
  padding: 18px 18px 16px;
}

.driverPopoverUni .driver-popover-title {
  font-family: inherit;
  color: var(--brand-dark, #002b49);
  font-size: 1.02rem;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.driverPopoverUni .driver-popover-description {
  font-family: inherit;
  color: var(--text-primary, #1e293b);
}

.driverPopoverUni .driver-popover-footer button {
  text-shadow: none;
}

.driverPopoverUni .driver-popover-footer .driver-popover-next-btn {
  background: var(--brand-primary, #00bf9a) !important;
  color: #fff !important;
  border: none !important;
  text-shadow: none;
}

.driverPopoverUni .driver-popover-footer .driver-popover-prev-btn {
  color: var(--brand-dark, #002b49) !important;
}

/* ── Visual rich popovers (chips + bullets) ──────────────────────────────── */
/* driver.js resets font-family on every child (.driver-popover *) — restore
   the Material Icons font so our chips/bullets show real glyphs. */
.driverPopoverUni .material-icons {
  font-family: "Material Icons" !important;
  font-weight: normal !important;
  font-style: normal !important;
  line-height: 1 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  display: inline-block !important;
  white-space: nowrap !important;
  word-wrap: normal !important;
  direction: ltr !important;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.driverPopoverUni .driver-popover-description {
  font-size: 0.9rem;
  line-height: 1.5;
}

.driverPopoverUni .driver-popover-description .tour-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
}

.driverPopoverUni .driver-popover-description .tour-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: rgb(0 191 154 / 0.1);
  color: var(--brand-dark, #002b49);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid rgb(0 191 154 / 0.25);
  white-space: nowrap;
}

.driverPopoverUni .driver-popover-description .tour-chip .material-icons {
  font-size: 0.95rem !important;
  color: var(--brand-primary, #00bf9a);
}

.driverPopoverUni .driver-popover-description .tour-body {
  margin: 0 0 0.55rem;
  color: var(--text-primary, #1e293b);
}

.driverPopoverUni .driver-popover-description .tour-bullets {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.driverPopoverUni .driver-popover-description .tour-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgb(51 65 85);
}

.driverPopoverUni .driver-popover-description .tour-bullets .tour-bullet-icon {
  font-size: 1rem !important;
  color: var(--brand-primary, #00bf9a);
  flex: 0 0 auto;
  margin-top: 0.08rem;
}

/* ── Welcome card visual bullets ─────────────────────────────────────────── */
.app-tour-welcome-bullets {
  list-style: none;
  padding: 0;
  margin: -0.5rem 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-tour-welcome-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgb(71 85 105);
}

.app-tour-welcome-bullets li .material-icons {
  font-size: 1.15rem !important;
  color: var(--brand-primary, #00bf9a);
  flex: 0 0 auto;
  margin-top: 0.1rem;
  background: rgb(0 191 154 / 0.12);
  padding: 0.2rem;
  border-radius: 8px;
}

/* ── Tour exit button (floating, visible while tour is active) ────────────── */
.tour-exit-btn {
  position: fixed;
  top: 4.75rem;
  right: 1.25rem;
  bottom: auto;
  left: auto;
  transform: none;
  z-index: 2147483646 !important;
  pointer-events: auto !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem 0.45rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(15 23 42 / 0.92);
  backdrop-filter: blur(8px);
  color: rgb(226 232 240);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgb(0 0 0 / 0.45);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  letter-spacing: 0.01em;
}

.tour-exit-btn:hover {
  background: rgb(30 41 59 / 0.98);
  color: #fff;
  border-color: rgb(255 255 255 / 0.3);
}

.tour-exit-btn .material-icons {
  font-size: 1rem !important;
  opacity: 0.8;
}

/* While the product tour is active, hide in-page modals that would stack
   above the overlay when main-content is the highlighted element. */
.driver-active .app-modal-backdrop,
.driver-active .org-modal-overlay,
.driver-active .capacity-snapshots-modal-overlay,
.driver-active .capacity-archive-overlay,
.driver-active .capacity-restore-overlay {
  display: none !important;
}

/* Keep driver.js above app chrome dropdowns and portaled popovers */
.driver-overlay {
  z-index: 1000000000 !important;
  pointer-events: none !important;
}

.driver-popover,
.driverPopoverUni.driver-popover {
  z-index: 1000000001 !important;
}

/* —— Entity list + form modal (pilot: Execução → Ações), reusable pattern —— */
.uc-entity-panel {
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--liberty-shadow);
  overflow: hidden;
}

.uc-entity-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  padding: 1rem 1.15rem;
  background: linear-gradient(
    180deg,
    rgb(248 250 252 / 0.95),
    rgb(255 255 255 / 1)
  );
  border-bottom: 1px solid var(--liberty-border, #e2e8f0);
}

.uc-entity-toolbar__grow {
  flex: 1 1 14rem;
  min-width: 10rem;
}

.uc-entity-toolbar__cta {
  align-self: flex-end;
}

.uc-entity-field--compact .app-field-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--liberty-text-muted, #64748b);
}

.uc-entity-body {
  padding: 0.5rem 0;
}

.uc-entity-body--pad {
  padding: var(--ds-space-5) var(--ds-space-6);
}

.uc-entity-empty-filter {
  margin: 0;
  text-align: center;
}

.uc-entity-table-wrap {
  border-top: none;
}

.uc-entity-table th,
.uc-entity-table td {
  vertical-align: middle;
}

.uc-entity-table tbody tr:hover {
  background: rgb(248 250 252 / 0.85);
}

.uc-entity-title-cell {
  font-weight: 600;
  color: var(--liberty-text, #0f172a);
}

.uc-entity-muted {
  color: var(--liberty-text-muted, #64748b);
  font-size: 0.875rem;
}

.uc-entity-nowrap {
  white-space: nowrap;
  font-size: 0.875rem;
}

.uc-entity-col-actions {
  width: 1%;
  text-align: right;
}

.uc-entity-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.uc-entity-row-actions .app-btn {
  font-size: 0.8125rem;
  padding: 0.35rem 0.65rem;
}

.uc-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
}

.uc-badge--neutral {
  background: rgb(241 245 249);
  color: #475569;
}

.uc-badge--success {
  background: rgb(209 250 229);
  color: #047857;
}

.uc-badge--info {
  background: rgb(224 242 254);
  color: #0369a1;
}

.uc-badge--warn {
  background: rgb(254 243 199);
  color: #b45309;
}

.uc-badge--danger {
  background: rgb(254 226 226);
  color: #b91c1c;
}

.uc-badge--muted {
  background: rgb(241 245 249);
  color: #64748b;
}

.uc-badge--outline {
  background: #fff;
  border: 1px solid var(--liberty-border, #e2e8f0);
  color: var(--liberty-text-muted, #64748b);
  font-weight: 500;
}

.uc-entity-modal--form {
  width: min(100%, 38rem);
  max-height: min(90vh, 44rem);
  overflow-y: auto;
  padding: 1.2rem 1.35rem;
  gap: 0.5rem;
}

.uc-entity-modal__hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.uc-entity-modal__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
  line-height: 1.3;
}

.uc-entity-modal__close {
  margin-left: auto;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: rgb(241 245 249);
  color: var(--liberty-text, #0f172a);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.uc-entity-modal__close:hover {
  background: rgb(226 232 240);
}

.uc-entity-modal__lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--liberty-text-muted, #64748b);
}

.uc-entity-modal__form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.uc-entity-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--liberty-border, #e2e8f0);
}

/* ============================================================
   BPMN EDITOR (BpmnXmlEditor)
   ============================================================ */

.bpmn-editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--liberty-radius, 8px);
  background: var(--surface-color, #fff);
  /* Avoid overflow:hidden — the palette/context-pad may overflow the canvas bounds;
     we still get rounded corners because inner elements paint within. */
  isolation: isolate;
}

.bpmn-editor-wrap--fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  border-radius: 0;
  border: none;
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.35);
}

.bpmn-editor-wrap--fullscreen .bpmn-viewer-pane,
.bpmn-editor-wrap--fullscreen .bpmn-canvas {
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.bpmn-editor-wrap--fullscreen .bpmn-viewer-pane {
  display: flex;
}

.bpmn-tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background: var(--background-color, #f8fafc);
}

.bpmn-tabs__spacer {
  flex: 1;
}

.bpmn-tabs__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  margin-right: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
  border-radius: 999px;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: var(--surface-muted, #f8fafc);
  cursor: pointer;
}
.bpmn-tabs__meta:hover,
.bpmn-tabs__meta:focus-visible {
  border-color: color-mix(in srgb, var(--brand-primary, #00bf9a) 45%, #e2e8f0);
  color: var(--text-primary, #0f172a);
  outline: none;
}

.bpmn-dirty-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning-color, #f59e0b);
  box-shadow: 0 0 0 3px rgb(245 158 11 / 0.2);
}

.bpmn-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.bpmn-tab-btn:hover {
  color: var(--text-primary, #1e293b);
}

.bpmn-tab-btn--active {
  color: var(--brand-primary, #00bf9a);
  border-bottom-color: var(--brand-primary, #00bf9a);
  background: #fff;
}

.bpmn-tab-icon {
  font-size: 1rem;
  opacity: 0.75;
}

/* --- Toolbar --- */
.bpmn-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface-color, #fff);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.bpmn-toolbar__spacer {
  flex: 1;
}

.bpmn-toolbar__group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--liberty-radius-sm, 6px);
  background: var(--background-color, #f8fafc);
  position: relative;
}

.bpmn-toolbar__group--color {
  position: relative;
}

.bpmn-toolbar__save {
  margin-left: 0.25rem;
}

.bpmn-header-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 30px;
  padding: 0 0.55rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.bpmn-header-toggle input {
  margin: 0;
  accent-color: var(--brand-primary, #00bf9a);
}

.bpmn-header-toggle--on {
  color: var(--brand-navy, #002b49);
  background: color-mix(in srgb, var(--brand-primary, #00bf9a) 12%, #fff);
}

@media (max-width: 640px) {
  .bpmn-header-toggle span {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.bpmn-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 30px;
  height: 30px;
  padding: 0 0.55rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-primary, #1e293b);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.bpmn-tool-btn:hover:not(:disabled) {
  background: var(--liberty-nav-active, #eff6ff);
  color: var(--brand-primary, #00bf9a);
}

.bpmn-tool-btn[aria-pressed="true"] {
  background: var(--liberty-nav-active, #eff6ff);
  color: var(--brand-primary, #00bf9a);
}

.bpmn-tool-btn:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.bpmn-selection-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  margin-left: 0.15rem;
  border-radius: 999px;
  background: var(--brand-primary, #00bf9a);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.bpmn-shortcuts-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background: var(--background-color, #f8fafc);
  color: var(--text-secondary, #64748b);
  font-size: 0.78rem;
  line-height: 1.35;
}

.bpmn-shortcuts-hint kbd {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 4px;
  background: var(--surface-color, #fff);
  color: var(--text-primary, #1e293b);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 600;
}

/* Keep resize grips visible above the canvas chrome */
.bpmn-canvas .djs-resizer,
.bpmn-canvas .djs-resizer-hit {
  z-index: 6;
}

.bpmn-color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00bf9a, #00b6d6 50%, #f59e0b);
  border: 1px solid rgb(0 0 0 / 0.1);
}

.bpmn-color-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  padding: 0.65rem;
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--liberty-radius-sm, 6px);
  box-shadow: var(--liberty-shadow-md);
  min-width: 220px;
}

.bpmn-color-pop__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.bpmn-color-swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.bpmn-color-swatch:hover {
  transform: scale(1.06);
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.15);
}

.bpmn-color-swatch--reset {
  background: repeating-linear-gradient(
    45deg,
    #f8fafc,
    #f8fafc 6px,
    #e2e8f0 6px,
    #e2e8f0 12px
  );
  color: var(--text-secondary, #64748b);
  font-weight: 700;
}

.bpmn-color-pop__custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
}

.bpmn-color-pop__custom input[type="color"] {
  width: 34px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 4px;
  cursor: pointer;
  background: none;
}

.bpmn-viewer-pane {
  position: relative;
  /* Fill the available viewport height beneath header/breadcrumbs/tabs/toolbar. */
  height: calc(100vh - 280px);
  min-height: 640px;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* keep the djs-canvas contained so the palette stays inside */
  border-bottom-left-radius: var(--liberty-radius, 8px);
  border-bottom-right-radius: var(--liberty-radius, 8px);
}

.bpmn-canvas {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

/* Override bpmn-js default white bg with our surface color */
.bpmn-canvas .djs-container {
  background: var(--background-color, #f8fafc);
  width: 100%;
  height: 100%;
}

/* Palette — align with light theme; allow scroll if too many entries */
.bpmn-canvas .djs-palette {
  background: var(--surface-color, #fff) !important;
  border: 1px solid var(--border-color, #e2e8f0) !important;
  border-radius: var(--liberty-radius-sm, 6px) !important;
  box-shadow: var(--liberty-shadow);
  top: 12px !important;
  left: 12px !important;
  max-height: calc(100% - 24px);
}

.bpmn-canvas .djs-palette.open {
  overflow-y: auto;
}

.bpmn-canvas .djs-palette .entry {
  color: var(--text-secondary, #64748b) !important;
  transition: background-color 0.12s, color 0.12s;
}

.bpmn-canvas .djs-palette .entry:hover {
  color: var(--brand-primary, #00bf9a) !important;
  background: var(--liberty-nav-active, #eff6ff) !important;
}

/* Context pad buttons */
.bpmn-canvas .djs-context-pad .entry {
  background: var(--surface-color, #fff) !important;
  border: 1px solid var(--border-color, #e2e8f0) !important;
  color: var(--text-primary, #1e293b) !important;
  border-radius: 4px !important;
  box-shadow: var(--liberty-shadow);
}

.bpmn-canvas .djs-context-pad .entry:hover {
  background: var(--liberty-nav-active, #eff6ff) !important;
  color: var(--brand-primary, #00bf9a) !important;
}

/* Popups (change-type etc.) */
.bpmn-canvas .djs-popup,
.djs-popup {
  background: var(--surface-color, #fff) !important;
  border: 1px solid var(--border-color, #e2e8f0) !important;
  border-radius: var(--liberty-radius-sm, 6px) !important;
  box-shadow: var(--liberty-shadow-md) !important;
  color: var(--text-primary, #1e293b) !important;
}

.djs-popup .entry {
  color: var(--text-primary, #1e293b) !important;
  background: transparent !important;
}

.djs-popup .entry:hover,
.djs-popup .entry.active {
  background: var(--liberty-nav-active, #eff6ff) !important;
  color: var(--brand-primary, #00bf9a) !important;
}

/* Selected element outline */
.bpmn-canvas .djs-element.selected .djs-outline {
  stroke: var(--brand-primary, #00bf9a) !important;
  stroke-width: 2px !important;
}

.bpmn-viewer-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 520px;
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
}

.bpmn-viewer-busy {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: color-mix(in srgb, var(--surface-color, #fff) 78%, transparent);
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
}

.bpmn-spinner {
  display: block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border-color, #e2e8f0);
  border-top-color: var(--brand-primary, #00bf9a);
  border-radius: 50%;
  animation: bpmn-spin 0.8s linear infinite;
}

@keyframes bpmn-spin {
  to {
    transform: rotate(360deg);
  }
}

.bpmn-viewer-error {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 180px;
}

.bpmn-xml-pane {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.bpmn-xml-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  min-height: 420px;
  resize: vertical;
}

.bpmn-xml-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.app-success-banner {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: var(--liberty-radius-sm, 6px);
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  margin: 0.5rem 1rem;
}

/* ============================================================
   PROCESS ARCHITECTURE DIAGRAM (ArquiteturaDiagram)
   ============================================================ */

.arch-diagram {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

/* ---- Toolbar ---- */
.arch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--liberty-radius, 8px);
}

.arch-toolbar__search {
  flex: 1;
  min-width: 180px;
}

.arch-toolbar__stats {
  display: flex;
  gap: 1.25rem;
}

.arch-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.arch-stat__val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
  line-height: 1.2;
}

.arch-stat__lbl {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #64748b);
}

.arch-toolbar__legend {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.arch-legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
}

.arch-legend-dot {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- Swim lanes ---- */
.arch-lanes {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--liberty-radius, 8px);
  overflow: hidden;
}

.arch-lane {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.arch-lane:last-child {
  border-bottom: none;
}

.arch-lane--unlinked .arch-lane__header {
  background: #f8fafc;
}

.arch-lane__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--lane-color, #00bf9a) 8%, white),
    white
  );
  border-left: 4px solid var(--lane-color, #00bf9a);
  cursor: default;
}

.arch-lane__dot {
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.arch-lane__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.arch-lane__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
  line-height: 1.3;
}

.arch-lane__count {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
}

.arch-lane__link {
  font-size: 0.75rem;
  color: var(--brand-primary, #00bf9a);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.arch-lane__link:hover {
  opacity: 1;
  text-decoration: underline;
}

.arch-lane__body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--surface-color, #fff);
  min-height: 5rem;
}

.arch-lane__empty {
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
  font-style: italic;
  align-self: center;
}

/* ---- Process cards ---- */
.arch-process-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  padding-right: 2.1rem;
  width: clamp(160px, 18%, 220px);
  background: var(--background-color, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--liberty-radius-sm, 6px);
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.1s, border-color 0.15s;
  cursor: pointer;
  position: relative;
}

.arch-process-card:hover {
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.1);
  transform: translateY(-2px);
  border-color: var(--brand-primary, #00bf9a);
  background: #fff;
}

.arch-process-card__indicator {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--liberty-radius-sm, 6px) var(--liberty-radius-sm, 6px) 0
    0;
}

.arch-process-card__name {
  margin-top: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  line-height: 1.35;
}

.arch-process-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.arch-process-card__tier {
  position: absolute;
  top: 0.42rem;
  right: 0.5rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-secondary, #64748b);
  opacity: 0.85;
}

.arch-process-stack {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: clamp(160px, 18%, 240px);
}

.arch-process-stack > .arch-process-card {
  width: 100%;
}

.arch-process-stack__subs {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-left: 2px solid var(--border-color, #e2e8f0);
}

.arch-subproc-li {
  margin: 0;
  padding: 0;
}

.arch-subproc-chip {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.45rem 0.45rem 0.38rem 0.35rem;
  border-radius: var(--liberty-radius-sm, 6px);
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
  min-height: 2.25rem;
}

.arch-subproc-chip:hover {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.06);
}

.arch-subproc-chip--solo {
  width: clamp(160px, 18%, 240px);
}

.arch-subproc-chip__ind {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: var(--liberty-radius-sm, 6px) var(--liberty-radius-sm, 6px) 0
    0;
}

.arch-subproc-chip__tier {
  flex-shrink: 0;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-secondary, #64748b);
  margin-top: 0.2rem;
  min-width: 1.35rem;
}

.arch-subproc-chip__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.05rem;
}

.arch-subproc-chip__name {
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary, #1e293b);
}

.arch-subproc-chip__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.arch-lane--orphan .arch-lane__header {
  background: linear-gradient(
    to right,
    color-mix(in srgb, #f59e0b 12%, white),
    #fffbeb
  );
  border-left-color: #f59e0b;
}

.arch-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  font-size: 0.67rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.arch-badge--sm {
  padding: 0.06rem 0.32rem;
  font-size: 0.58rem;
}

/* ============================================================
   DESIGN SYSTEM v2 — UniConecta 2026
   Overrides the base layer above with a modern, consistent,
   icon-aware design language.
   ============================================================ */

/* ---- Tokens v2 ---- */
:root {
  --ds-radius-xs: 4px;
  --ds-radius-sm: 6px;
  --ds-radius-md: 8px;
  --ds-radius-lg: 12px;
  --ds-radius-xl: 16px;
  --ds-radius-pill: 100px;

  --ds-btn-h: 2.25rem; /* 36px  — default button height */
  --ds-btn-h-sm: 1.875rem; /* 30px  — small / row actions */
  --ds-btn-h-lg: 2.75rem; /* 44px  — hero CTAs */

  --ds-shadow-xs: 0 1px 2px rgb(0 0 0 / 0.06);
  --ds-shadow-sm: 0 1px 3px rgb(0 0 0 / 0.08), 0 1px 2px rgb(0 0 0 / 0.06);
  --ds-shadow-md: 0 4px 12px rgb(0 0 0 / 0.1), 0 2px 4px rgb(0 0 0 / 0.06);
  --ds-shadow-lg: 0 12px 32px rgb(0 0 0 / 0.14), 0 4px 8px rgb(0 0 0 / 0.08);

  --ds-focus-ring: 0 0 0 3px rgb(0 191 154 / 0.2);
}

/* ============================================================
   BUTTONS — complete overhaul
   ============================================================ */

.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0 0.875rem;
  height: var(--ds-btn-h);
  border-radius: var(--ds-radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease,
    transform 0.1s ease;
  user-select: none;
  -webkit-user-select: none;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}

.app-btn:focus-visible {
  outline: none;
  box-shadow: var(--ds-focus-ring);
}

.app-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.app-btn .material-icons {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Primary */
.app-btn--primary {
  background: var(--brand-primary, #00bf9a);
  border-color: var(--brand-primary, #00bf9a);
  color: #fff;
  box-shadow:
    var(--ds-shadow-xs),
    0 0 0 0 rgb(0 191 154 / 0);
}
.app-btn--primary:hover:not(:disabled) {
  background: #00a882;
  border-color: #00a882;
  box-shadow:
    var(--ds-shadow-sm),
    0 2px 8px rgb(0 191 154 / 0.28);
}

/* Secondary */
.app-btn--secondary {
  background: #fff;
  border-color: var(--border-color, #e2e8f0);
  color: var(--text-primary, #1e293b);
  box-shadow: var(--ds-shadow-xs);
}
.app-btn--secondary:hover:not(:disabled) {
  background: var(--background-color, #f8fafc);
  border-color: #cbd5e1;
  box-shadow: var(--ds-shadow-sm);
}

/* Ghost — neutral low-emphasis (default for non-destructive icon actions). */
.app-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary, #64748b);
  box-shadow: none;
}
.app-btn--ghost:hover:not(:disabled) {
  background: var(--background-color, #f1f5f9);
  color: var(--text-primary, #1e293b);
  border-color: transparent;
}

/* Destructive variant of ghost — stays neutral, only hints red on hover.
   Pair with .app-btn--ghost for delete/remove icon buttons. */
.app-btn--ghost-danger {
  color: var(--text-secondary, #64748b);
}
.app-btn--ghost-danger:hover:not(:disabled),
.app-btn--ghost-danger:focus-visible {
  background: #fef2f2;
  color: #dc2626;
  border-color: transparent;
}

/* Solid danger */
.app-btn--danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  box-shadow: var(--ds-shadow-xs);
}
.app-btn--danger:hover:not(:disabled) {
  background: #dc2626;
  border-color: #dc2626;
}

/* Size variants */
.app-btn--sm {
  height: var(--ds-btn-h-sm);
  padding: 0 0.625rem;
  font-size: 0.8rem;
  border-radius: var(--ds-radius-sm);
}
.app-btn--sm .material-icons {
  font-size: 0.95rem;
}

.app-btn--lg {
  height: var(--ds-btn-h-lg);
  padding: 0 1.25rem;
  font-size: 0.9375rem;
}

/* Icon-only buttons */
.app-btn--icon {
  width: var(--ds-btn-h);
  padding: 0;
  border-radius: var(--ds-radius-md);
}
.app-btn--icon.app-btn--sm {
  width: var(--ds-btn-h-sm);
}

.app-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   INPUTS & FORM FIELDS
   ============================================================ */

.app-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: min(100%, 14rem);
}

.app-field-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #64748b);
}

.app-input {
  width: 100%;
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: var(--ds-radius-md);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-primary, #1e293b);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.app-input::placeholder {
  color: #94a3b8;
  font-style: italic;
}

.app-input:hover:not(:focus):not(:disabled) {
  border-color: #cbd5e1;
}

.app-input:focus {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: var(--ds-focus-ring);
}

.app-input:disabled {
  background: var(--background-color, #f8fafc);
  color: var(--text-secondary, #64748b);
  cursor: not-allowed;
}

/* Search input with icon */
.app-input[type="search"] {
  padding-left: 2.125rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.625rem center;
  background-size: 1rem;
}

select.app-input {
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
  cursor: pointer;
}

.app-textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: var(--ds-radius-md);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-primary, #1e293b);
  background: #fff;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.app-textarea:focus {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: var(--ds-focus-ring);
}

/* ============================================================
   TABLES
   ============================================================ */

.app-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  table-layout: auto;
}

.app-table thead tr {
  border-bottom: 2px solid var(--border-color, #e2e8f0);
}

.app-table th {
  padding: 0.625rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary, #64748b);
  background: var(--background-color, #f8fafc);
  text-align: left;
  white-space: nowrap;
  border: none;
}

.app-table td {
  padding: 0.75rem 1rem;
  color: var(--text-primary, #1e293b);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  vertical-align: middle;
  border-left: none;
  border-right: none;
  border-top: none;
}

.app-table tbody tr:last-child td {
  border-bottom: none;
}

.app-table tbody tr {
  transition: background-color 0.1s ease;
}

.app-table tbody tr:hover {
  background: color-mix(in srgb, var(--brand-primary) 4%, white);
}

/* ============================================================
   BADGES / CHIPS
   ============================================================ */

.uc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.525rem;
  border-radius: var(--ds-radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1.5px solid transparent;
  line-height: 1.4;
}

.uc-badge .material-icons {
  font-size: 0.875rem;
  line-height: 1;
}

.uc-badge--neutral {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.uc-badge--success {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.uc-badge--info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.uc-badge--warn {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.uc-badge--danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.uc-badge--muted {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
}

.uc-badge--outline {
  background: transparent;
  color: var(--text-secondary, #64748b);
  border-color: var(--border-color, #e2e8f0);
}

/* Semantic status colors */
.uc-badge--primary-teal {
  background: color-mix(in srgb, var(--brand-primary) 12%, white);
  color: var(--brand-primary);
  border-color: color-mix(in srgb, var(--brand-primary) 30%, white);
}

/* ============================================================
   ENTITY PANEL & TOOLBAR
   ============================================================ */

.uc-entity-panel {
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-sm);
  overflow: hidden;
}

.uc-entity-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
  padding: 0.875rem 1.125rem;
  background: #fff;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.uc-entity-toolbar__grow {
  flex: 1;
  min-width: 180px;
}

.uc-entity-toolbar__cta {
  flex-shrink: 0;
}

/* Compact field in toolbar */
.uc-entity-field--compact {
  min-width: 0;
  gap: var(--ds-space-2);
}

.uc-entity-field--compact .app-field-label {
  font-size: 0.65rem;
}

.uc-entity-field--compact .app-input {
  height: 2rem;
  font-size: 0.8375rem;
}

/* Table wrapper inside panel */
.uc-entity-table-wrap {
  overflow-x: auto;
}

.uc-entity-table {
  width: 100%;
}

/* Title cell bold link */
.uc-entity-title-cell {
  font-weight: 600;
  color: var(--brand-dark, #002b49);
}

a.uc-entity-title-cell,
.app-link-strong {
  color: var(--brand-dark, #002b49);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

a.uc-entity-title-cell:hover,
.app-link-strong:hover {
  color: var(--brand-primary, #00bf9a);
  text-decoration: underline;
}

.uc-entity-muted {
  color: var(--text-secondary, #64748b);
  font-size: 0.8375rem;
}

.uc-entity-nowrap {
  white-space: nowrap;
}

.uc-entity-col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.uc-entity-row-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  justify-content: flex-end;
}

/* Compact row action buttons */
.uc-entity-row-actions .app-btn {
  height: var(--ds-btn-h-sm);
  padding: 0 0.625rem;
  font-size: 0.78rem;
  border-radius: var(--ds-radius-sm);
}

.uc-entity-row-actions .app-btn .material-icons {
  font-size: 0.9rem;
}

.uc-entity-body {
  padding: 0;
}

.uc-entity-body--pad {
  padding: var(--ds-space-5) var(--ds-space-6);
}

.uc-entity-empty-filter {
  font-style: italic;
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
}

/* ============================================================
   PAGE CHROME
   ============================================================ */

.app-page {
  padding: 1.25rem 1.5rem 2.5rem;
}

.app-breadcrumbs {
  margin-bottom: 0.875rem;
}

.app-breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
}

.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, #64748b);
  text-decoration: none;
  transition: color 0.15s;
}
.app-breadcrumbs-link:hover {
  color: var(--brand-primary, #00bf9a);
  text-decoration: underline;
}

.app-breadcrumbs-current {
  color: var(--text-primary, #1e293b);
  font-weight: 600;
}

.app-breadcrumbs-sep {
  display: none;
}

.app-page-header {
  margin-bottom: var(--ds-space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.app-page-lead {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary, #64748b);
  max-width: 52rem;
}

.app-page-header-content {
  flex: 1;
  min-width: 0;
}

/* Remove the white "body card" wrapper — content sits directly on gray bg */
.app-page-body {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-6);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  width: 100%;
  min-width: 0;
}

/* Restore card wrapper only for pages that need it */
.app-page-body--card {
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--ds-radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--ds-shadow-sm);
}

/* ============================================================
   NOTIFICATIONS / BANNERS
   ============================================================ */

.app-error-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--ds-radius-md);
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
  font-size: 0.875rem;
  line-height: 1.45;
}

.app-success-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--ds-radius-md);
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  color: #166534;
  font-size: 0.875rem;
  line-height: 1.45;
}

/* ============================================================
   MODALS
   ============================================================ */

.app-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(15 23 42 / 0.5);
  display: grid;
  place-items: center;
  z-index: 80;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

/* Confirm dialogs must sit above entity/form modals (same z-index, later DOM wins). */
.app-modal-backdrop--confirm {
  z-index: 10100;
}

.app-modal {
  width: min(100%, 32rem);
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--ds-radius-xl);
  box-shadow: var(--ds-shadow-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.app-modal--confirm {
  width: min(100%, 28rem);
  padding: 1.125rem;
  gap: 0.875rem;
  border-color: rgb(0 43 73 / 0.12);
  box-shadow: 0 24px 64px rgb(15 23 42 / 0.22), 0 2px 10px rgb(15 23 42 / 0.08);
}

.app-modal-confirm-head {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.app-modal-confirm-icon {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 8px;
  background: rgb(0 43 73 / 0.08);
  color: var(--brand-dark, #002b49);
  font-size: 1.2rem !important;
}

.app-modal--confirm-danger .app-modal-confirm-icon {
  background: #fef2f2;
  color: #dc2626;
}

.app-modal-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
  line-height: 1.3;
}

.app-modal-message {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.55;
  white-space: pre-line;
  max-height: min(40vh, 16rem);
  overflow: auto;
}

.app-modal-message--stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  white-space: normal;
}

.app-modal-message--stack p {
  margin: 0;
  white-space: pre-line;
}

.app-modal-prompt {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.app-modal--confirm .app-modal-actions {
  gap: 0.625rem;
  margin-top: 0;
  padding-top: 0.875rem;
}

@media (max-width: 480px) {
  .app-modal--confirm {
    padding: 1rem;
  }

  .app-modal--confirm .app-modal-actions {
    flex-direction: column-reverse;
  }

  .app-modal--confirm .app-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Análise Quantitativa: edit modal (fixed shell + inner scroll) ───────── */

.qa-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  overflow: hidden;
}

.qa-modal {
  width: min(720px, 100%);
  max-height: min(92dvh, 44rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--surface-card, #fff);
  border-radius: 0.75rem;
  box-shadow: 0 20px 50px rgb(15 23 42 / 0.22);
}

.qa-modal__header {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}

.qa-modal__title-block {
  min-width: 0;
}

.qa-modal__header h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

.qa-modal__context {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.4;
}

.qa-modal__context a {
  color: var(--brand-primary, #00bf9a);
  text-decoration: none;
  font-weight: 600;
}

.qa-modal__context a:hover {
  text-decoration: underline;
}

.qa-modal__tabs {
  flex: none;
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 1.25rem 0;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  background: var(--surface-card, #fff);
}

.qa-modal__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5625rem 0.75rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  white-space: nowrap;
}

.qa-modal__tab .material-icons {
  font-size: 1.0625rem;
}

.qa-modal__tab:hover {
  color: var(--text-primary, #0f172a);
}

.qa-modal__tab.is-active {
  color: var(--brand-dark, #002b49);
  border-bottom-color: var(--brand-primary, #00bf9a);
}

.qa-modal__tab-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #8b5cf6;
}

.qa-modal__error {
  flex: none;
  margin: 0.75rem 1.25rem 0;
  padding: 0.5rem 0.75rem;
  background: #fef2f2;
  border: 1px solid #dc2626;
  border-radius: 0.375rem;
  color: #991b1b;
  font-size: 0.875rem;
}

.qa-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.qa-modal__pane {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.qa-modal__section h3 {
  margin: 0 0 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary, #64748b);
}

.qa-modal__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.qa-modal__grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qa-modal__grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.qa-modal__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.qa-modal__field--full {
  grid-column: 1 / -1;
}

.qa-modal__field .app-input {
  width: 100%;
}

.qa-modal__preset {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  background: var(--surface-secondary, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  font-size: 0.8125rem;
}

.qa-modal__preset strong {
  font-size: 0.875rem;
}

.qa-modal__preset span {
  color: var(--text-secondary, #64748b);
}

.qa-modal__hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.45;
}

.qa-modal__details {
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 0.5rem;
  background: var(--surface-secondary, #f8fafc);
  padding: 0 0.875rem 0.875rem;
}

.qa-modal__details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary, #64748b);
  user-select: none;
}

.qa-modal__details > summary::-webkit-details-marker {
  display: none;
}

.qa-modal__details > summary::after {
  content: "expand_more";
  font-family: "Material Icons";
  font-size: 1.125rem;
  margin-left: auto;
  color: #94a3b8;
}

.qa-modal__details[open] > summary::after {
  content: "expand_less";
}

.qa-modal__accordion {
  border: 1px solid #c7d2fe;
  border-radius: 0.5rem;
  background: #f5f3ff;
  overflow: hidden;
}

.qa-modal__accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.875rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #4338ca;
  cursor: pointer;
  text-align: left;
}

.qa-modal__accordion-trigger .material-icons:last-child {
  margin-left: auto;
  color: #6d28d9;
}

.qa-modal__accordion-body {
  padding: 0 0.5rem 0.5rem;
}

.qa-modal__accordion-body > div {
  margin-bottom: 0 !important;
}

.qa-modal__footer {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid var(--border-light, #e2e8f0);
  background: var(--surface-card, #fff);
}

.qa-modal__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  min-width: 0;
}

.qa-modal__metrics > span {
  display: inline-flex;
  flex-direction: column;
  gap: 0.0625rem;
  min-width: 4.5rem;
}

.qa-modal__metrics em {
  font-style: normal;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary, #64748b);
}

.qa-modal__metrics b {
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #0f172a);
}

.qa-modal__actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

@media (max-width: 640px) {
  .qa-modal-backdrop {
    padding: 0;
    align-items: stretch;
  }

  .qa-modal {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }

  .qa-modal__grid,
  .qa-modal__grid--2,
  .qa-modal__grid--4 {
    grid-template-columns: 1fr;
  }

  .qa-modal__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .qa-modal__actions {
    margin-left: 0;
  }

  .qa-modal__actions .app-btn {
    flex: 1;
    justify-content: center;
  }
}

/* Entity modal override */
.uc-entity-modal--form {
  width: min(100%, 40rem);
  max-height: min(90vh, 46rem);
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  gap: 0;
}

.uc-entity-modal__hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.375rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.uc-entity-modal__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
  line-height: 1.3;
}

.uc-entity-modal__close {
  display: grid;
  place-items: center;
  margin-left: auto;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: var(--ds-radius-sm);
  background: var(--background-color, #f8fafc);
  color: var(--text-secondary, #64748b);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.uc-entity-modal__close:hover {
  background: #fee2e2;
  color: #dc2626;
}

.uc-entity-modal__lead {
  margin: 0.5rem 0 0.875rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.5;
}

.uc-entity-modal__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.875rem;
}

.uc-entity-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

/* Ações hub — Monday-style action modal: big title, meta row, underline tabs */
.app-modal-backdrop:has(
  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
) {
  padding: 0.75rem;
}

.app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"] {
  width: min(92rem, calc(100vw - 1.5rem));
  height: min(96dvh, 62rem);
  max-height: min(96dvh, 62rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem 1.75rem 1.25rem;
}

/* Dialog header becomes a slim eyebrow row ("EDITAR AÇÃO" + close) */
.app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
  .uc-entity-modal__hdr {
  flex-shrink: 0;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
  .uc-entity-modal__title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary, #94a3b8);
}

.app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
  .uc-entity-modal__form.acoes-modal-form--tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.15rem;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.acoes-modal-hero {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.1rem 0 0.85rem;
}

.acoes-modal-essentials {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.15rem 0 1rem;
}

.acoes-modal-titlebar {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.acoes-modal-titlebar__actions {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding-top: 0.15rem;
}

.acoes-modal-share-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgb(0 191 154 / 0.28);
  border-radius: 10px;
  background: rgb(0 191 154 / 0.08);
  color: var(--brand-secondary, #002b49);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.15s;
}

.acoes-modal-share-btn:hover {
  background: rgb(0 191 154 / 0.14);
  border-color: var(--brand-primary, #00bf9a);
  transform: translateY(-1px);
}

.acoes-modal-share-btn:focus-visible {
  outline: 3px solid rgb(0 191 154 / 0.22);
  outline-offset: 2px;
}

.acoes-modal-share-btn .material-icons {
  font-size: 1rem;
  color: var(--brand-primary, #00bf9a);
}

.acoes-modal-share-btn--copied {
  border-color: rgb(22 163 74 / 0.4);
  background: rgb(22 163 74 / 0.1);
  color: #166534;
}

.acoes-modal-share-btn--copied .material-icons {
  color: #16a34a;
}

.acoes-modal-edit-details {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  color: var(--text-secondary, #64748b);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.acoes-modal-edit-details:hover {
  border-color: var(--brand-primary, #00bf9a);
  background: rgb(0 191 154 / 0.06);
  color: var(--brand-secondary, #002b49);
}

.acoes-modal-edit-details:focus-visible {
  outline: 3px solid rgb(0 191 154 / 0.18);
  outline-offset: 2px;
}

.acoes-modal-edit-details .material-icons {
  font-size: 1rem;
}

/* Full-width wrapping title — grows with content; no stray scrollbar */
.acoes-modal-title-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin-left: -0.5rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--brand-dark, #002b49);
  outline: none;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-height: 2.4rem;
  max-height: 7.5rem;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.acoes-modal-title-input.is-scrollable {
  overflow-y: auto;
}

.acoes-modal-title-input::placeholder {
  color: #cbd5e1;
  font-weight: 600;
}

.acoes-modal-title-input:hover {
  border-color: var(--border-color, #e2e8f0);
}

.acoes-modal-title-input:focus {
  border-color: var(--brand-primary, #00bf9a);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(0 191 154 / 0.12);
}

/* Shareable deep-link strip (Monday/Jira-style) */
.acoes-modal-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgb(0 191 154 / 0.22);
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgb(0 191 154 / 0.08) 0%,
    rgb(0 43 73 / 0.04) 55%,
    #fff 100%
  );
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.7) inset;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.acoes-modal-share--copied {
  border-color: rgb(22 163 74 / 0.45);
  background: linear-gradient(
    135deg,
    rgb(22 163 74 / 0.1) 0%,
    rgb(0 191 154 / 0.06) 55%,
    #fff 100%
  );
  box-shadow: 0 0 0 3px rgb(22 163 74 / 0.1);
}

.acoes-modal-share__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: rgb(0 43 73 / 0.92);
  color: #fff;
  box-shadow: 0 6px 14px rgb(0 43 73 / 0.18);
}

.acoes-modal-share__icon .material-icons {
  font-size: 1.1rem;
}

.acoes-modal-share__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.acoes-modal-share__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-secondary, #002b49);
}

.acoes-modal-share__url {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
  background: transparent;
}

.acoes-modal-share__hint {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted, #64748b);
}

.acoes-modal-share__copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.85rem;
  border: none;
  border-radius: 10px;
  background: var(--brand-primary, #00bf9a);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
  box-shadow: 0 8px 18px rgb(0 191 154 / 0.28);
}

.acoes-modal-share__copy:hover {
  background: #00a887;
  transform: translateY(-1px);
}

.acoes-modal-share__copy:focus-visible {
  outline: 3px solid rgb(0 191 154 / 0.28);
  outline-offset: 2px;
}

.acoes-modal-share__copy .material-icons {
  font-size: 1rem;
}

.acoes-modal-share--copied .acoes-modal-share__copy {
  background: #16a34a;
  box-shadow: 0 8px 18px rgb(22 163 74 / 0.28);
}

/* Option B "document flow": the essentials are one wrapping property
   bar, not stacked rows. Compact fields (status, priority, responsáveis,
   dates) cluster inline; the long selects (oportunidade, processo,
   projeto) drop below and stretch wide so their labels show in full. */
.acoes-modal-essentials__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem 0.85rem;
}

/* Flatten the semantic row wrappers so each meta field becomes a direct
   item of the wrapping bar (keeps the markup/controls untouched). */
.acoes-modal-essentials__row {
  display: contents;
}

/* Compact properties — sized to content, cluster on the first lines. */
.acoes-modal-meta--status {
  flex: 0 1 10rem;
}

.acoes-modal-meta--priority {
  flex: 0 1 9rem;
}

.acoes-modal-meta--assignee {
  flex: 0 1 auto;
  min-width: 10rem;
}

.acoes-modal-meta--date {
  flex: 0 1 12rem;
}

/* Long-text selects — pushed below the compact cluster (order:1) with
   room to show their full labels. Oportunidade takes its own line;
   processo + projeto sit side by side on wide modals, stack when narrow. */
.acoes-modal-meta--improvement {
  flex: 1 1 100%;
  order: 1;
}

.acoes-modal-meta--process,
.acoes-modal-meta--project {
  flex: 1 1 18rem;
  min-width: 14rem;
  order: 1;
}

.acoes-modal-meta,
.acoes-modal-essentials__grid .app-field {
  min-width: 0;
  gap: 0.35rem;
}

.acoes-modal-essentials__grid .app-field-label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.acoes-modal-essentials__grid .app-input {
  width: 100%;
  height: 2.35rem;
  padding-inline: 0.65rem;
  font-size: 0.875rem;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.acoes-modal-essentials__grid select.app-input {
  padding-right: 1.75rem;
  text-overflow: ellipsis;
}

.acoes-modal-essentials__grid .app-input:focus {
  background: #fff;
}

/* Prazo + estimativa — dates paired on one row, effort below */
.acoes-modal-planning {
  flex: 1 1 100%;
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
}

.acoes-modal-planning__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.acoes-modal-planning__head .material-icons {
  font-size: 1rem;
  color: #6366f1;
}

.acoes-modal-planning__grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.acoes-modal-planning__dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.acoes-modal-planning .app-field {
  gap: 0.35rem;
  min-width: 0;
}

.acoes-modal-planning .acoes-modal-meta--date {
  flex: none;
}

.acoes-modal-planning .app-field-label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.acoes-modal-planning .app-input {
  width: 100%;
  height: 2.35rem;
  padding-inline: 0.65rem;
  font-size: 0.875rem;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.acoes-modal-planning .app-input:focus {
  background: #fff;
}

.acoes-modal-meta--hours {
  min-width: 0;
  width: 100%;
  max-width: 11rem;
}

.acoes-modal-hours-input {
  position: relative;
  display: flex;
  align-items: stretch;
}

.acoes-modal-hours-input__field {
  padding-right: 2rem !important;
  font-variant-numeric: tabular-nums;
}

.acoes-modal-hours-input__suffix {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  pointer-events: none;
}

.acoes-plan-insight {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.15rem;
}

.acoes-plan-insight__metrics {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
}

.acoes-plan-insight__metric {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 4.5rem;
}

.acoes-plan-insight__metric--right {
  text-align: right;
  align-items: flex-end;
}

.acoes-plan-insight__metric-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.acoes-plan-insight__metric-value {
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.acoes-plan-insight__track {
  position: relative;
  height: 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.acoes-plan-insight__fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  transition: width 0.35s ease;
}

.acoes-plan-insight__over {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #f97316, #ef4444);
  transition: width 0.35s ease;
}

.acoes-plan-insight--over .acoes-plan-insight__fill {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.acoes-plan-insight--under .acoes-plan-insight__fill {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.acoes-plan-insight__status,
.acoes-plan-insight__hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}

.acoes-plan-insight__status .material-icons,
.acoes-plan-insight__hint .material-icons {
  font-size: 0.95rem;
}

.acoes-plan-insight--over .acoes-plan-insight__status {
  color: #c2410c;
}

.acoes-plan-insight--under .acoes-plan-insight__status {
  color: #047857;
}

.acoes-plan-insight--on_track .acoes-plan-insight__status {
  color: #6366f1;
}

.acoes-plan-insight__variance {
  font-weight: 600;
}

.acoes-plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.acoes-plan-chip .material-icons {
  font-size: 0.85rem;
}

.acoes-plan-chip__sep {
  opacity: 0.45;
  font-weight: 400;
}

.acoes-plan-chip__tracked {
  color: #334155;
}

.acoes-plan-chip--none {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.acoes-plan-chip--over {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.acoes-plan-chip--under {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.acoes-plan-chip--on_track {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

@media (max-width: 640px) {
  .acoes-modal-planning {
    padding: 0.8rem 0.85rem;
    gap: 0.7rem;
  }

  .acoes-modal-planning__dates {
    gap: 0.65rem 0.75rem;
  }

  .acoes-modal-meta--hours {
    max-width: 100%;
  }

  .acoes-plan-insight__metrics {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .acoes-plan-insight__metric--right {
    text-align: left;
    align-items: flex-start;
  }

  .acoes-plan-insight__track {
    order: 3;
  }
}

@media (max-width: 380px) {
  .acoes-modal-planning__dates {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Branded custom dropdown (BrandedSelect)
   ============================================================ */
.branded-select {
  position: relative;
  width: 100%;
}

.branded-select__trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.3rem 0.6rem 0.3rem 0.7rem;
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: var(--ds-radius-md, 10px);
  background: #f8fafc;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-primary, #1e293b);
  text-align: left;
  cursor: pointer;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.branded-select__trigger:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: #fff;
}

.branded-select__trigger:focus-visible,
.branded-select__trigger--open {
  border-color: var(--brand-primary, #00bf9a);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(0 191 154 / 0.12);
}

.branded-select__trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Empty-state placeholder (no records of this kind yet) */
.branded-select__empty-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.3rem 0.6rem 0.3rem 0.7rem;
  border: 1.5px dashed #d6dde6;
  border-radius: var(--ds-radius-md, 10px);
  background: #f8fafc;
  font-size: 0.82rem;
  color: #94a3b8;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.branded-select__empty-field:hover {
  border-color: var(--brand-primary, #00bf9a);
  background: #fff;
  color: #475569;
}

.branded-select__empty-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branded-select__empty-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-primary, #00bf9a);
}

.branded-select__empty-cta .material-icons {
  font-size: 1rem;
}

.branded-select__empty-field .branded-select__lead {
  color: #94a3b8;
}

.branded-select__lead {
  flex-shrink: 0;
  font-size: 1.15rem;
  color: var(--brand-primary, #00bf9a);
}

.branded-select__trigger:not(.branded-select__trigger--set)
  .branded-select__lead {
  color: #94a3b8;
}

.branded-select__value {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.branded-select__value-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.branded-select__value-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
}

.branded-select__placeholder {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
}

.branded-select__chevron {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: #94a3b8;
  transition: transform 0.18s ease, color 0.15s ease;
}

.branded-select__trigger--open .branded-select__chevron {
  transform: rotate(180deg);
  color: var(--brand-primary, #00bf9a);
}

/* Popover ------------------------------------------------- */
.branded-select__pop {
  position: fixed;
  z-index: 2147483600;
  display: flex;
  flex-direction: column;
  max-height: min(28rem, calc(100dvh - 1.5rem));
  padding: 0.4rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 18px 48px -12px rgb(15 23 42 / 0.28),
    0 2px 8px rgb(15 23 42 / 0.08);
  animation: branded-select-in 0.14s ease;
}

.branded-select__pop--search {
  max-height: min(32rem, calc(100dvh - 1.5rem));
}

.branded-select__pop--up {
  transform-origin: bottom;
}

@keyframes branded-select-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.branded-select__search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.55rem;
  margin-bottom: 0.3rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 9px;
  background: #f8fafc;
}

.branded-select__search:focus-within {
  border-color: var(--brand-primary, #00bf9a);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(0 191 154 / 0.1);
}

.branded-select__search .material-icons {
  font-size: 1.05rem;
  color: #94a3b8;
}

.branded-select__search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-primary, #1e293b);
}

.branded-select__search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.branded-select__header {
  margin-bottom: 0.4rem;
}

.branded-select__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  scrollbar-width: thin;
}

.branded-select__group + .branded-select__group {
  margin-top: 0.25rem;
}

.branded-select__group-label {
  margin: 0.25rem 0.55rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.branded-select__row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.55rem;
  border: none;
  border-radius: 9px;
  background: none;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-primary, #1e293b);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.branded-select__row--hl {
  background: #f1f5f9;
}

.branded-select__row--active {
  background: rgb(0 191 154 / 0.1);
  color: var(--brand-secondary, #002b49);
}

.branded-select__row--active.branded-select__row--hl {
  background: rgb(0 191 154 / 0.16);
}

.branded-select__row-ico {
  flex-shrink: 0;
  font-size: 1.2rem;
  color: var(--brand-primary, #00bf9a);
}

.branded-select__row--none .branded-select__row-ico,
.branded-select__row--none {
  color: var(--text-secondary, #64748b);
}

.branded-select__row-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.branded-select__row-label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.branded-select__row-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
}

.branded-select__mark {
  padding: 0 0.08em;
  border-radius: 3px;
  background: #fef3c7;
  color: inherit;
  font-weight: 800;
}

.branded-select__count {
  flex: none;
  margin: 0.35rem 0.45rem 0.1rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border-light, #e2e8f0);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.branded-select__row-badge {
  flex-shrink: 0;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgb(0 191 154 / 0.14);
  color: #047857;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.branded-select__row-check {
  flex-shrink: 0;
  font-size: 1.15rem;
  color: var(--brand-primary, #00bf9a);
}

.branded-select__empty {
  margin: 0;
  padding: 1rem 0.75rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary, #64748b);
}

/* Scope toggle (Do processo / Todos) ---------------------- */
.branded-select-scope {
  display: flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 10px;
  background: #f1f5f9;
}

.branded-select-scope__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.35rem 0.4rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.branded-select-scope__btn .material-icons {
  font-size: 1rem;
}

.branded-select-scope__btn:hover {
  color: var(--text-primary, #1e293b);
}

.branded-select-scope__btn[data-active="true"] {
  background: #fff;
  color: var(--brand-primary, #00bf9a);
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.12);
}

.acoes-modal-textarea {
  min-height: 5rem;
  line-height: 1.5;
  resize: vertical;
}

.acoes-modal-textarea--lg {
  min-height: 6.5rem;
}

/* Monday-style horizontal tabs with underline */
.acoes-modal-tabs {
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.acoes-modal-tabs::-webkit-scrollbar {
  display: none;
}

.acoes-modal-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.9rem;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  margin-bottom: -1px;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
  min-height: 2.75rem;
  color: var(--text-secondary, #64748b);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.acoes-modal-tab .material-icons {
  flex-shrink: 0;
  font-size: 1.1rem;
}

.acoes-modal-tab:hover {
  color: var(--text-primary, #0f172a);
  background: #f8fafc;
}

.acoes-modal-tab--active {
  color: var(--brand-primary, #00bf9a);
  border-bottom-color: currentColor;
  background: transparent;
}

.acoes-modal-tab__badge {
  flex-shrink: 0;
  min-width: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.acoes-modal-tab--active .acoes-modal-tab__badge {
  background: rgb(0 191 154 / 0.14);
  color: var(--brand-primary, #00bf9a);
}

.acoes-modal-tabpanes {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.1rem 1rem 1.25rem;
  scroll-padding-bottom: 1.25rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #fbfdff;
  scrollbar-gutter: stable;
}

.acoes-modal-tabpane {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.acoes-modal-tabpane[hidden] {
  display: none;
}

.acoes-modal-tab-stack {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  min-width: 0;
  max-width: 100%;
}

.acoes-modal-tabpane
  :is(.app-field, .acoes-hub-verify, fieldset, details, .acoes-attach) {
  min-width: 0;
  max-width: 100%;
}

.acoes-modal-tabpane :is(.app-input, .app-textarea, select) {
  box-sizing: border-box;
  max-width: 100%;
}

.app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
  .acoes-modal-form__footer {
  flex-shrink: 0;
  background: #fff;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
  .acoes-modal-form__footer
  .uc-entity-modal__actions {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Wide desktop and ultrawide: use the modal as a two-pane workspace.
   Title/share sit full-width above both panes so long names stay readable.
   Core action data stays on the left while the selected tab fills the right. */
@media (min-width: 1180px) and (min-height: 700px) {
  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
    .uc-entity-modal__form.acoes-modal-form--tabs {
    display: grid;
    grid-template-columns: minmax(22rem, 0.85fr) minmax(0, 1.8fr);
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "error error"
      "hero hero"
      "essentials tabs"
      "essentials panes"
      "footer footer";
    column-gap: 1.25rem;
  }

  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
    .app-error-banner {
    grid-area: error;
  }

  .acoes-modal-hero {
    grid-area: hero;
    padding: 0.1rem 0 0.75rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 0.15rem;
  }

  /* Compact share chip beside the title; full strip stays for smaller layouts */
  .acoes-modal-hero .acoes-modal-share {
    display: none;
  }

  .acoes-modal-hero .acoes-modal-share-btn {
    display: inline-flex;
  }

  .acoes-modal-essentials {
    grid-area: essentials;
    min-height: 0;
    padding: 0.55rem 1.25rem 1rem 0.15rem;
    border-right: 1px solid var(--border-color, #e2e8f0);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .acoes-modal-tabs {
    grid-area: tabs;
  }

  .acoes-modal-tabpanes {
    grid-area: panes;
  }

  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
    .acoes-modal-form__footer {
    grid-area: footer;
  }
}

/* Standard desktop/tablet: when a workspace tab is active, collapse the
   property fields. Title/share stay full-width; details is one click away. */
@media (max-width: 1179px), (max-height: 699px) {
  .acoes-modal-form--tabs:not(.acoes-modal-form--active-detalhes)
    .acoes-modal-essentials {
    display: none;
  }

  .acoes-modal-form--tabs:not(.acoes-modal-form--active-detalhes)
    .acoes-modal-hero {
    gap: 0.4rem;
    padding-bottom: 0.55rem;
  }

  .acoes-modal-form--tabs:not(.acoes-modal-form--active-detalhes)
    .acoes-modal-title-input {
    font-size: 1.05rem;
  }

  .acoes-modal-form--tabs:not(.acoes-modal-form--active-detalhes)
    .acoes-modal-edit-details {
    display: inline-flex;
  }

  .acoes-modal-form--tabs:not(.acoes-modal-form--active-detalhes)
    .acoes-modal-share {
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
  }

  .acoes-modal-form--tabs:not(.acoes-modal-form--active-detalhes)
    .acoes-modal-share__hint {
    display: none;
  }

  .acoes-modal-form--tabs:not(.acoes-modal-form--active-detalhes)
    .acoes-modal-share__copy
    span:not(.material-icons) {
    display: none;
  }

  .acoes-modal-form--tabs:not(.acoes-modal-form--active-detalhes)
    .acoes-modal-share__copy {
    min-width: 2.35rem;
    padding: 0.45rem;
  }
}

@media (max-width: 960px) {
  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"] {
    width: min(100%, calc(100vw - 1rem));
    height: min(96dvh, 62rem);
    padding: 1rem 1.25rem 1.1rem;
  }
}

@media (max-width: 640px) {
  .app-modal-backdrop:has(
    .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
  ) {
    align-items: flex-end;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"] {
    width: 100%;
    height: auto;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px));
    min-height: 0;
    border-radius: 16px 16px 0 0;
    padding: 0.85rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
    .uc-entity-modal__form.acoes-modal-form--tabs {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .acoes-modal-title-input {
    font-size: 1.15rem;
  }

  .acoes-modal-titlebar {
    flex-wrap: wrap;
  }

  .acoes-modal-titlebar__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .acoes-modal-share {
    flex-wrap: wrap;
  }

  .acoes-modal-share__copy {
    width: 100%;
  }

  .acoes-modal-essentials {
    gap: 0.7rem;
    padding-bottom: 0.75rem;
  }

  .acoes-modal-tab {
    padding: 0.5rem 0.65rem;
    font-size: 0.78rem;
  }

  .acoes-modal-tabpanes {
    flex: 0 0 auto;
    overflow: visible;
    min-height: auto;
    padding: 0.875rem 0.75rem 1.25rem;
  }

  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
    .acoes-modal-form__footer {
    position: sticky;
    bottom: 0;
    z-index: 1;
    box-shadow: 0 -10px 18px rgb(255 255 255 / 0.92);
  }

  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
    .acoes-modal-form__footer
    .uc-entity-modal__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
    .acoes-modal-form__footer
    .uc-entity-modal__actions
    .app-btn {
    width: 100%;
    justify-content: center;
  }

  .acoes-modal-tabpane .acoes-hub-form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SHORT-VIEWPORT ADAPTATION for the ações modal (height-aware).
   The width breakpoints above never fire on a laptop, because a
   laptop is wide but short. These react to vertical space — and,
   since browser zoom shrinks the CSS-px viewport, they also kick
   in as the user zooms in. Three graceful tiers: compress, then
   single-scroll (narrow) or a left rail (wide).
   ============================================================ */

/* Tier 1 — gentle compression: trim vertical padding/gaps and the
   textarea minimums so more fits before any structural change. */
@media (max-height: 860px) {
  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"] {
    height: min(96dvh, 62rem);
    padding-top: 0.75rem;
    padding-bottom: 0.85rem;
  }

  .acoes-modal-essentials {
    gap: 0.6rem;
    padding-bottom: 0.7rem;
  }

  .acoes-modal-tabpanes {
    padding-top: 0.8rem;
  }

  .acoes-modal-textarea {
    min-height: 3.75rem;
  }

  .acoes-modal-textarea--lg {
    min-height: 5rem;
  }
}

/* Tier 2 — short viewport (laptop, tablet, or strong zoom): collapse to
   ONE natural scroll through title → fields → tabs → content, with the
   footer pinned. Every field keeps the modal's full width, so long
   titles, long select labels, and textareas show as much text as
   possible — while the short meta fields still sit in columns (via the
   width breakpoints) so they don't waste vertical space. This replaces
   the old starved nested scroll pane, and mirrors the ≤640px logic. */
@media (max-height: 699px), (max-height: 760px) and (max-width: 1179px) {
  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
    .uc-entity-modal__form.acoes-modal-form--tabs {
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .acoes-modal-tabpanes {
    flex: 0 0 auto;
    overflow: visible;
    min-height: auto;
  }

  /* Keep the tab bar reachable while scrolling the long content below. */
  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
    .acoes-modal-tabs {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
  }

  .app-modal.uc-entity-modal--form[data-testid="acoes-hub-modal"]
    .acoes-modal-form__footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    box-shadow: 0 -10px 18px rgb(255 255 255 / 0.92);
  }
}

@media (max-width: 420px) {
  .acoes-modal-edit-details span:last-child {
    display: none;
  }

  .acoes-modal-edit-details {
    width: 2.75rem;
    padding-inline: 0;
  }

  .acoes-modal-tabpanes {
    padding-inline: 0.6rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .acoes-subitems-del,
  .acoes-subitems-icon-btn--danger,
  .acoes-hub-subtask-del {
    opacity: 1;
  }

  .acoes-kb-sub-timer-btn {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
  }

  .acoes-kb-sub-timer-badge {
    min-height: 2.25rem;
  }
}

/* ============================================================
   TABS (org-workspace / BPMN / process detail)
   ============================================================ */

.org-workspace-tabs {
  display: flex;
  gap: 0;
  margin-bottom: var(--ds-space-5);
  flex-wrap: wrap;
  border-bottom: 2px solid var(--border-color, #e2e8f0);
  padding-bottom: 0;
}

.uc-entity-panel > .org-workspace-tabs {
  margin-bottom: 0;
  padding-inline: var(--ds-space-5);
}

@media (max-width: 844px) {
  .org-workspace-tabs,
  .page-tabs {
    flex-wrap: wrap;
    overflow: visible;
  }

  .org-tab,
  .page-tab,
  .org-workspace-tabs > .app-btn,
  .org-workspace-tabs > a.app-btn {
    flex: 0 1 auto;
    white-space: normal;
    text-align: left;
    height: auto;
  }

  .auto-kpi-grid,
  .auto-kpi-grid--3 {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    margin: 0;
    padding: 0;
    scroll-snap-type: none;
  }

  .auto-kpi-grid .auto-tile,
  .auto-kpi-grid--3 .auto-tile {
    flex: none;
    max-width: none;
    width: 100%;
  }
}

.org-tab,
.org-workspace-tabs > .app-btn,
.org-workspace-tabs > a.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.625rem 1rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  border-radius: 0;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
  transition: color 0.15s, border-color 0.15s;
}

.org-tab:hover,
.org-workspace-tabs > .app-btn:hover,
.org-workspace-tabs > a.app-btn:hover {
  color: var(--text-primary, #1e293b);
  background: transparent;
  border-color: #cbd5e1;
}

.org-tab--active,
.org-workspace-tabs > .app-btn[aria-pressed="true"],
.org-workspace-tabs > a.app-btn[aria-current="page"] {
  color: var(--brand-primary, #00bf9a);
  border-bottom-color: var(--brand-primary, #00bf9a);
  font-weight: 600;
  background: transparent;
}

/* Cadastros (Organização): secondary tabs + scrollable panel */
.org-cadastros {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.org-cadastros-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 10px;
  background: var(--liberty-surface-muted, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
}

.org-cadastro-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.org-cadastro-tab:hover {
  color: var(--text-primary, #1e293b);
  background: rgb(255 255 255 / 0.65);
}

.org-cadastro-tab--active {
  background: #fff;
  color: var(--brand-primary, #00bf9a);
  font-weight: 600;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
}

.org-cadastros-panel {
  min-height: 12rem;
  max-height: min(70vh, 52rem);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.15rem;
}

@media (max-width: 720px) {
  .org-cadastros-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 0.35rem;
  }

  .org-cadastro-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .org-cadastros-panel {
    max-height: none;
    overflow-y: visible;
    min-height: 0;
  }
}

/* Funções: accordion por área */
.org-funcoes-area__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  transition: background 0.12s;
}

.org-funcoes-area__toggle:hover {
  background: var(--liberty-surface-muted, #f8fafc);
}

.org-funcoes-area__chev {
  flex-shrink: 0;
  transition: transform 0.15s ease;
  color: var(--text-secondary, #64748b);
}

.org-funcoes-area__chev--open {
  transform: rotate(90deg);
}

.org-funcoes-area__name {
  flex: 1;
  min-width: 0;
}

.org-funcoes-area__count {
  flex-shrink: 0;
  font-size: 0.8125rem;
}

.org-funcoes-area__static-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.org-funcoes-area__table {
  margin-top: 0.25rem;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */

.empty-state-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  padding: 3rem 2rem;
  text-align: center;
}

.empty-state-hint .material-icons {
  font-size: 2.5rem;
  color: #cbd5e1;
}

.empty-state-hint__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary, #64748b);
  max-width: 28rem;
  line-height: 1.5;
}

.empty-state-hint__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
}

.empty-state-hint__btn {
  text-decoration: none;
}

/* ============================================================
   SIDEBAR / NAV — minor polish
   ============================================================ */

.app-nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  padding: 0.875rem 1rem 0.25rem;
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--ds-radius-sm);
  margin: 0.0625rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  text-decoration: none;
  transition: background-color 0.12s, color 0.12s;
}

.app-nav-link:hover {
  background: var(--liberty-nav-active, #eff6ff);
  color: var(--text-primary, #1e293b);
}

.app-nav-link--active {
  background: color-mix(in srgb, var(--brand-primary) 10%, white);
  color: var(--brand-primary, #00bf9a);
  font-weight: 600;
}

.app-nav-link--active:hover {
  background: color-mix(in srgb, var(--brand-primary) 15%, white);
  color: var(--brand-primary, #00bf9a);
}

.app-nav-link-icon {
  font-size: 1.25rem !important;
  flex-shrink: 0;
  opacity: 0.85;
}

.app-nav-link--active .app-nav-link-icon {
  opacity: 1;
}

/* ============================================================
   SHORTCUT CARDS (Painel)
   ============================================================ */

.uniconecta-shortcut {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: var(--ds-radius-lg);
  border: 1.5px solid var(--border-color, #e2e8f0);
  background: #fff;
  color: var(--text-primary, #1e293b);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--ds-shadow-xs);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
  cursor: pointer;
}

.uniconecta-shortcut:hover {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow:
    var(--ds-shadow-md),
    0 0 0 3px rgb(0 191 154 / 0.08);
  transform: translateY(-1px);
}

.uniconecta-shortcut .material-icons {
  font-size: 1.5rem;
  color: var(--brand-primary, #00bf9a);
}

/* ============================================================
   PAINEL STATS
   ============================================================ */

.painel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem;
}

.painel-card {
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--ds-radius-lg);
  padding: 1.125rem 1.25rem;
  box-shadow: var(--ds-shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
  overflow: hidden;
}

.painel-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-primary, #00bf9a);
  opacity: 0.7;
}

.painel-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary, #64748b);
}

.painel-card-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* ============================================================
   MISC
   ============================================================ */

.app-muted {
  margin: 0;
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
  line-height: 1.55;
}

.stack-gap {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
}

.app-card {
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--ds-radius-lg);
  padding: 1.125rem 1.25rem;
  box-shadow: var(--ds-shadow-xs);
}

.app-card--tight {
  padding: 0.75rem 1rem;
}

/* ============================================================
   CONFIRM DIALOG
   ============================================================ */

.app-confirm-dialog-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
}

/* ============================================================
   LOADING STATES
   ============================================================ */

.app-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-sweep 1.5s ease infinite;
  border-radius: var(--ds-radius-sm);
}

@keyframes skeleton-sweep {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ============================================================
   SECTION HEADERS within content
   ============================================================ */

.org-section-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #64748b);
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
}

.org-section-title .material-icons {
  font-size: 1rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 640px) {
  .app-page {
    padding: 1rem 1rem 2rem;
  }

  .uc-entity-toolbar {
    padding: 0.75rem;
  }

  .app-table th,
  .app-table td {
    padding: 0.625rem 0.75rem;
  }

  .app-page-title {
    font-size: 1.25rem;
  }
}

/* Listas densas: cartões empilhados no telefone (sem scroll horizontal) */
@media (max-width: 720px) {
  .uc-entity-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .uc-entity-toolbar__grow {
    flex: 1 1 auto !important;
    width: 100%;
    min-width: 0 !important;
  }

  .uc-entity-toolbar > .app-filter-select,
  .uc-entity-toolbar > .app-input,
  .uc-entity-toolbar > select.app-input {
    width: 100%;
    max-width: 100%;
  }

  .uc-entity-toolbar > .app-btn {
    width: 100%;
    justify-content: center;
  }

  .uc-table-cards {
    max-width: 100%;
    overflow-x: hidden;
    padding: 0 0.25rem 0.5rem;
    box-sizing: border-box;
  }

  .uc-table-cards .app-table,
  .uc-table-cards table.app-table {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    border: none;
    background: transparent;
  }

  .uc-table-cards thead {
    display: none;
  }

  .uc-table-cards tbody {
    display: block;
  }

  .uc-table-cards tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
  }

  .uc-table-cards tbody td {
    display: grid;
    grid-template-columns: minmax(4.75rem, 34%) minmax(0, 1fr);
    gap: 0.35rem 0.65rem;
    align-items: start;
    padding: 0.4rem 0 !important;
    border: none !important;
    border-bottom: 1px solid rgb(241 245 249) !important;
    font-size: 0.8125rem;
    vertical-align: top;
    text-align: left !important;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .uc-table-cards tbody tr td:last-child {
    border-bottom: none !important;
  }

  .uc-table-cards tbody td[data-col]::before {
    content: attr(data-col);
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #64748b);
    padding-top: 0.15rem;
    line-height: 1.3;
  }

  .uc-table-cards tbody td.uc-table-cards__actions,
  .uc-table-cards tbody td.uc-entity-col-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    grid-column: 1 / -1;
    padding-top: 0.5rem !important;
    border-bottom: none !important;
  }

  .uc-table-cards tbody td.uc-table-cards__actions::before,
  .uc-table-cards tbody td.uc-entity-col-actions::before {
    display: none !important;
    content: none !important;
  }

  .uc-table-cards .uc-entity-row-actions {
    justify-content: flex-end;
    width: 100%;
  }

  /* Badges inside card cells should not stretch to fill the grid column */
  .uc-table-cards tbody td > .uc-badge {
    justify-self: start;
    width: auto !important;
  }

  /* Multiple badges in a cell: wrap them in a flex row */
  .uc-table-cards tbody td > .uc-badge + .uc-badge {
    margin-top: 0.25rem;
  }
}

/* ============================================================
   MATERIAL ICONS — Ensure consistent sizing
   ============================================================ */

.material-icons {
  font-family: "Material Icons", sans-serif;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  user-select: none;
}

.mi-sm {
  font-size: 1rem !important;
}
.mi-md {
  font-size: 1.25rem !important;
}
.mi-lg {
  font-size: 1.5rem !important;
}
.mi-xl {
  font-size: 2rem !important;
}

/* Spin animation for loading indicators */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.material-icons.spin,
.spin.material-icons {
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* Page header actions area */
.app-page-header-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-shrink: 0;
  padding-top: 0.125rem;
}

/* Slug / code inline display */
code.uc-entity-muted,
.uc-entity-code {
  font-family: ui-monospace, "Cascadia Mono", "Fira Code", monospace;
  font-size: 0.8rem;
  background: var(--background-color, #f8fafc);
  padding: 0.15rem 0.375rem;
  border-radius: 4px;
  border: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-secondary, #64748b);
}

/* ============================================================
   COMPACT DATA TABLES — 44px rows, inline badges, tight spacing
   ============================================================ */

.app-table td {
  padding: 0.5rem 0.875rem;
  line-height: 1.35;
}

.app-table th {
  padding: 0.5rem 0.875rem;
}

/* Prevent badge containers from wrapping to a new line */
.app-table td > .uc-badge,
.uc-entity-row-actions,
.arch-process-card__badges {
  white-space: nowrap;
}

/* Tighter row actions — icon-only 28px squares */
.uc-entity-row-actions {
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.uc-entity-row-actions .app-btn {
  height: 1.875rem;
  padding: 0 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  gap: 0.25rem;
}

/* Icon-only action button variant (no text) */
.uc-entity-row-actions .app-btn--icon,
.app-btn--row-icon {
  width: 1.875rem;
  height: 1.875rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.uc-entity-row-actions .app-btn .material-icons,
.app-btn--row-icon .material-icons {
  font-size: 0.975rem;
  line-height: 1;
}

/* ============================================================
   INLINE FILTER TOOLBAR — no label stacking
   ============================================================ */

.uc-entity-toolbar {
  padding: 0.625rem 1rem;
  gap: 0.5rem;
  align-items: center;
}

/* Filter-only select/input: no label above, just placeholder */
.app-filter-select,
.app-filter-input {
  height: 2rem;
  min-width: 130px;
  max-width: 200px;
  font-size: 0.8125rem;
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  padding: 0 0.625rem;
  background: #fff;
  color: var(--text-primary, #1e293b);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 1.75rem;
}

.app-filter-select:focus,
.app-filter-input:focus {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 0 0 3px rgb(0 191 154 / 0.12);
}

/* Search input in toolbar — compact, with icon */
.app-toolbar-search {
  height: 2rem;
  min-width: 200px;
  flex: 1;
  padding: 0 0.625rem 0 2rem;
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--text-primary, #1e293b);
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E")
    no-repeat 0.5rem center;
  outline: none;
  transition: border-color 0.15s;
}

.app-toolbar-search:focus {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 0 0 3px rgb(0 191 154 / 0.12);
}

.app-toolbar-search::placeholder {
  color: #94a3b8;
}

/* Toolbar divider for grouping */
.app-toolbar-sep {
  width: 1px;
  height: 1.5rem;
  background: var(--border-color, #e2e8f0);
  flex-shrink: 0;
  margin: 0 0.25rem;
}

/* Active filter badge */
.app-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  background: color-mix(in srgb, var(--brand-primary) 12%, white);
  color: var(--brand-primary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1.5px solid color-mix(in srgb, var(--brand-primary) 30%, white);
}

/* ============================================================
   ENTITY LIST VIEW — filters, grouping, saved views
   ============================================================ */

.uc-lv-bar {
  border-bottom: 1px solid var(--liberty-border, #e2e8f0);
  background: linear-gradient(
    180deg,
    rgb(248 250 252 / 0.6),
    rgb(255 255 255 / 1)
  );
}

.uc-lv-bar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  padding: 0.75rem 1.15rem;
}

.uc-lv-bar__row--primary {
  justify-content: space-between;
}

.uc-lv-bar__row--chips {
  padding-top: 0;
  border-top: 1px dashed rgb(226 232 240 / 0.9);
}

.uc-lv-bar__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.5rem;
  flex: 1;
  min-width: 0;
}

.uc-lv-bar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.uc-lv-bar__count {
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
  white-space: nowrap;
}

.uc-lv-filter {
  position: relative;
}

.uc-lv-filter__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2rem;
  min-height: 2rem;
  padding: 0 0.65rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
  white-space: nowrap;
}

.uc-lv-filter__trigger:hover,
.uc-lv-filter__trigger--active {
  border-color: color-mix(in srgb, var(--brand-primary) 45%, #e2e8f0);
}

.uc-lv-filter__trigger--active {
  background: color-mix(in srgb, var(--brand-primary) 6%, white);
}

.uc-lv-filter__label {
  font-weight: 600;
  color: var(--text-primary, #0f172a);
}

.uc-lv-filter__hint {
  color: var(--text-secondary, #94a3b8);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.uc-lv-filter__summary {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--brand-primary, #00bf9a) 70%, #0f172a);
  text-align: left;
}

.uc-lv-filter__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.3rem;
  border-radius: 100px;
  background: var(--brand-primary, #00bf9a);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.uc-lv-filter__icon {
  color: var(--text-secondary, #94a3b8);
}

.uc-lv-filter__chev {
  color: var(--text-secondary, #94a3b8);
}

.uc-lv-filter__search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.45rem 0.5rem;
  border-bottom: 1px solid var(--liberty-border, #e2e8f0);
  margin-bottom: 0.25rem;
}

.uc-lv-filter__search .material-icons {
  color: var(--text-secondary, #94a3b8);
  flex-shrink: 0;
}

.uc-lv-filter__search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.8125rem;
  outline: none;
  color: var(--text-primary, #0f172a);
}

.uc-lv-filter__empty {
  margin: 0.35rem 0.45rem;
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
}

.uc-lv-filter__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 40;
  min-width: 14rem;
  max-width: 20rem;
  max-height: 22rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0.35rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 30px rgb(15 23 42 / 0.12);
}

.uc-lv-filter__menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.45rem 0.5rem;
  border-bottom: 1px solid var(--liberty-border, #e2e8f0);
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.uc-lv-filter__options {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 12rem;
  overflow: auto;
}

.uc-lv-filter__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.45rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
}

.uc-lv-filter__option:hover {
  background: var(--liberty-surface-muted, #f8fafc);
}

.uc-lv-filter__option--checked {
  background: color-mix(in srgb, var(--brand-primary, #00bf9a) 8%, white);
}

.uc-lv-filter__option--all {
  border-bottom: 1px solid var(--liberty-border, #e2e8f0);
  margin-bottom: 0.2rem;
  padding-bottom: 0.5rem;
  font-weight: 600;
}

.uc-lv-filter__option-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uc-lv-filter__option-check {
  color: var(--brand-primary, #00bf9a);
  flex-shrink: 0;
  font-size: 1rem;
}

.uc-lv-filter__footer {
  margin: 0.35rem 0.45rem 0.15rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--liberty-border, #e2e8f0);
  font-size: 0.7rem;
  color: var(--text-secondary, #94a3b8);
  flex-shrink: 0;
}

.acoes-hub-field--project {
  width: 100%;
  min-width: 0;
}

.acoes-hub-field--project .uc-lv-filter,
.acoes-hub-field--project .uc-lv-filter__trigger {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.acoes-filter-drawer .acoes-hub-field--project .uc-lv-filter__menu {
  left: 0;
  right: 0;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.uc-lv-group-select {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.uc-lv-group-select__label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  white-space: nowrap;
}

.uc-lv-group-select__input {
  min-width: 9rem;
}

.uc-lv-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem 0.2rem 0.55rem;
  border-radius: 100px;
  background: color-mix(in srgb, var(--brand-primary) 10%, white);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 25%, white);
  color: var(--text-primary, #0f172a);
  font-size: 0.75rem;
}

.uc-lv-chip--group {
  background: color-mix(in srgb, #6366f1 10%, white);
  border-color: color-mix(in srgb, #6366f1 25%, white);
}

.uc-lv-chip__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  border-radius: 100px;
}

.uc-lv-chip__x:hover {
  color: var(--text-primary, #0f172a);
}

.uc-lv-clear {
  margin-left: auto;
}

.uc-lv-saving {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
}

.uc-lv-views {
  position: relative;
}

.uc-lv-views__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  min-width: 14rem;
  max-width: 18rem;
  padding: 0.35rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 30px rgb(15 23 42 / 0.12);
}

.uc-lv-views__empty {
  margin: 0;
  padding: 0.65rem 0.5rem;
  font-size: 0.8125rem;
}

.uc-lv-views__item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 8px;
}

.uc-lv-views__item--active {
  background: color-mix(in srgb, var(--brand-primary) 8%, white);
}

.uc-lv-views__item-load {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 0.8125rem;
  color: inherit;
  border-radius: 8px;
}

.uc-lv-views__item-load:hover {
  background: var(--liberty-surface-muted, #f8fafc);
}

.uc-lv-views__item-actions {
  display: flex;
  flex-shrink: 0;
}

.uc-lv-views__star {
  color: #f59e0b;
}

.uc-lv-views__menu-foot {
  border-top: 1px solid var(--liberty-border, #e2e8f0);
  margin-top: 0.25rem;
  padding-top: 0.25rem;
}

.entity-group-list {
  padding: 0 0 0.75rem;
}

.entity-group-list--flat .app-table-wrap {
  border-top: none;
}

.entity-group-list__hint {
  font-size: 0.8125rem;
  margin: 0 0 0.5rem;
  padding: 0.65rem 1.15rem 0;
}

.entity-group-list__section {
  border-top: 1px solid var(--liberty-border, #e2e8f0);
}

.entity-group-list__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 1.15rem;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  transition: background 0.12s;
}

.entity-group-list__toggle:hover {
  background: var(--liberty-surface-muted, #f8fafc);
}

.entity-group-list__chev {
  flex-shrink: 0;
  transition: transform 0.15s ease;
  color: var(--text-secondary, #64748b);
}

.entity-group-list__chev--open {
  transform: rotate(90deg);
}

.entity-group-list__name {
  flex: 1;
  min-width: 0;
}

.entity-group-list__count {
  flex-shrink: 0;
  font-size: 0.8125rem;
}

.entity-group-list__body {
  padding-bottom: 0.25rem;
}

.entity-group-list__empty {
  margin: 0;
  padding: 0.35rem 1.15rem 0.75rem;
  font-size: 0.8125rem;
}

@media (max-width: 768px) {
  .uc-lv-bar__row--primary {
    flex-direction: column;
    align-items: stretch;
  }

  .uc-lv-bar__actions {
    justify-content: space-between;
  }
}

/* ============================================================
   NEXO — Copiloto flutuante
   ============================================================ */

.nexo-float-btn {
  position: fixed;
  bottom: 1.5rem;
  left: 1.25rem;
  right: auto;
  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: #fff;
  box-shadow: 0 4px 16px rgb(0 191 154 / 0.4), 0 2px 4px rgb(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 rgb(0 191 154 / 0.5), 0 2px 6px rgb(0 0 0 / 0.12);
}
.nexo-float-btn:active {
  transform: scale(0.96);
}
.nexo-float-btn--active {
  background: var(--brand-dark, #002b49);
}
.nexo-float-btn .material-icons {
  font-size: 1.375rem;
}

/* --- Panel --- */
.nexo-panel {
  position: fixed;
  bottom: 5rem;
  left: 1.25rem;
  right: auto;
  z-index: 60;
  width: min(30rem, calc(100vw - 2rem));
  max-height: min(42rem, calc(100vh - 7rem));
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.16), 0 4px 12px rgb(0 0 0 / 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: nexo-slide-up 0.2s ease;
}
@keyframes nexo-slide-up {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Painel fixado à direita (comportamento tipo painel lateral do Cursor) */
html.nexo-docked {
  --nexo-dock-width: min(22rem, calc(100vw - 1rem));
}
html.nexo-docked .app-shell {
  padding-right: var(--nexo-dock-width);
  transition: padding-right 0.2s ease;
}
@media (min-width: 1024px) {
  .nexo-float-btn,
  .nexo-panel:not(.nexo-panel--docked) {
    left: calc(14.5rem + 1.25rem);
  }
}

.nexo-panel--docked {
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: var(--nexo-dock-width, min(22rem, calc(100vw - 1rem)));
  max-height: none;
  height: 100dvh;
  border-radius: 0;
  border-left: 1px solid var(--border-color, #e2e8f0);
  border-top: none;
  border-right: none;
  border-bottom: none;
  box-shadow: -8px 0 32px rgb(0 0 0 / 0.08);
  animation: none;
}
.nexo-panel--docked .nexo-panel__conversation {
  min-height: 0;
  flex: 1;
}
.nexo-panel__icon-btn--pinned .material-icons {
  color: var(--brand-primary, #00bf9a);
  transform: rotate(45deg);
}
html.nexo-docked .nexo-toast {
  right: calc(var(--nexo-dock-width) + 1rem);
}
@media (max-width: 52rem) {
  html.nexo-docked {
    --nexo-dock-width: min(19rem, calc(100vw - 1.25rem));
  }
}

/* ---- Mobile (and very narrow) — bottom sheet ---- */
@media (max-width: 40rem) {
  /* Undock on small screens — dock would eat too much horizontal space. */
  html.nexo-docked {
    --nexo-dock-width: 0;
  }
  html.nexo-docked .app-shell {
    padding-right: 0;
  }
  .nexo-panel,
  .nexo-panel--docked {
    position: fixed;
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: min(92dvh, 44rem);
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    border: 1px solid var(--border-color, #e2e8f0);
    border-bottom: none;
    box-shadow: 0 -8px 32px rgb(0 0 0 / 0.18);
  }
  .nexo-panel__header {
    padding: 0.625rem 0.75rem;
  }
  .nexo-panel__skills {
    padding: 0.5rem 0.75rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .nexo-panel__skills::-webkit-scrollbar {
    display: none;
  }
  .nexo-skill-chip {
    flex-shrink: 0;
  }
  .nexo-panel__conversation {
    padding: 0.75rem 0.75rem 0.5rem;
  }
  .nexo-panel__composer {
    padding: 0.5rem 0.625rem calc(0.625rem + env(safe-area-inset-bottom, 0px));
  }
  .nexo-float-btn {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    left: 1rem;
    right: auto;
  }
  .nexo-panel:not(.nexo-panel--docked) {
    left: 0.75rem;
    right: auto;
  }
}

/* Header */
.nexo-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--brand-primary) 8%, white),
    white
  );
}
.nexo-panel__id {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.nexo-panel__avatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--brand-primary) 0%,
    var(--brand-light) 100%
  );
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgb(0 191 154 / 0.35);
}
.nexo-panel__id-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.nexo-panel__id-text strong {
  font-size: 0.875rem;
  color: var(--brand-dark, #002b49);
  line-height: 1.1;
}
.nexo-panel__context-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.08rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 100px;
  background: color-mix(in srgb, var(--brand-primary) 14%, white);
  color: var(--brand-primary, #00bf9a);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 25%, white);
  width: fit-content;
}
.nexo-panel__header-actions {
  display: flex;
  gap: 0.125rem;
}
.nexo-panel__icon-btn {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.nexo-panel__icon-btn:hover {
  background: var(--background-color, #f1f5f9);
  color: var(--brand-dark, #002b49);
}
.nexo-panel__icon-btn .material-icons {
  font-size: 1rem;
}

/* Skills */
.nexo-panel__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  background: #fafcfd;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.nexo-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.6rem;
  border-radius: 100px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-dark, #002b49);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
  white-space: nowrap;
}
.nexo-skill-chip:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand-primary) 8%, white);
  border-color: color-mix(in srgb, var(--brand-primary) 35%, white);
}
.nexo-skill-chip:active:not(:disabled) {
  transform: scale(0.97);
}
.nexo-skill-chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.nexo-skill-chip .material-icons {
  color: var(--brand-primary, #00bf9a);
}

/* Conversation */
.nexo-panel__conversation {
  flex: 1;
  min-height: 10rem;
  overflow-y: auto;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  background: #fff;
}
.nexo-empty {
  text-align: left;
  color: var(--text-secondary, #64748b);
  padding: 0.5rem 0.25rem;
}
.nexo-empty__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
}
.nexo-empty__hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.nexo-msg {
  display: flex;
  gap: 0.5rem;
  max-width: 100%;
}
.nexo-msg--user {
  justify-content: flex-end;
}
.nexo-msg__avatar {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--brand-primary) 0%,
    var(--brand-light) 100%
  );
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.nexo-msg__bubble {
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
  max-width: calc(100% - 2.25rem);
}

/* Markdown inside Nexo bubbles (marked + DOMPurify) */
.nexo-md {
  font-size: inherit;
  line-height: 1.55;
  color: inherit;
  white-space: normal;
  word-break: break-word;
}
.nexo-md--plain {
  white-space: pre-wrap;
}
.nexo-md :is(h1, h2, h3, h4) {
  margin: 0.5rem 0 0.3rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}
.nexo-md h1 {
  font-size: 1.05em;
}
.nexo-md h2 {
  font-size: 1.02em;
}
.nexo-md h3 {
  font-size: 0.98em;
}
.nexo-md p {
  margin: 0.4em 0;
}
.nexo-md p:first-of-type {
  margin-top: 0;
}
.nexo-md p:last-of-type {
  margin-bottom: 0;
}
.nexo-md :is(ul, ol) {
  margin: 0.4em 0;
  padding-left: 1.2rem;
}
.nexo-md li {
  margin: 0.2em 0;
}
.nexo-md li::marker {
  color: var(--brand-primary, #00bf9a);
}
.nexo-md :is(strong, b) {
  font-weight: 700;
}
.nexo-md a {
  color: var(--brand-primary, #00bf9a);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}
.nexo-md blockquote {
  margin: 0.4em 0;
  padding: 0.25rem 0.55rem;
  border-left: 3px solid var(--brand-primary, #00bf9a);
  color: var(--text-secondary, #64748b);
  background: rgb(0 191 154 / 0.08);
  border-radius: 0 6px 6px 0;
}
.nexo-md hr {
  border: 0;
  border-top: 1px solid rgb(15 23 42 / 0.1);
  margin: 0.5rem 0;
}
.nexo-md :is(code):not(pre code) {
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgb(15 23 42 / 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.nexo-md pre {
  margin: 0.45em 0;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  overflow: auto;
  max-width: 100%;
  background: #0b1220;
  color: #e6edf7;
  font-size: 0.8em;
  line-height: 1.4;
  white-space: pre-wrap;
}
.nexo-md pre code {
  background: none;
  padding: 0;
  font-size: 1em;
  color: inherit;
}
.nexo-md table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  margin: 0.45em 0;
}
.nexo-md th,
.nexo-md td {
  border: 1px solid rgb(15 23 42 / 0.12);
  padding: 0.25em 0.4em;
  text-align: left;
  vertical-align: top;
}
.nexo-md th {
  background: rgb(0 191 154 / 0.1);
  font-weight: 700;
}

.nexo-msg--user .nexo-md :is(h1, h2, h3, h4) {
  color: #f8fafc;
}
.nexo-msg--user .nexo-md a {
  color: #6ee7d6;
  font-weight: 600;
}
.nexo-msg--user .nexo-md :is(strong, b) {
  color: #f8fafc;
}
.nexo-msg--user .nexo-md blockquote {
  color: rgb(226 232 240 / 0.92);
  background: rgb(0 0 0 / 0.15);
  border-left-color: #2dd4bf;
}
.nexo-msg--user .nexo-md :is(code):not(pre code) {
  background: rgb(0 0 0 / 0.22);
  color: #e2e8f0;
}
.nexo-msg--user .nexo-md pre {
  background: #020617;
  color: #e2e8f0;
  border: 1px solid rgb(255 255 255 / 0.1);
}
.nexo-msg--user .nexo-msg__bubble {
  background: var(--brand-dark, #002b49);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.nexo-msg--assistant .nexo-msg__bubble {
  background: color-mix(in srgb, var(--brand-primary) 7%, white);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 22%, white);
  color: var(--text-primary, #1e293b);
  border-bottom-left-radius: 4px;
}
.nexo-msg__bubble--thinking {
  padding: 0.75rem 0.9rem;
}

.nexo-typing {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}
.nexo-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-primary, #00bf9a);
  animation: nexo-bounce 1.2s infinite ease-in-out;
}
.nexo-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.nexo-typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes nexo-bounce {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.nexo-error {
  margin: 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}

/* Inline prompt (skills that need input) */
.nexo-inline-prompt {
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding: 0.625rem 0.875rem;
  background: #fafcfd;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nexo-inline-prompt__label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
}
.nexo-inline-prompt__label .material-icons {
  color: var(--brand-primary, #00bf9a);
}
.nexo-inline-prompt__input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.nexo-inline-prompt__input:focus {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 0 0 3px rgb(0 191 154 / 0.12);
}
.nexo-inline-prompt__actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

/* Composer */
.nexo-panel__composer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem 0.75rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  background: #fff;
}
.nexo-composer__input {
  flex: 1;
  min-height: 2.25rem;
  max-height: 8rem;
  padding: 0.5rem 0.7rem;
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  line-height: 1.4;
}
.nexo-composer__input:focus {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 0 0 3px rgb(0 191 154 / 0.12);
}
.nexo-composer__send {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    var(--brand-primary) 0%,
    var(--brand-light) 100%
  );
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.08s, box-shadow 0.12s, filter 0.12s;
}
.nexo-composer__send:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgb(0 191 154 / 0.35);
}
.nexo-composer__send:active:not(:disabled) {
  transform: scale(0.94);
}
.nexo-composer__send:disabled {
  filter: grayscale(0.4);
  opacity: 0.55;
  cursor: not-allowed;
}
.nexo-composer__send .material-icons {
  font-size: 1.1rem;
}

/* Nexo spotlight — visual guidance on the page */
.nexo-spotlight-root {
  position: fixed;
  inset: 0;
  z-index: 10040;
  pointer-events: none;
}
.nexo-spotlight-ring {
  position: fixed;
  border: 2.5px solid var(--brand-primary, #00bf9a);
  border-radius: 10px;
  box-shadow:
    0 0 0 9999px rgb(15 23 42 / 0.42),
    0 0 0 4px rgb(0 191 154 / 0.25),
    0 8px 24px rgb(0 191 154 / 0.35);
  animation: nexo-spotlight-pulse 1.6s ease-in-out infinite;
}
.nexo-spotlight-tooltip {
  position: fixed;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.8125rem;
  line-height: 1.4;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.35);
  z-index: 10041;
}
.nexo-spotlight-tooltip .material-icons {
  color: var(--brand-light, #5eead4);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
@keyframes nexo-spotlight-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 9999px rgb(15 23 42 / 0.42),
      0 0 0 4px rgb(0 191 154 / 0.2),
      0 8px 24px rgb(0 191 154 / 0.3);
  }
  50% {
    box-shadow:
      0 0 0 9999px rgb(15 23 42 / 0.42),
      0 0 0 8px rgb(0 191 154 / 0.45),
      0 12px 32px rgb(0 191 154 / 0.45);
  }
}

/* ============================================================
   CYTOSCAPE ARCHITECTURE CANVAS
   ============================================================ */

.arch-canvas-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
}

.arch-canvas-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  z-index: 2;
}

.arch-canvas {
  width: 100%;
  /* Cresce com a janela; ResizeObserver no island mantém o Cytoscape nítido */
  height: clamp(320px, calc(100dvh - 13.5rem), 1400px);
  min-height: 320px;
  background: #f8fafc;
  background-image: radial-gradient(circle, #c7d2dc 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Canvas legend bar */
.arch-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border-top: 1px solid var(--border-color, #e2e8f0);
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
}
.arch-legend__group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.arch-legend__label {
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  margin-right: 0.25rem;
}
.arch-legend__dot {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.arch-legend__dot::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.arch-legend__sep {
  width: 1px;
  height: 18px;
  background: var(--border-color, #e2e8f0);
}

/* Hierarquia N0 / N1 / N2 (mapa mental — referência entrega iLiberty) */
.arch-hierarchy-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  padding: 0.5rem 1rem 0.65rem;
  background: linear-gradient(to bottom, #f8fafc, #fff);
  border-top: 1px solid var(--border-color, #e2e8f0);
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
}
.arch-hierarchy-strip__title {
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin-right: 0.35rem;
}
.arch-hierarchy-strip__item strong {
  color: var(--brand-dark, #002b49);
  font-weight: 700;
}
.arch-hierarchy-strip__item--muted {
  flex: 1;
  min-width: 12rem;
}
.arch-hierarchy-strip__sep {
  color: #cbd5e1;
  user-select: none;
}

.arch-canvas-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 640px;
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
  gap: 0.5rem;
}

/* Context menu for canvas right-click */
.arch-ctx-menu {
  position: fixed;
  z-index: 200;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
  padding: 0.25rem;
  animation: fade-in 0.1s ease;
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.arch-ctx-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 0.8375rem;
  color: var(--text-primary, #1e293b);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.1s;
}
.arch-ctx-menu-item:hover {
  background: var(--background-color, #f8fafc);
}
.arch-ctx-menu-item--danger {
  color: #ef4444;
}
.arch-ctx-menu-item .material-icons {
  font-size: 1rem;
  color: var(--text-secondary, #64748b);
}
.arch-ctx-menu-item--danger .material-icons {
  color: #ef4444;
}
.arch-ctx-menu-sep {
  height: 1px;
  background: var(--border-color, #e2e8f0);
  margin: 0.25rem 0;
}

/* ============================================================
   VALUE CHAIN DIAGRAM
   ============================================================ */

.value-chain {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
}

.value-chain__band {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.value-chain__band-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary, #64748b);
  padding: 0 0.25rem;
}

.value-chain__row {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
}

.value-chain__block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 0.75rem;
  background: #fff;
  border: 1.5px solid var(--border-color, #e2e8f0);
  color: var(--text-primary, #1e293b);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s, z-index 0s;
  min-height: 72px;
  line-height: 1.3;
  overflow: hidden;
}

.value-chain__block:first-child {
  border-radius: 8px 0 0 8px;
}
.value-chain__block:last-child {
  border-radius: 0 8px 8px 0;
}
.value-chain__block:only-child {
  border-radius: 8px;
}

/* Arrow connector between blocks */
.value-chain__block + .value-chain__block::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid #e2e8f0;
  z-index: 1;
}
.value-chain__block + .value-chain__block::after {
  content: "";
  position: absolute;
  left: 0px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid #fff;
  z-index: 2;
}

.value-chain__block:hover {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 2px 8px rgb(0 191 154 / 0.15);
  z-index: 1;
}

.value-chain__block--primary {
  border-top: 3px solid var(--brand-primary, #00bf9a);
}
.value-chain__block--support {
  border-top: 3px solid var(--brand-light, #00b6d6);
}
.value-chain__block--management {
  border-top: 3px solid var(--brand-dark, #002b49);
}
.value-chain__block--empty {
  border-style: dashed;
  color: var(--text-secondary, #64748b);
  font-weight: 400;
  font-style: italic;
  background: var(--background-color, #f8fafc);
}

.value-chain__count {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-secondary, #64748b);
  margin-top: 0.2rem;
}

/* ============================================================
   VALUE CHAIN — linked flow (Cadeia de Valor)
   ============================================================ */

.vc-root {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vc-root--compact {
  gap: 0.65rem;
}

.vc-lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 52rem;
}

.vc-lead--tight {
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* Mobile: one etapa por vez — evita rolagem longa */
.vc-stepper {
  display: flex;
  gap: 0.3rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: var(--liberty-surface-muted, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.vc-stepper__tab {
  flex: 1 1 0;
  min-width: 4.5rem;
  padding: 0.45rem 0.4rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  white-space: nowrap;
}

.vc-stepper__tab--active {
  background: #fff;
  color: var(--brand-primary, #00bf9a);
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.08);
}

.vc-step-panel {
  min-height: 8rem;
}

.vc-stepper-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.15rem;
}

.vc-board {
  display: grid;
  gap: 0.65rem;
  width: 100%;
  grid-template-columns: 1fr;
  grid-template-areas:
    "mission"
    "v1"
    "hub"
    "v2"
    "vision"
    "v3"
    "outcome";
}

.vc-board__mission {
  grid-area: mission;
}
.vc-board__a1 {
  grid-area: a1;
}
.vc-board__hub {
  grid-area: hub;
}
.vc-board__a2 {
  grid-area: a2;
}
.vc-board__vision {
  grid-area: vision;
}
.vc-board__a3 {
  grid-area: a3;
}
.vc-board__outcome {
  grid-area: outcome;
}
.vc-board__v1 {
  grid-area: v1;
}
.vc-board__v2 {
  grid-area: v2;
}
.vc-board__v3 {
  grid-area: v3;
}

.vc-board__a1,
.vc-board__a2,
.vc-board__a3 {
  display: none;
}

@media (min-width: 1120px) {
  .vc-board {
    grid-template-columns:
      minmax(10.25rem, 1fr) 2.35rem minmax(15rem, 2.85fr) 2.35rem
      minmax(10.25rem, 1fr) 2.35rem minmax(9.25rem, 1fr);
    grid-template-areas: "mission a1 hub a2 vision a3 outcome";
    align-items: stretch;
    gap: 0.5rem 0.25rem;
  }

  .vc-board__a1,
  .vc-board__a2,
  .vc-board__a3 {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .vc-board__v1,
  .vc-board__v2,
  .vc-board__v3 {
    display: none;
  }
}

.vc-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary, #00bf9a);
  opacity: 0.65;
}

.vc-arrow--horizontal .vc-arrow__svg {
  width: 100%;
  max-width: 3rem;
  height: auto;
}

.vc-arrow--vertical {
  padding: 0.15rem 0;
}

.vc-arrow--vertical .vc-arrow__svg {
  width: 1.75rem;
  height: 2.5rem;
}

.vc-arrow__path {
  stroke: currentColor;
}

.vc-pillar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 100%;
  min-height: 11rem;
  padding: 0.85rem 0.95rem 0.8rem;
  border-radius: 14px;
  background: linear-gradient(
    165deg,
    rgb(255 255 255 / 0.98),
    var(--liberty-surface-muted, #f1f5f9)
  );
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: 0 4px 18px rgb(15 23 42 / 0.05);
}

.vc-root--compact .vc-pillar {
  min-height: 0;
}

.vc-pillar__top {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.vc-pillar__headings {
  flex: 1;
  min-width: 0;
}

.vc-pillar--mission {
  border-left: 4px solid var(--brand-dark, #002b49);
}

.vc-pillar--vision {
  border-left: 4px solid var(--brand-light, #00b6d6);
}

.vc-pillar__icon-wrap {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 191 154 / 0.1);
  color: var(--brand-primary, #00bf9a);
}

.vc-pillar--vision .vc-pillar__icon-wrap {
  background: rgb(0 182 214 / 0.12);
  color: var(--brand-light, #00b6d6);
}

.vc-pillar__icon {
  font-size: 1.35rem;
}

.vc-pillar__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}

.vc-pillar__year {
  margin: -0.25rem 0 0;
  font-size: 0.75rem;
}

.vc-pillar__body {
  flex: 1;
  min-height: 3.5rem;
}

.vc-pillar__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-primary, #334155);
}

.vc-pillar__placeholder {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.vc-pillar__cta {
  align-self: flex-start;
  margin-top: auto;
}

.vc-hub {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  min-height: 14rem;
  padding: 1rem 1.1rem 0.85rem;
  border-radius: 16px;
  border: 2px dashed rgb(100 116 139 / 0.35);
  background: linear-gradient(
    180deg,
    rgb(248 250 252 / 0.95),
    rgb(255 255 255 / 0.88)
  );
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.8);
}

.vc-hub--compact {
  min-height: 0;
  padding: 0.65rem 0.7rem 0.55rem;
  border-width: 1px;
  border-style: solid;
  border-color: rgb(226 232 240 / 0.95);
  gap: 0.5rem;
}

.vc-hub--compact::before {
  opacity: 0.5;
}

.vc-hub__details {
  margin: 0;
  padding: 0 0.15rem 0.15rem;
  border: none;
}

.vc-hub__summary {
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  list-style: none;
}

.vc-hub__summary::-webkit-details-marker {
  display: none;
}

.vc-hub__details-body {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
}

.vc-hub::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    rgb(0 191 154 / 0.04),
    transparent 42%,
    rgb(0 182 214 / 0.05)
  );
}

.vc-hub__head,
.vc-hub__lanes,
.vc-hub__foot {
  position: relative;
  z-index: 1;
}

.vc-hub__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgb(148 163 184 / 0.25);
}

.vc-hub--compact .vc-hub__head {
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  padding-bottom: 0.3rem;
}

.vc-hub--compact .vc-hub__chips {
  justify-content: flex-start;
}

.vc-hub__eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-primary, #00bf9a);
  margin-bottom: 0.2rem;
}

.vc-hub__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  line-height: 1.25;
}

.vc-hub--compact .vc-hub__title {
  font-size: 0.95rem;
}

.vc-hub__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.vc-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.vc-chip--mgmt {
  background: rgb(0 43 73 / 0.08);
  color: var(--brand-dark, #002b49);
  border-color: rgb(0 43 73 / 0.15);
}

.vc-chip--core {
  background: rgb(0 191 154 / 0.1);
  color: #047857;
  border-color: rgb(0 191 154 / 0.22);
}

.vc-chip--sup {
  background: rgb(0 182 214 / 0.1);
  color: #0369a1;
  border-color: rgb(0 182 214 / 0.22);
}

.vc-hub__lanes {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.vc-hub--compact .vc-hub__lanes {
  gap: 0.45rem;
}

.vc-hub__foot {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  padding-top: 0.35rem;
}

.vc-lane {
  padding: 0.5rem 0.45rem 0.55rem;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.72);
  border: 1px solid rgb(226 232 240 / 0.9);
}

.vc-hub--compact .vc-lane {
  padding: 0.4rem 0.4rem 0.45rem;
}

.vc-lane--management {
  border-top: 3px solid var(--brand-dark, #002b49);
}

.vc-lane--primary {
  border-top: 3px solid var(--brand-primary, #00bf9a);
}

.vc-lane--support {
  border-top: 3px solid var(--brand-light, #00b6d6);
}

.vc-lane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.vc-lane__title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vc-lane__badge {
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 1.35rem;
  text-align: center;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgb(15 23 42 / 0.06);
  color: var(--text-secondary, #64748b);
}

.vc-lane__hint {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  line-height: 1.35;
}

.vc-lane__row {
  min-height: 0;
}

@media (max-width: 1119px) {
  .vc-lane__row {
    flex-direction: column !important;
    gap: 0.45rem;
    align-items: stretch;
  }

  .vc-lane__row .value-chain__block {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 56px;
    border-radius: 10px !important;
  }

  .vc-lane__row .value-chain__block + .value-chain__block::before,
  .vc-lane__row .value-chain__block + .value-chain__block::after {
    display: none !important;
  }
}

.vc-lane__empty {
  min-height: 52px;
  font-size: 0.78rem !important;
  font-style: normal !important;
  text-align: left !important;
  align-items: flex-start !important;
  padding: 0.65rem 0.75rem !important;
}

.vc-inline-link {
  color: var(--brand-primary, #00bf9a);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vc-inline-link:hover {
  color: var(--brand-dark, #002b49);
}

.vc-macro-card {
  text-align: center;
}

.vc-macro-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.vc-outcome {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  min-height: 11rem;
  padding: 1rem 1rem 0.9rem;
  border-radius: 14px;
  background: linear-gradient(
    145deg,
    rgb(224 242 254 / 0.55),
    rgb(255 255 255 / 0.95)
  );
  border: 1px solid rgb(125 211 252 / 0.55);
  box-shadow: 0 6px 22px rgb(14 165 233 / 0.08);
}

.vc-root--compact .vc-outcome {
  min-height: 0;
  padding: 0.85rem 0.9rem;
}

.vc-outcome__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(14 165 233 / 0.15);
  color: #0369a1;
}

.vc-outcome__icon .material-icons {
  font-size: 1.35rem;
}

.vc-outcome__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

.vc-outcome__stat {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-primary, #334155);
}

.vc-outcome__hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  flex: 1;
}

.vc-outcome__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

/* ============================================================
   ORG MODULE — hero + workbench (Organização tabs)
   ============================================================ */

.org-module-shell {
  min-width: 0;
}

.org-viz {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.org-viz--loading {
  padding: 2rem 1rem;
  text-align: center;
}

.org-viz-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(
    125deg,
    rgb(255 255 255 / 0.98),
    rgb(241 245 249 / 0.85)
  );
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: 0 4px 20px rgb(15 23 42 / 0.04);
}

.org-viz-hero--compact {
  padding: 0.75rem 1rem;
}

.org-viz-hero__main {
  flex: 1;
  min-width: min(100%, 18rem);
}

.org-viz-hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

@media (max-width: 640px) {
  .org-viz-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
  }

  .org-viz-hero__aside {
    align-items: stretch;
  }

  .org-viz-chips {
    justify-content: flex-start;
  }
}

.org-viz-eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand-primary, #00bf9a);
  margin-bottom: 0.2rem;
}

.org-viz-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  line-height: 1.2;
}

.org-viz-hero--compact .org-viz-title {
  font-size: 1.05rem;
}

.org-viz-lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 40rem;
}

.org-viz-hero--compact .org-viz-lead {
  font-size: 0.8125rem;
}

.org-viz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.org-viz-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgb(15 23 42 / 0.06);
  color: var(--text-secondary, #64748b);
  border: 1px solid rgb(148 163 184 / 0.25);
}

.org-viz-chip--accent {
  background: rgb(0 191 154 / 0.12);
  color: #047857;
  border-color: rgb(0 191 154 / 0.28);
}

.org-viz-workbench {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

@media (min-width: 900px) {
  .org-viz-workbench {
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;
  }

  .org-viz-rail {
    flex: 0 0 13.5rem;
  }

  .org-viz-hub {
    flex: 1;
    min-width: 0;
  }
}

.org-viz-rail {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgb(248 250 252 / 0.95);
  border: 1px solid var(--border-color, #e2e8f0);
}

.org-viz-rail__title {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.org-viz-rail__icon {
  font-size: 1.1rem;
  color: var(--brand-primary, #00bf9a);
}

.org-viz-rail__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary, #64748b);
}

.org-viz-rail__list strong {
  color: var(--text-primary, #334155);
}

.org-viz-rail__dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.org-viz-rail__dot--line {
  border-radius: 2px;
  width: 0.5rem;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--brand-primary, #00bf9a),
    #94a3b8
  );
}

.org-viz-rail__mini {
  font-size: 1rem !important;
  vertical-align: middle;
  margin-right: 0.25rem;
  color: var(--brand-primary, #00bf9a);
}

.org-viz-hub {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 16px;
  border: 2px dashed rgb(100 116 139 / 0.32);
  background: linear-gradient(
    180deg,
    rgb(255 255 255 / 0.96),
    rgb(248 250 252 / 0.88)
  );
  overflow: hidden;
  min-height: 420px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.75);
}

.org-viz-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgb(226 232 240 / 0.9);
  background: rgb(255 255 255 / 0.75);
}

.org-viz-toolbar--popover {
  position: relative;
  z-index: 5;
}

.org-viz-toolbar__hint {
  flex: 1;
  min-width: 10rem;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.org-viz-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.org-org-chart-links-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  padding: 0.55rem 0.9rem;
  margin: 0;
  border-bottom: 1px solid rgb(251 191 36 / 0.35);
  background: linear-gradient(
    90deg,
    rgb(254 252 232 / 0.95),
    rgb(255 255 255 / 0.88)
  );
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary, #64748b);
}

.org-org-chart-links-hint__icon {
  font-size: 1.35rem !important;
  color: rgb(180 83 9 / 0.9);
  flex-shrink: 0;
}

.org-org-chart-links-hint__body {
  flex: 1;
  min-width: min(100%, 14rem);
}

.org-org-chart-links-hint__body strong {
  color: var(--text-primary, #334155);
}

.org-org-chart-links-hint__cta {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .org-org-chart-links-hint {
    flex-direction: column;
    align-items: stretch;
  }

  .org-org-chart-links-hint__cta {
    width: 100%;
    justify-content: center;
  }
}

.fg-toolbar .app-toolbar-search {
  flex: 1;
  min-width: 12rem;
  max-width: 100%;
}

.org-viz-stage {
  position: relative;
  flex: 1;
  overflow: auto;
  min-height: 420px;
  width: 100%;
  background:
    linear-gradient(0deg, rgb(248 250 252 / 0.5), rgb(248 250 252 / 0.5)),
    repeating-linear-gradient(
    0deg,
    transparent 0 39px,
    rgb(15 23 42 / 0.035) 39px 40px
  ),
    repeating-linear-gradient(
    90deg,
    transparent 0 39px,
    rgb(15 23 42 / 0.035) 39px 40px
  );
}

/* Organograma: pan+zoom canvas — no scroll, pointer controls the view */
.org-viz-stage--panzoom {
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  min-height: clamp(480px, 62vh, 820px);
  box-sizing: border-box;
  cursor: grab;
  touch-action: none; /* let JS handle pinch/pan */
}

.org-viz-stage--panzoom.org-viz-stage--panning {
  cursor: grabbing;
}

.org-viz-stage-content {
  position: absolute;
  will-change: transform;
}

/* Zoom controls – bottom-right corner of the stage */
.org-viz-zoom-controls {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 10;
  user-select: none;
}

.org-viz-zoom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: #fff;
  border: 1.5px solid rgb(203 213 225);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary, #475569);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  box-shadow: 0 2px 6px rgb(15 23 42 / 0.08);
}

.org-viz-zoom-btn:hover {
  background: rgb(0 191 154 / 0.06);
  border-color: rgb(0 191 154 / 0.55);
  color: #047857;
}

.org-viz-zoom-btn .material-icons {
  font-size: 1.1rem !important;
}

.org-viz-zoom-btn--fit {
  border-radius: 6px;
}

.org-viz-zoom-pct {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  line-height: 1.6;
  letter-spacing: 0.03em;
  background: rgb(255 255 255 / 0.9);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  border: 1px solid rgb(203 213 225 / 0.6);
  margin-top: 2px;
}

.org-viz-edges {
  overflow: visible;
}

.org-viz-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.65rem;
  cursor: grab;
  user-select: none;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1.5px solid rgb(203 213 225);
  border-radius: 10px;
  box-shadow:
    0 2px 6px rgb(15 23 42 / 0.06),
    0 0 0 1px rgb(255 255 255 / 0.8) inset;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.org-viz-node:hover {
  border-color: rgb(0 191 154 / 0.55);
  box-shadow:
    0 4px 14px rgb(0 191 154 / 0.12),
    0 0 0 1px rgb(255 255 255 / 0.9) inset;
}

.org-viz-node__glyph {
  font-size: 1.15rem !important;
  color: var(--brand-primary, #00bf9a);
  flex-shrink: 0;
}

.org-viz-node__label {
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Funcionograma — quadro em canvas (colunas por área) */
.fg-canvas-hub {
  min-height: min(78vh, 52rem);
}

.fg-canvas-hub .org-viz-toolbar {
  border-bottom: 1px solid rgb(226 232 240 / 0.85);
}

.fg-canvas-stage.org-viz-stage--fit {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  min-height: clamp(300px, 56vh, 720px);
}

.fg-canvas-board {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 22px;
  padding: 26px;
  box-sizing: border-box;
  background:
    radial-gradient(
      ellipse 120% 90% at 0% 0%,
      rgb(0 191 154 / 0.09),
      transparent 55%
    ),
    radial-gradient(
    ellipse 90% 70% at 100% 10%,
    rgb(0 182 214 / 0.07),
    transparent 50%
  ),
    linear-gradient(
    168deg,
    rgb(255 255 255 / 0.97),
    rgb(241 245 249 / 0.94)
  );
  border-radius: 0 0 14px 14px;
}

.fg-canvas-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
}

.fg-canvas-col {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.fg-canvas-col__head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: linear-gradient(
    125deg,
    rgb(0 43 73 / 0.07),
    rgb(0 191 154 / 0.09)
  );
  border: 1px solid rgb(148 163 184 / 0.22);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.65) inset;
}

.fg-canvas-col__glyph {
  font-size: 1.35rem !important;
  color: var(--brand-primary, #00bf9a);
  margin-top: 1px;
  flex-shrink: 0;
}

.fg-canvas-col__head-text {
  min-width: 0;
}

.fg-canvas-col__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  line-height: 1.25;
}

.fg-canvas-col__meta {
  margin: 0.12rem 0 0;
  font-size: 0.76rem;
  line-height: 1.35;
}

.fg-canvas-col__stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.fg-canvas-card {
  border-radius: 13px;
  padding: 0.72rem 0.78rem 0.6rem;
  background: linear-gradient(
    180deg,
    rgb(255 255 255 / 0.99),
    rgb(248 250 252 / 0.93)
  );
  border: 1px solid rgb(203 213 225 / 0.78);
  box-shadow:
    0 2px 10px rgb(15 23 42 / 0.045),
    0 0 0 1px rgb(255 255 255 / 0.85) inset;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.fg-canvas-card:hover {
  border-color: rgb(0 191 154 / 0.42);
  box-shadow:
    0 8px 24px rgb(0 191 154 / 0.11),
    0 0 0 1px rgb(255 255 255 / 0.92) inset;
}

.fg-canvas-card__top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.fg-canvas-card__badge-icon {
  font-size: 1.2rem !important;
  color: var(--brand-light, #00b6d6);
  flex-shrink: 0;
}

.fg-canvas-card__name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  line-height: 1.32;
}

.fg-canvas-card__desc {
  margin: 0.35rem 0 0.4rem;
  font-size: 0.8rem;
  line-height: 1.48;
  color: var(--text-secondary, #64748b);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fg-canvas-card__desc--muted {
  font-style: italic;
}

.fg-canvas-card__raci {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-bottom: 0.35rem;
}

.fg-canvas-card__raci-empty {
  font-size: 0.78rem;
}

.fg-canvas-raci-row {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
}

.fg-canvas-raci-row > .uc-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.32rem;
  flex-shrink: 0;
  margin-top: 0.12rem;
}

.fg-canvas-raci-name {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-primary, #334155);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.fg-canvas-raci-remove {
  flex-shrink: 0;
}

.fg-canvas-card__cta {
  width: 100%;
  justify-content: center;
  margin-top: 0.1rem;
}

.fg-canvas-empty {
  text-align: center;
  padding: 1.2rem 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary, #94a3b8);
  border: 1px dashed rgb(148 163 184 / 0.45);
  border-radius: 12px;
  background: rgb(248 250 252 / 0.55);
}

.fg-canvas-empty .material-icons {
  font-size: 1.75rem !important;
  display: block;
  margin: 0 auto 0.35rem;
  opacity: 0.55;
}

.fg-canvas-toolbar {
  position: relative;
  z-index: 5;
  align-items: center;
}

.fg-canvas-legenda-wrap {
  position: relative;
  flex-shrink: 0;
}

.fg-canvas-legenda-popover {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 40;
  width: min(22rem, calc(100vw - 2rem));
  padding: 0.85rem 1rem 0.95rem;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.98);
  border: 1px solid rgb(226 232 240 / 0.95);
  box-shadow:
    0 14px 36px rgb(15 23 42 / 0.14),
    0 0 0 1px rgb(255 255 255 / 0.85) inset;
}

.fg-canvas-legenda-popover__title {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

.fg-canvas-legenda-popover__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary, #64748b);
}

.fg-canvas-legenda-popover__list li {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}

.fg-canvas-legenda-popover__list .material-icons {
  font-size: 1.05rem !important;
  color: var(--brand-primary, #00bf9a);
  flex-shrink: 0;
  margin-top: 1px;
}

.fg-canvas-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.fg-canvas-zoom-label {
  min-width: 2.85rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fg-canvas-viewport {
  margin: 0 auto;
}

@media (max-width: 640px) {
  .fg-canvas-hub {
    min-height: min(70vh, 42rem);
  }

  .fg-canvas-toolbar .app-toolbar-search {
    width: 100%;
    max-width: none;
  }

  .fg-canvas-toolbar__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.fg-lane {
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding: 0.65rem 0 0.5rem;
}

.fg-lane:first-of-type {
  border-top: none;
  padding-top: 0.35rem;
}

.fg-lane__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem 0.5rem;
  margin: 0 0 0.35rem;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgb(248 250 252 / 0.95),
    rgb(255 255 255 / 0.5)
  );
  border: 1px solid rgb(226 232 240 / 0.75);
}

.fg-lane__title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.fg-lane__icon {
  font-size: 1.25rem !important;
  color: var(--brand-light, #00b6d6);
}

.fg-lane__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

.fg-lane__meta {
  font-size: 0.75rem;
}

.fg-lane__table {
  margin: 0 0.25rem;
}

.fg-lane__empty {
  margin: 0;
  padding: 0.5rem 0.85rem 0.85rem;
}

.org-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgb(15 23 42 / 0.45);
  backdrop-filter: blur(3px);
}

.org-modal-card {
  min-width: min(100%, 22rem);
  max-width: 90vw;
  padding: 1.35rem 1.4rem !important;
  border-radius: 14px !important;
  box-shadow:
    0 24px 48px rgb(15 23 42 / 0.18),
    0 0 0 1px rgb(255 255 255 / 0.06) inset !important;
}

.org-modal-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.org-modal-card__lead {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
}

.org-modal-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.arch-diagram.org-viz > .org-viz-hero {
  margin-bottom: 0.25rem;
}

/* ============================================================
   PROCESS DETAIL PAGE
   ============================================================ */

.process-detail {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.process-detail__meta {
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.process-detail__tabs-panel {
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.process-detail__tabs-panel .process-detail__flow-toolbar {
  padding: 0.75rem 1rem 0.5rem;
}

.process-detail__tabs-panel .org-workspace-tabs {
  margin-bottom: 0;
  padding: 0 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  max-width: 100%;
}

.process-detail__tabs-panel .org-tab {
  flex: 0 0 auto;
  white-space: nowrap;
}

.process-detail__tabs-panel .app-page-body--card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 1rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.process-detail__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  min-width: 0;
}

.process-detail__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
  margin: 0;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.process-detail__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.process-detail__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
}

.process-detail__fact {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.process-detail__fact .material-icons {
  font-size: 1rem;
  color: var(--text-secondary, #64748b);
}

.process-detail__fact strong {
  color: var(--text-primary, #1e293b);
}

.process-detail__details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  font-size: 0.875rem;
  min-width: 0;
}

.process-detail__people-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem 1.25rem;
}

.process-detail__people-grid--view {
  grid-column: 1 / -1;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  border: 1px solid rgb(0 43 73 / 0.08);
  background: linear-gradient(
    135deg,
    rgb(0 43 73 / 0.03) 0%,
    rgb(148 163 184 / 0.06) 100%
  );
}

.process-detail__details-view {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

/* ── Gatilho — faixa "quando acontece" ─────────────────────────────────── */
.process-io-trigger {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  border-left: 3px solid #ba7517;
  background: #faeeda;
}

.process-io-trigger > .material-icons {
  font-size: 1.125rem;
  color: #854f0b;
  margin-top: 1px;
}

.process-io-trigger__label {
  margin: 0 0 2px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #854f0b;
}

.process-io-trigger__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #633806;
}

/* ── Entradas / Saídas ─────────────────────────────────────────────────── */
.process-io-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  min-width: 0;
}

.process-io-col {
  min-width: 0;
}

.process-io-col__head {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.process-io-col__head > .material-icons {
  font-size: 1rem;
}

.process-io-col--in .process-io-col__head > .material-icons {
  color: #185fa5;
}

.process-io-col--out .process-io-col__head > .material-icons {
  color: #3b6d11;
}

.process-io-col__title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary, #475569);
}

.process-io-col__count {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: var(--surface-2, #f1f5f9);
  border-radius: 999px;
  padding: 0 0.4rem;
  line-height: 1.45;
}

.process-io-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.process-io-item {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-primary, #1e293b);
}

.process-io-item__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #185fa5;
  background: #e6f1fb;
  border-radius: 4px;
  padding: 1px 0.4rem;
  margin-right: 0.375rem;
  vertical-align: 1px;
}

.process-io-col--out .process-io-item__tag {
  color: #3b6d11;
  background: #eaf3de;
}

.process-io-empty {
  color: #94a3b8;
  font-style: italic;
}

.process-io-empty--block {
  margin: 0;
  font-size: 0.8125rem;
  border: 1px dashed var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 0.5rem 0.625rem;
}

@media (max-width: 720px) {
  .process-detail__details-grid,
  .process-detail__people-grid,
  .process-io-grid {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   AI BPMN Studio — generate / preview / iterate modal
   ════════════════════════════════════════════════════════════════════════ */
.bpmn-studio__overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgb(15 23 42 / 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5vh 2vw;
}

.bpmn-studio {
  width: min(1680px, 96vw);
  height: min(94vh, 940px);
  height: min(94dvh, 1000px);
  background: var(--surface-1, #fff);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgb(15 23 42 / 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bpmn-studio__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background: linear-gradient(
    135deg,
    rgb(0 43 73 / 0.04),
    rgb(29 158 117 / 0.06)
  );
}

.bpmn-studio__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bpmn-studio__title > .material-icons {
  font-size: 1.75rem;
  color: var(--brand-primary, #0f6e56);
}

.bpmn-studio__title h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
}

.bpmn-studio__title p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
}

.bpmn-studio__head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bpmn-studio__model {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #185fa5;
  background: #e6f1fb;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

.bpmn-studio__body {
  flex: 1;
  display: grid;
  /* Diagram takes the bulk; the editor panel is capped so a wide screen
     gives the BPMN as much room as possible. */
  grid-template-columns: minmax(0, 1fr) clamp(300px, 28%, 380px);
  min-height: 0;
}

/* Expanded: hand the whole modal to the diagram. */
.bpmn-studio--diagram-max .bpmn-studio__body {
  grid-template-columns: 1fr;
}
.bpmn-studio--diagram-max .bpmn-studio__panel {
  display: none;
}

.bpmn-studio__preview {
  position: relative;
  min-width: 0;
  background:
    radial-gradient(circle, rgb(15 23 42 / 0.06) 1px, transparent 1px) 0 0 /
    22px 22px,
    var(--surface-2, #f8fafc);
  border-right: 1px solid var(--border-color, #e2e8f0);
}

.bpmn-studio__canvas {
  position: absolute;
  inset: 0;
  /* We handle pan/pinch ourselves; stop the browser from hijacking touch. */
  touch-action: none;
}

/* Floating zoom / expand controls over the diagram. */
.bpmn-studio__zoom {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-color, #e2e8f0);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.12);
}

.bpmn-studio__zoom button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: var(--surface-1, #fff);
  color: var(--text-secondary, #475569);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.bpmn-studio__zoom button:hover {
  background: var(--surface-2, #f1f5f9);
  color: var(--brand-primary, #0f6e56);
}

.bpmn-studio__preview-hint {
  position: absolute;
  left: 0.75rem;
  bottom: 0.6rem;
  z-index: 3;
  margin: 0;
  padding: 0.2rem 0.55rem;
  font-size: 0.6875rem;
  color: var(--text-secondary, #64748b);
  background: rgb(255 255 255 / 0.82);
  border-radius: 999px;
  pointer-events: none;
}

.bpmn-studio__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgb(248 250 252 / 0.82);
  color: var(--text-secondary, #475569);
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

.bpmn-studio__loading .material-icons {
  font-size: 2rem;
  color: var(--brand-primary, #0f6e56);
}

.bpmn-studio__panel {
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 1rem 1.125rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.bpmn-studio__status {
  margin: 0;
  font-size: 0.8125rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.bpmn-studio__status--err {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.bpmn-studio__section h3 {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0 0 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #64748b);
}

.bpmn-studio__section h3 > .material-icons {
  color: var(--brand-primary, #0f6e56);
}

.bpmn-studio__nodes,
.bpmn-studio__conditions,
.bpmn-studio__rules {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bpmn-studio__node {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  border-left: 3px solid #cbd5e1;
  background: var(--surface-1, #fff);
}

.bpmn-studio__node--gatewayExclusive,
.bpmn-studio__node--gatewayParallel {
  border-left-color: #ba7517;
  background: #fffdf7;
}

.bpmn-studio__node-icon {
  margin-top: 0.4rem;
  color: var(--text-secondary, #64748b);
}

.bpmn-studio__node--gatewayExclusive .bpmn-studio__node-icon,
.bpmn-studio__node--gatewayParallel .bpmn-studio__node-icon {
  color: #b45309;
}

.bpmn-studio__node-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.bpmn-studio__node-name {
  font-weight: 500;
}

.bpmn-studio__node-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.bpmn-studio__node-sys {
  flex: 1;
  min-width: 7rem;
  font-size: 0.75rem;
  padding-block: 0.25rem;
}

.bpmn-studio__kind {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.bpmn-studio__kind .material-icons {
  font-size: 0.8125rem;
  line-height: 1;
}

.mi-xs {
  font-size: 0.8125rem !important;
  line-height: 1;
}

.bpmn-studio__lane {
  background: transparent;
  border: 1px solid var(--border-color, #e2e8f0);
}

.bpmn-studio__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.875rem;
}

.bpmn-studio__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-secondary, #475569);
}

.bpmn-studio__legend-dot {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  border: 1.5px solid;
  flex: none;
}

.bpmn-studio__condition {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
}

.bpmn-studio__condition-route {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
}

.bpmn-studio__condition-route .material-icons {
  color: #94a3b8;
}

.bpmn-studio__rule {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.bpmn-studio__rule .app-input {
  flex: 1;
}

.bpmn-studio__refine {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-color, #e2e8f0);
}

.bpmn-studio__instruction {
  width: 100%;
  resize: vertical;
  font-family: inherit;
}

.bpmn-studio__refine-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.bpmn-studio__error {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary, #475569);
}

.bpmn-studio__error .material-icons {
  font-size: 2.5rem;
  color: #dc2626;
}

.bpmn-studio__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  background: var(--surface-2, #f8fafc);
}

.bpmn-studio__foot-hint {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
}

.bpmn-studio__foot-actions {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 900px) {
  .bpmn-studio__body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(200px, 38%) 1fr;
    min-height: 0;
  }
  .bpmn-studio__preview {
    border-right: none;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
  }
}

/* Feature flag: UNICONECTA_EXECUTIVE_BASELINE_ENABLED */
.baseline-panel {
  display: grid;
  gap: 1rem;
}

.baseline-panel__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.baseline-panel__eyebrow,
.baseline-panel__hero p,
.baseline-panel__metric span,
.baseline-panel__impact p,
.baseline-panel__hint {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.baseline-panel__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 700;
}

.baseline-panel__hero h4 {
  margin: 0.2rem 0 0.25rem;
  color: var(--text-primary);
  font-size: 1rem;
}

.baseline-panel__status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  color: var(--baseline-color);
  background: color-mix(in srgb, var(--baseline-color) 10%, white);
  border: 1px solid color-mix(in srgb, var(--baseline-color) 30%, white);
  font-size: 0.78rem;
  font-weight: 700;
}

.baseline-panel__status .material-icons {
  font-size: 1rem;
}

.baseline-panel__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.baseline-panel__metric {
  padding: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}

.baseline-panel__metric strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.baseline-panel__metric--delta strong {
  color: #15803d;
  font-size: 1.25rem;
}

.baseline-panel__metric--late strong {
  color: #dc2626;
}

.baseline-panel__timeline {
  position: relative;
  height: 46px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.baseline-panel__track {
  position: absolute;
  left: 8%;
  right: 18%;
  height: 8px;
  border-radius: 999px;
}

.baseline-panel__track--base {
  top: 12px;
  background: repeating-linear-gradient(
    90deg,
    #94a3b8,
    #94a3b8 8px,
    transparent 8px,
    transparent 14px
  );
  opacity: 0.8;
}

.baseline-panel__track--real {
  top: 27px;
  right: 6%;
  background: linear-gradient(90deg, #00bf9a, #0ea5e9);
}

.baseline-panel__impact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #f8fafc;
}

.baseline-panel__impact-title {
  margin: 0 0 0.25rem;
  color: var(--text-primary) !important;
  font-weight: 700;
}

.baseline-panel__impact ul {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.baseline-panel__impact li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
}

.baseline-panel__impact li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.baseline-panel__impact li strong {
  flex: 0 0 auto;
  color: var(--text-primary);
}

.baseline-panel__freeze {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
}

.baseline-panel__freeze .baseline-panel__hint {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .baseline-panel__hero,
  .baseline-panel__impact,
  .baseline-panel__freeze {
    grid-template-columns: 1fr;
  }

  .baseline-panel__hero {
    display: grid;
  }

  .baseline-panel__grid {
    grid-template-columns: 1fr;
  }
}

.proj-exec {
  container-type: inline-size;
  display: grid;
  gap: 1rem;
}

.proj-exec__kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.proj-exec__kpi {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}

.proj-exec__kpi span,
.proj-exec__kpi small,
.proj-exec__main small,
.proj-exec__reason {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.proj-exec__kpi strong {
  display: block;
  margin: 0.25rem 0;
  color: var(--text-primary);
  font-size: 1.35rem;
  line-height: 1.15;
}

.proj-exec__insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 31rem), 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.proj-exec__chart,
.proj-exec__decision {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}

.proj-exec__chart {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  min-width: 0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

@container (min-width: 76rem) {
  .proj-exec__chart--line {
    grid-column: span 1;
  }

  .proj-exec__chart--bar,
  .proj-exec__chart--doughnut {
    grid-column: span 1;
  }
}

.proj-exec__decision-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
}

.proj-exec__decision-head .material-icons {
  color: #0f766e;
  font-size: 1.05rem;
}

.proj-exec__decision-head small {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
}

.proj-exec__chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.proj-exec__chart-head h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.proj-exec__chart-head span {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
}

.proj-exec__chart-head strong {
  color: var(--text-primary);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.proj-exec__canvas {
  position: relative;
  min-height: clamp(240px, 33cqi, 360px);
}

.proj-exec__canvas canvas {
  width: 100% !important;
  height: 100% !important;
}

.proj-exec__chart--doughnut .proj-exec__canvas {
  min-height: clamp(260px, 34cqi, 380px);
}

.proj-exec__linechart {
  width: 100%;
  min-height: 132px;
  color: #cbd5e1;
}

.proj-exec__linechart line {
  stroke: currentColor;
  stroke-width: 1;
}

.proj-exec__linechart .grid {
  stroke-dasharray: 4 4;
  opacity: 0.75;
}

.proj-exec__linechart polyline {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.proj-exec__linechart .secondary {
  stroke: #94a3b8;
  stroke-dasharray: 6 7;
  stroke-width: 3;
}

.proj-exec__linechart .primary--up {
  stroke: #059669;
}

.proj-exec__linechart .primary--down {
  stroke: #dc2626;
}

.proj-exec__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
}

.proj-exec__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
}

.proj-exec__dot--up {
  background: #059669;
}

.proj-exec__dot--down {
  background: #dc2626;
}

.proj-exec__dot--muted {
  background: #94a3b8;
}

.proj-exec__bars {
  display: grid;
  gap: 0.58rem;
  padding-top: 0.25rem;
}

.proj-exec__barrow {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(5rem, 1.4fr) 3rem;
  align-items: center;
  gap: 0.55rem;
}

.proj-exec__barrow span {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proj-exec__barrow div {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
}

.proj-exec__barrow i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #dc2626);
}

.proj-exec__barrow strong {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.proj-exec__chart--risk {
  min-height: 244px;
}

.proj-exec__donut-wrap {
  display: grid;
  grid-template-columns: minmax(8rem, 0.85fr) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.proj-exec__donut {
  display: grid;
  place-items: center;
  width: min(10rem, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, white 0 55%, transparent 56%),
    conic-gradient(
    #dc2626 0 var(--crit),
    #f59e0b var(--crit) calc(var(--crit) + var(--att)),
    #16a34a calc(var(--crit) + var(--att)) 360deg
  );
}

.proj-exec__donut strong,
.proj-exec__donut span {
  grid-area: 1 / 1;
}

.proj-exec__donut strong {
  margin-top: -0.7rem;
  color: var(--text-primary);
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
}

.proj-exec__donut span {
  margin-top: 1.6rem;
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 800;
}

.proj-exec__risk-legend {
  display: grid;
  gap: 0.5rem;
}

.proj-exec__risk-legend span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.proj-exec__risk-legend i {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
}

.proj-exec__risk-legend .crit {
  background: #dc2626;
}

.proj-exec__risk-legend .att {
  background: #f59e0b;
}

.proj-exec__risk-legend .ok {
  background: #16a34a;
}

.proj-exec__decision {
  display: grid;
  gap: 0.75rem;
}

.proj-exec__drill {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.proj-exec__drill-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(236, 253, 245, 0.9),
    rgba(239, 246, 255, 0.92)
  );
}

.proj-exec__drill-summary > .material-icons {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  background: #ffffff;
  color: #0f766e;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.12);
}

.proj-exec__drill-summary strong,
.proj-exec__drill-summary small {
  display: block;
}

.proj-exec__drill-summary strong {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

.proj-exec__drill-summary small {
  margin-top: 0.2rem;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
}

.proj-exec__drill-list {
  display: grid;
  gap: 0.55rem;
  max-height: min(48vh, 24rem);
  overflow: auto;
  padding: 0.1rem 0.25rem 0.1rem 0;
}

.proj-exec__drill-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(203, 213, 225, 0.75);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.proj-exec__drill-item:hover {
  border-color: rgba(14, 165, 233, 0.34);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.proj-exec__drill-kind {
  min-width: 4.2rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.proj-exec__drill-item strong,
.proj-exec__drill-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proj-exec__drill-item strong {
  color: var(--text-primary);
  font-size: 0.82rem;
}

.proj-exec__drill-item small {
  margin-top: 0.16rem;
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.proj-exec__drill-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.app-modal.uc-entity-modal--form[data-testid="project-exec-drilldown-modal"] {
  width: min(100%, 54rem);
  max-height: min(88vh, 44rem);
  overflow: hidden;
  padding: 1.35rem;
  border-color: rgba(14, 165, 233, 0.24);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.app-modal.uc-entity-modal--form[data-testid="project-exec-drilldown-modal"]
  .uc-entity-modal__lead {
  margin-bottom: 0.65rem;
}

.proj-exec__decision-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 0.6rem;
}

.proj-exec__decision-item {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  text-align: left;
  cursor: pointer;
}

.proj-exec__decision-item span,
.proj-exec__decision-item strong,
.proj-exec__decision-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proj-exec__decision-item span {
  color: #9a3412;
  font-size: 0.78rem;
  font-weight: 800;
}

.proj-exec__decision-item strong {
  color: var(--text-primary);
  font-size: 0.8rem;
}

.proj-exec__decision-item small {
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.proj-exec__list {
  display: grid;
  gap: 0.75rem;
}

.proj-exec__row {
  display: grid;
  grid-template-columns: minmax(17rem, 1.2fr) minmax(12rem, 0.8fr);
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}

.proj-exec__main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.proj-exec__main strong,
.proj-exec__main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proj-exec__main strong {
  color: var(--text-primary);
  font-size: 0.92rem;
}

.proj-exec__health {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
  min-width: 6.5rem;
  color: var(--project-health);
  font-size: 0.74rem;
  font-weight: 700;
}

.proj-exec__health .material-icons {
  font-size: 1rem;
}

.proj-exec__progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 0.5rem;
}

.proj-exec__bar {
  height: 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.proj-exec__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00bf9a, #0ea5e9);
}

.proj-exec__progress strong {
  color: var(--text-primary);
  font-size: 0.82rem;
  text-align: right;
}

.proj-exec__facts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.proj-exec__facts span {
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
}

.proj-exec__reason {
  grid-column: 1 / -1;
  margin: -0.35rem 0 0;
}

@container (max-width: 62rem) {
  .proj-exec__decision-head {
    flex-wrap: wrap;
  }

  .proj-exec__decision-head small {
    flex: 1 0 100%;
    margin-left: 1.65rem;
  }

  .proj-exec__row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .proj-exec__progress {
    max-width: none;
  }
}

@container (max-width: 40rem) {
  .proj-exec__chart,
  .proj-exec__decision,
  .proj-exec__row {
    padding: 0.85rem;
  }

  .proj-exec__chart-head {
    flex-direction: column;
    align-items: stretch;
  }

  .proj-exec__chart-head strong {
    text-align: left;
  }

  .proj-exec__main {
    align-items: flex-start;
  }

  .proj-exec__health {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .app-modal.uc-entity-modal--form[data-testid="project-exec-drilldown-modal"] {
    width: min(100%, calc(100vw - 1rem));
    max-height: calc(100vh - 1rem);
    padding: 1rem;
  }

  .proj-exec__drill-list {
    max-height: 55vh;
    padding-right: 0;
  }

  .proj-exec__drill-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .proj-exec__drill-kind {
    justify-self: start;
  }

  .proj-exec__drill-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .proj-exec__kpis {
    grid-template-columns: 1fr;
  }
}

.project-exec-head {
  display: grid;
  grid-template-columns: minmax(16rem, 0.9fr) minmax(0, 1.6fr);
  gap: 0.85rem;
  margin-top: 1rem;
}

.project-exec-head__summary,
.project-exec-head__kpis {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}

.project-exec-head__summary {
  padding: 1rem;
}

.project-exec-head__health {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--project-health);
  font-size: 0.78rem;
  font-weight: 700;
}

.project-exec-head__health .material-icons {
  font-size: 1rem;
}

.project-exec-head__summary strong {
  display: block;
  margin: 0.35rem 0;
  color: var(--text-primary);
  font-size: 2rem;
  line-height: 1;
}

.project-exec-head__summary p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
}

.project-exec-head__kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.project-exec-head__kpis span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.9rem;
  border-left: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
}

.project-exec-head__kpis span:first-child {
  border-left: 0;
}

.project-exec-head__kpis strong {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  font-size: 1rem;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .project-exec-head,
  .project-exec-head__kpis {
    grid-template-columns: 1fr;
  }

  .project-exec-head__kpis span,
  .project-exec-head__kpis span:first-child {
    border-left: 0;
    border-top: 1px solid var(--border-color);
  }

  .project-exec-head__kpis span:first-child {
    border-top: 0;
  }
}

/* Phones — full-bleed sheet, stacked chrome, everything scrollable. */
@media (max-width: 560px) {
  .bpmn-studio__overlay {
    padding: 0;
  }
  .bpmn-studio {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }
  .bpmn-studio__head {
    padding: 0.625rem 0.875rem;
    gap: 0.5rem;
  }
  .bpmn-studio__title {
    gap: 0.5rem;
    min-width: 0;
  }
  .bpmn-studio__title > .material-icons {
    font-size: 1.375rem;
  }
  .bpmn-studio__title h2 {
    font-size: 0.9375rem;
  }
  .bpmn-studio__title p {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bpmn-studio__model {
    display: none;
  }
  .bpmn-studio__body {
    grid-template-rows: minmax(180px, 34dvh) 1fr;
  }
  .bpmn-studio--diagram-max .bpmn-studio__body {
    grid-template-rows: 1fr;
  }
  .bpmn-studio__panel {
    padding: 0.875rem 0.875rem 1.25rem;
    gap: 1rem;
  }
  .bpmn-studio__node {
    flex-wrap: wrap;
  }
  .bpmn-studio__node-sys {
    min-width: 0;
  }
  .bpmn-studio__foot {
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
    padding: 0.75rem 0.875rem;
  }
  .bpmn-studio__foot-hint {
    display: none;
  }
  .bpmn-studio__foot-actions {
    width: 100%;
  }
  .bpmn-studio__foot-actions .app-btn {
    flex: 1;
    justify-content: center;
  }
}

/* Process detail — pessoa owner / executor pickers */
.proc-pessoa-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.proc-pessoa-field-head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.proc-pessoa-field-icon {
  font-size: 1.125rem;
  color: var(--brand-primary, #0066a1);
  opacity: 0.85;
  margin-top: 0.05rem;
}

.proc-pessoa-field-label {
  margin: 0 !important;
}

.proc-pessoa-field-hint {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.35;
}

.proc-pessoa-chip-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.proc-pessoa-chip-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  min-width: 0;
}

.proc-pessoa-chip-wrap .proc-pessoa-card {
  flex: 1;
}

.proc-pessoa-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
}

.proc-pessoa-chip-remove:hover:not(:disabled) {
  color: #b91c1c;
  border-color: #fecaca;
}

.proc-pessoa-primary-tag {
  margin-left: 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand-primary, #0066a1);
}

.proc-owner-strip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-secondary, #f8fafc);
  font-size: 0.8125rem;
  color: var(--text-primary, #0f172a);
}

.proc-owner-strip__icon {
  font-size: 1rem;
  color: var(--brand-primary, #0066a1);
}

.proc-owner-strip__label {
  font-weight: 600;
  color: var(--text-secondary, #64748b);
}

.proc-owner-strip__names {
  min-width: 0;
}

.proc-owner-strip--editor {
  margin: 0 0 0.5rem;
}

.proc-pessoa-picker {
  position: relative;
  width: 100%;
}

.proc-pessoa-trigger {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.proc-pessoa-trigger:hover:not(:disabled) {
  border-color: rgb(0 102 161 / 0.35);
  box-shadow: 0 0 0 3px rgb(0 102 161 / 0.08);
}

.proc-pessoa-trigger:focus-visible {
  outline: none;
  border-color: var(--brand-primary, #0066a1);
  box-shadow: 0 0 0 3px rgb(0 102 161 / 0.15);
}

.proc-pessoa-trigger--empty {
  color: var(--text-secondary, #64748b);
}

.proc-pessoa-trigger--busy {
  opacity: 0.7;
  cursor: wait;
}

.proc-pessoa-trigger-icon {
  font-size: 1.25rem;
  color: var(--text-secondary, #94a3b8);
}

.proc-pessoa-trigger-placeholder {
  flex: 1;
  font-size: 0.875rem;
  color: #94a3b8;
}

.proc-pessoa-trigger-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.proc-pessoa-trigger-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proc-pessoa-trigger-sub {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proc-pessoa-chevron {
  font-size: 1.125rem;
  color: var(--text-secondary, #94a3b8);
  flex-shrink: 0;
}

.proc-pessoa-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: hsl(var(--proc-pessoa-hue, 210) 58% 42%);
  flex-shrink: 0;
}

.proc-pessoa-card {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.proc-pessoa-card:hover {
  background: rgb(255 255 255 / 0.72);
  border-color: rgb(0 102 161 / 0.18);
}

.proc-pessoa-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.proc-pessoa-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.proc-pessoa-card-sub {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
}

.proc-pessoa-card-link {
  font-size: 1rem;
  color: var(--text-secondary, #94a3b8);
  opacity: 0;
  transition: opacity 0.15s;
}

.proc-pessoa-card:hover .proc-pessoa-card-link {
  opacity: 1;
}

.proc-pessoa-unset {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
}

.proc-pessoa-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
  padding: 0.5rem 0;
}

.proc-pessoa-empty-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--brand-primary, #0066a1);
  text-decoration: none;
}

.proc-pessoa-empty-link:hover {
  text-decoration: underline;
}

.proc-pessoa-pop--fixed {
  position: fixed;
  z-index: 12050;
  border-radius: 12px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: #fff;
  box-shadow: 0 12px 40px rgb(15 23 42 / 0.14), 0 2px 8px rgb(15 23 42 / 0.06);
  overflow: hidden;
}

.proc-pessoa-pop-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.proc-pessoa-pop-search .material-icons {
  font-size: 1.125rem;
  color: var(--text-secondary, #94a3b8);
}

.proc-pessoa-pop-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.875rem;
  background: transparent;
  color: var(--text-primary, #1e293b);
}

.proc-pessoa-pop-scroll {
  max-height: 240px;
  overflow-y: auto;
  padding: 0.35rem;
}

.proc-pessoa-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.proc-pessoa-row:hover {
  background: rgb(0 43 73 / 0.04);
}

.proc-pessoa-row--active {
  background: rgb(0 102 161 / 0.08);
}

.proc-pessoa-row--muted {
  color: var(--text-secondary, #64748b);
}

.proc-pessoa-row-ico {
  font-size: 1.125rem;
}

.proc-pessoa-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  color: #fff;
  background: hsl(var(--ph, 210) 58% 42%);
  flex-shrink: 0;
}

.proc-pessoa-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.proc-pessoa-row-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.proc-pessoa-row-sub {
  font-size: 0.6875rem;
  color: var(--text-secondary, #64748b);
}

.proc-pessoa-check {
  font-size: 1rem;
  color: var(--brand-primary, #0066a1);
}

.proc-pessoa-empty-msg {
  margin: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
}

.proc-pessoa-pop-footer {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 0.75rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-primary, #0066a1);
  text-decoration: none;
  background: rgb(0 43 73 / 0.02);
}

.proc-pessoa-pop-footer:hover {
  background: rgb(0 43 73 / 0.05);
}

.proc-pessoa-spin {
  animation: spin 0.9s linear infinite;
}

/* Slim toolbar above mapping tabs — one primary action, no progress chrome */
.process-detail__flow-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.5rem 0 0.75rem;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.process-detail__flow-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
  font-weight: 500;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.process-detail__flow-hint .material-icons {
  font-size: 1.125rem;
  color: var(--text-secondary, #64748b);
  opacity: 0.85;
}

/* BPMN viewers — stable canvas framing (detail + modeler-grade feel) */
.process-detail__bpmn-viewer {
  width: 100%;
  max-width: 100%;
  height: min(560px, 72vh);
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    #fbfcfd 0%,
    #f3f6f9 48%,
    #eef2f6 100%
  );
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.65);
}

.process-detail__bpmn-viewer .djs-container,
.process-detail__bpmn-viewer .djs-parent {
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
  overflow: hidden;
}

.process-detail__bpmn-viewer .djs-container,
.process-detail__bpmn-viewer svg {
  border-radius: 9px;
}

/* Process detail — Ações + Melhorias tab */
.process-acoes-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.process-acoes-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}
@media (max-width: 900px) {
  .process-acoes-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.process-acoes-kpi__tile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  min-height: 4rem;
}
.process-acoes-kpi__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9px;
  flex-shrink: 0;
}
.process-acoes-kpi__icon .material-icons {
  font-size: 1.15rem;
}
.process-acoes-kpi__icon--total {
  background: #dbeafe;
  color: #2563eb;
}
.process-acoes-kpi__icon--open {
  background: #fef3c7;
  color: #d97706;
}
.process-acoes-kpi__icon--done {
  background: #dcfce7;
  color: #16a34a;
}
.process-acoes-kpi__icon--imp {
  background: #ccfbf1;
  color: #0d9488;
}
.process-acoes-kpi__value {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary, #0f172a);
  font-variant-numeric: tabular-nums;
}
.process-acoes-kpi__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  margin-top: 0.1rem;
}
.process-acoes-table-wrap {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.process-acoes-table th {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary, #64748b);
  background: #f8fafc;
  vertical-align: middle;
}
.process-acoes-table td {
  vertical-align: middle;
}
.process-acoes-row-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
  line-height: 1.35;
}
.process-acoes-imp-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.process-acoes-imp-head {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}
.process-acoes-imp-icon {
  color: #0d9488;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.process-acoes-imp-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.process-acoes-imp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.process-acoes-imp-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
}
.process-acoes-imp-progress {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.process-acoes-imp-progress-bar {
  width: 2.5rem;
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  overflow: hidden;
}
.process-acoes-imp-progress-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
}
.process-acoes-no-imp {
  font-size: 0.8125rem;
  font-style: italic;
}
.process-acoes-col-nav {
  text-align: right;
}
.process-acoes-nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.process-acoes-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.process-acoes-nav-btn:hover {
  transform: translateY(-1px);
}
.process-acoes-nav-btn--action {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.process-acoes-nav-btn--action:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}
.process-acoes-nav-btn--imp {
  color: #0f766e;
  background: #f0fdfa;
  border-color: #99f6e4;
}
.process-acoes-nav-btn--imp:hover {
  background: #ccfbf1;
  border-color: #5eead4;
}
.process-acoes-orphans {
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: #fafbfc;
}
.process-acoes-orphans__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  color: var(--text-secondary, #64748b);
}
.process-acoes-orphans__head h3 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary, #334155);
  flex: 1;
}
.process-acoes-orphans__count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-variant-numeric: tabular-nums;
}
.process-acoes-orphans__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.process-acoes-orphan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.process-acoes-orphan__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.process-acoes-orphan__body strong {
  font-size: 0.8125rem;
  line-height: 1.35;
}
.process-acoes-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 12rem;
  text-align: center;
  padding: 1.5rem;
}
.process-acoes-empty__icon {
  font-size: 2.75rem;
  color: #e2e8f0;
}
.process-acoes-empty__title {
  margin: 0;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}
.process-acoes-empty__lead {
  margin: 0 0 0.35rem;
  max-width: 26rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.5;
}

/* Process detail — shared empty states for workflow tabs */
.process-tab-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 16rem;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px dashed
    color-mix(in srgb, var(--brand-primary, #00bf9a) 28%, #e2e8f0);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand-primary, #00bf9a) 4%, #fff) 0%,
    #f8fafc 100%
  );
}
.process-tab-empty--compact {
  min-height: 10rem;
  padding: 1.25rem 1rem;
}
.process-tab-empty__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-primary, #00bf9a) 12%, #fff);
  border: 1px solid
    color-mix(in srgb, var(--brand-primary, #00bf9a) 22%, #e2e8f0);
  margin-bottom: 0.15rem;
}
.process-tab-empty--compact .process-tab-empty__visual {
  width: 3rem;
  height: 3rem;
}
.process-tab-empty__icon {
  font-size: 2rem;
  color: var(--brand-primary, #00bf9a);
  opacity: 0.85;
}
.process-tab-empty--compact .process-tab-empty__icon {
  font-size: 1.5rem;
}
.process-tab-empty__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  line-height: 1.35;
}
.process-tab-empty__desc {
  margin: 0;
  max-width: 30rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary, #64748b);
}
.process-tab-empty__steps {
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 28rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.process-tab-empty__steps li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary, #64748b);
}
.process-tab-empty__steps li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-primary, #00bf9a) 14%, #fff);
  color: var(--brand-primary, #00bf9a);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.process-tab-empty__steps {
  counter-reset: step;
}
.process-tab-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.35rem;
}
.process-tab-empty--loading {
  border-style: solid;
  border-color: color-mix(in srgb, var(--brand-primary, #00bf9a) 18%, #e2e8f0);
}
.proc-bpmn-export {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 0 0 0.65rem;
}
.proc-bpmn-export__actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}
.proc-bpmn-export__rev {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
}
.proc-bpmn-export__rev select {
  min-width: 12rem;
  max-width: 18rem;
  font-size: 0.82rem;
}
.bpmn-color-pop__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.proc-diagram-header {
  flex: 0 0 auto;
  padding: 0.85rem 1rem 0.9rem;
  background: linear-gradient(135deg, #002b49 0%, #003d66 58%, #00527a 100%);
  color: #f8fafc;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.proc-diagram-header__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  margin-bottom: 0.65rem;
}

.proc-diagram-header__kind {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: #00bf9a;
  color: #002b49;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.proc-diagram-header__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.proc-diagram-header__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.75rem 1.25rem;
  margin: 0;
}

.proc-diagram-header__block {
  min-width: 0;
}

.proc-diagram-header__block dt {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.proc-diagram-header__block dd {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #e2e8f0;
}

.proc-diagram-header__systems {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.proc-diagram-header__systems li {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgb(0 182 214 / 0.18);
  border: 1px solid rgb(0 182 214 / 0.35);
  color: #e0f2fe;
  font-size: 0.75rem;
  font-weight: 600;
}

.proc-diagram-header__empty {
  color: #94a3b8;
  font-style: italic;
}

.proc-diagram-header__hint {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: #cbd5e1;
}

.proc-diagram-header__hint a {
  color: #5eead4;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.process-detail__diagram-head {
  margin: 0 0 0.65rem;
  border-radius: 10px;
  overflow: hidden;
}

@media (max-width: 720px) {
  .proc-diagram-header {
    padding: 0.75rem 0.8rem;
  }

  .proc-diagram-header__grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .proc-diagram-header__name {
    font-size: 0.95rem;
  }
}
.process-detail__bpmn-slot {
  position: relative;
  min-height: 12rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.process-detail__bpmn-slot--has-diagram {
  min-height: min(560px, 72vh);
}
.process-detail__bpmn-viewer--mounting {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.process-detail__bpmn-viewer--readonly .djs-palette,
.process-detail__bpmn-viewer--readonly .djs-context-pad,
.process-detail__bpmn-viewer--readonly .djs-popup {
  display: none !important;
}
.process-tab-empty {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE TABS — shared across Desempenho, Ações, Projetos
   ═══════════════════════════════════════════════════════════════════════════ */

.page-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color, #e2e8f0);
  margin: 0 0 1.5rem;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.page-tabs::-webkit-scrollbar {
  display: none;
}

.page-tab {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  padding: 0.625rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-secondary, #64748b);
  background: transparent;
  text-decoration: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
  white-space: nowrap;
  border-radius: 0;
}

@media (max-width: 844px) {
  .page-tabs,
  .org-workspace-tabs {
    flex-wrap: wrap;
    overflow: visible;
    scrollbar-width: auto;
  }
  .page-tab,
  .org-tab {
    white-space: normal;
  }
}

.page-tab:hover {
  color: var(--brand-primary, #00bf9a);
  background: rgb(0 191 154 / 0.05);
}

.page-tab--active {
  color: var(--brand-primary, #00bf9a);
  border-bottom-color: var(--brand-primary, #00bf9a);
  font-weight: 600;
}

.page-tab:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--brand-primary, #00bf9a);
  outline-offset: -4px;
}

/* Rich message editor — document-like NPS e-mail authoring. */
.rich-editor {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-color, #dbe3ec);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.rich-editor:focus-within {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 0 0 3px rgb(0 191 154 / 0.12);
}

.rich-editor__toolbar {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.45rem;
  overflow-x: auto;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  scrollbar-width: thin;
}

.rich-editor__button {
  appearance: none;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: #64748b;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
}

.rich-editor__button .material-icons {
  font-size: 1.12rem;
}

.rich-editor__button:hover:not(:disabled) {
  color: var(--brand-dark, #0f344d);
  background: #fff;
  border-color: #dbe3ec;
}

.rich-editor__button--active {
  color: #008f75;
  background: rgb(0 191 154 / 0.11);
  border-color: rgb(0 191 154 / 0.28);
}

.rich-editor__button:focus-visible,
.rich-editor__select:focus-visible {
  outline: 2px solid var(--brand-primary, #00bf9a);
  outline-offset: 1px;
}

.rich-editor__button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.rich-editor__select {
  flex: 0 0 auto;
  height: 2rem;
  padding: 0 1.7rem 0 0.55rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  background-color: #fff;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
}

.rich-editor__separator {
  flex: 0 0 auto;
  width: 1px;
  height: 1.45rem;
  margin: 0 0.2rem;
  background: #dbe3ec;
}

.rich-editor__surface {
  min-height: calc(var(--rich-editor-min-lines, 7) * 1.55rem + 2rem);
  max-height: 32rem;
  overflow: auto;
  resize: vertical;
}

.rich-editor__content {
  min-height: inherit;
  min-width: 0;
  max-width: 100%;
  padding: 1rem 1.1rem 1.5rem;
  color: var(--text-primary, #1e293b);
  font-size: 0.92rem;
  line-height: 1.55;
  outline: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rich-editor__content p,
.rich-editor__content h2,
.rich-editor__content h3,
.rich-editor__content blockquote,
.rich-editor__content ul,
.rich-editor__content ol {
  margin: 0 0 0.7rem;
}

.rich-editor__content h2 {
  font-size: 1.3rem;
  line-height: 1.3;
}

.rich-editor__content h3 {
  font-size: 1.08rem;
  line-height: 1.35;
}

.rich-editor__content ul,
.rich-editor__content ol {
  padding-left: 1.5rem;
}

.rich-editor__content blockquote {
  padding-left: 0.85rem;
  color: #64748b;
  border-left: 3px solid rgb(0 191 154 / 0.45);
}

.rich-editor__content a {
  color: #0369a1;
  text-decoration: underline;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Published updates: fit the card — long URLs must wrap, never force horizontal scroll. */
.action-updates-feed,
.action-updates-card,
.action-updates-replies,
.action-update-rich {
  min-width: 0;
  max-width: 100%;
}

.action-updates-card {
  overflow-x: clip;
}

.rich-editor__content.action-update-rich {
  padding: 0.35rem 0 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: clip;
}

.action-update-rich a,
.action-update-rich code {
  overflow-wrap: anywhere;
  word-break: break-all;
}

.rich-editor__content hr {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid #dbe3ec;
}

.rich-editor__content p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  height: 0;
  color: #94a3b8;
  pointer-events: none;
}

.rich-editor__footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.65rem;
  color: #94a3b8;
  background: #f8fafc;
  border-top: 1px solid #edf2f7;
  font-size: 0.7rem;
}

/* ProseMirror inserts a zero-width separator <img> so the caret can sit
   next to inline images. Our content img styles must not apply to it —
   otherwise it shows as a 48px bordered square at the cursor. */
.rich-editor__content img.ProseMirror-separator {
  display: inline !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  cursor: text !important;
  pointer-events: none;
}

.rich-editor__content img:not(.ProseMirror-separator),
.action-update-rich img {
  display: block;
  max-width: 100%;
  min-width: 48px;
  min-height: 48px;
  width: auto;
  height: auto;
  border-radius: 8px;
  margin: 0.35rem 0;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: zoom-in;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.action-update-rich img:hover {
  border-color: #0d9488;
  box-shadow: 0 4px 14px rgb(13 148 136 / 0.18);
}

.action-update-sc-attach {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(14, 116, 144, 0.06);
  border: 1px solid rgba(14, 116, 144, 0.16);
}

.action-update-sc-attach__text {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.84rem;
  color: #0f172a;
}

.action-update-sc-attach__text .material-icons {
  font-size: 1rem !important;
  color: #0e7490;
}

.action-update-sc-attach__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: fit-content;
  font-size: 0.76rem;
  font-weight: 600;
  color: #0e7490;
  text-decoration: none;
}

.action-update-sc-attach__link:hover {
  text-decoration: underline;
}

.action-update-sc-attach__link .material-icons {
  font-size: 0.9rem !important;
}

.action-update-sc-attach__badge {
  font-size: 0.66rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.12);
  color: #0e7490;
}

/* Image lightbox — updates/comments inline gallery */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(15 23 42 / 0.92);
  padding: 1rem;
}

.image-lightbox__toolbar {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgb(15 23 42 / 0.72);
  border: 1px solid rgb(148 163 184 / 0.35);
  backdrop-filter: blur(8px);
}

.image-lightbox__counter {
  min-width: 3.5rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
}

.image-lightbox__zoom {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.image-lightbox__zoom-pct {
  min-width: 3rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}

.image-lightbox__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #f8fafc;
  cursor: pointer;
}

.image-lightbox__btn:hover:not(:disabled) {
  background: rgb(148 163 184 / 0.2);
}

.image-lightbox__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.image-lightbox__btn .material-icons {
  font-size: 1.35rem;
}

.image-lightbox__btn--close {
  margin-left: 0.25rem;
}

.image-lightbox__stage {
  max-width: min(92vw, 72rem);
  max-height: calc(100vh - 6rem);
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 3.5rem;
}

.image-lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  transform-origin: center center;
  transition: transform 0.12s ease-out;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.45);
}

.image-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgb(148 163 184 / 0.35);
  border-radius: 999px;
  background: rgb(15 23 42 / 0.72);
  color: #f8fafc;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.image-lightbox__nav:hover {
  background: rgb(30 41 59 / 0.9);
  border-color: #0d9488;
}

.image-lightbox__nav--prev {
  left: 1rem;
}

.image-lightbox__nav--next {
  right: 1rem;
}

.image-lightbox__nav .material-icons {
  font-size: 1.75rem;
}

@media (max-width: 640px) {
  .image-lightbox__nav--prev {
    left: 0.35rem;
  }

  .image-lightbox__nav--next {
    right: 0.35rem;
  }

  .image-lightbox__stage {
    padding: 3rem 2.5rem;
  }
}

.rich-editor__content code,
.action-update-rich code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.rich-editor__content pre,
.action-update-rich pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  overflow-x: clip;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.82rem;
}

.action-updates-feed {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.action-updates-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.action-updates-composer {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.action-updates-panel--embedded .action-updates-composer {
  margin-top: 0;
}

.action-activity-panel--embedded {
  margin-top: 0.35rem;
  padding: 0.85rem 0.95rem 1rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 72%);
  min-width: 0;
  max-width: 100%;
}

.action-activity-panel__hdr {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e2e8f0;
}

.action-activity-panel__title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f766e;
}

.action-feed-stack {
  padding-bottom: 0.35rem;
}

.action-feed-sort-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.action-feed-sort-bar__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
}

.action-feed-sort {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.05);
}

.action-feed-sort__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}

.action-feed-sort__btn .material-icons {
  font-size: 0.95rem;
}

.action-feed-sort__btn:hover:not(:disabled) {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.7);
}

.action-feed-sort__btn--active {
  color: #0f766e;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.action-feed-sort__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.action-updates-composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-updates-attach-hint {
  margin: 0;
  font-size: 0.72rem;
  color: #64748b;
}

.action-updates-replies {
  list-style: none;
  margin: 8px 0 0;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--border, #e5e7eb);
  display: grid;
  gap: 8px;
}

.rich-editor--disabled {
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MONITOR / PAINEL HEALTH COCKPIT  (PainelStats.tsx)
   ═══════════════════════════════════════════════════════════════════════════ */

.monitor-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 0;
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
}

.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.monitor-card {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 1rem 1.125rem;
  box-shadow: var(--liberty-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.monitor-card--link {
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.monitor-card--link:hover {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.08);
}

.monitor-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.monitor-card-icon {
  font-size: 1.1rem !important;
  flex-shrink: 0;
}

.monitor-card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  flex: 1;
}

.monitor-card-arrow {
  font-size: 1rem !important;
  color: var(--text-secondary, #64748b);
}

/* KPI traffic bar */
.monitor-kpi-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.monitor-kpi-bar {
  display: flex;
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: #e2e8f0;
}

.monitor-kpi-seg {
  height: 100%;
  transition: width 0.4s;
}

.monitor-kpi-seg--ok {
  background: #16a34a;
}
.monitor-kpi-seg--warn {
  background: #d97706;
}
.monitor-kpi-seg--crit {
  background: #dc2626;
}

.monitor-kpi-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.monitor-kpi-leg {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 500;
}

.monitor-kpi-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.monitor-kpi-leg--ok {
  color: #16a34a;
}
.monitor-kpi-leg--warn {
  color: #d97706;
}
.monitor-kpi-leg--crit {
  color: #dc2626;
}
.monitor-kpi-leg--none {
  color: #94a3b8;
}

/* Gauge */
.monitor-gauge {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.monitor-gauge-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.monitor-gauge-label {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
}

.monitor-gauge-nil {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.monitor-nil {
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
}

.monitor-nil-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}

.monitor-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.monitor-late-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #dc2626;
  background: #fee2e2;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   KPI TRAFFIC-LIGHT PANEL  (DesempenhoPainel.tsx)
   ═══════════════════════════════════════════════════════════════════════════ */

.kpi-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.kpi-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.kpi-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 99px;
  border: 1.5px solid var(--border-color, #e2e8f0);
  background: var(--surface-color, #fff);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: all 0.15s;
}

.kpi-summary-pill:hover {
  border-color: var(--brand-primary, #00bf9a);
  color: var(--brand-primary, #00bf9a);
}

.kpi-summary-pill--active {
  font-weight: 700;
}

.kpi-summary-pill-label {
  font-size: 0.8rem;
}

.kpi-summary-pill-count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
}

.kpi-process-filter {
  margin-left: auto;
}

.kpi-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.875rem;
}

.kpi-card {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.15s;
}

.kpi-card:hover {
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.08);
}

.kpi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-card-traffic {
  font-size: 1.1rem !important;
}

.kpi-card-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.kpi-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  line-height: 1.35;
  margin: 0;
}

.kpi-card-values {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.kpi-card-val {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kpi-card-val-label {
  font-size: 0.68rem;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-card-val strong {
  font-size: 0.875rem;
  color: var(--text-primary, #1e293b);
}

.kpi-card-sep {
  color: #cbd5e1;
  font-size: 1rem;
}

.kpi-card-pct {
  font-size: 1rem;
  font-weight: 700;
  margin-left: auto;
}

.kpi-card-bar-bg {
  height: 3px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.kpi-card-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s;
}

.kpi-card-freq {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: var(--text-secondary, #64748b);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INDICADOR DETAIL — attainment bar + chart
   ═══════════════════════════════════════════════════════════════════════════ */

.ind-attainment-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.ind-attainment-bar-bg {
  flex: 1;
  height: 8px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}

.ind-attainment-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s;
}

.ind-attainment-bar-label {
  font-size: 0.8125rem;
  font-weight: 700;
  min-width: 2.5rem;
  text-align: right;
}

.ind-trend-chart-wrap {
  position: relative;
  height: 240px;
  margin-bottom: 0.5rem;
}

.ind-trend-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FINANCIAL SUMMARY  (FinancialSummary.tsx)
   ═══════════════════════════════════════════════════════════════════════════ */

.fin-summary {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-5);
}

.fin-total-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.fin-total-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.fin-total-label {
  font-size: 0.8rem;
  color: #15803d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin: 0 0 0.125rem;
}

.fin-total-value {
  font-size: 1.625rem;
  font-weight: 800;
  color: #15803d;
  margin: 0;
}

.fin-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.fin-cat-card {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 1rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--liberty-shadow);
}

.fin-cat-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fin-cat-icon {
  font-size: 1.1rem !important;
  padding: 0.3rem;
  border-radius: 6px;
}

.fin-cat-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}

.fin-cat-value {
  font-size: 1.375rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
}

.fin-cat-desc {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.45;
  margin: 0;
}

.fin-cat-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fin-cat-bar-bg {
  flex: 1;
  height: 5px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.fin-cat-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}

.fin-cat-bar-pct {
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 2.5rem;
  text-align: right;
  flex-shrink: 0;
}

.fin-outros {
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding-top: 1rem;
}

.fin-outros-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  margin: 0 0 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AÇÕES PAINEL  (AcoesPainel.tsx)
   ═══════════════════════════════════════════════════════════════════════════ */

.acoes-painel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.acoes-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.875rem;
}

.acoes-stat-card {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--liberty-shadow);
}

.acoes-stat-card--primary {
  border-color: var(--brand-primary, #00bf9a);
  background: #f0fdf9;
}

.acoes-stat-icon {
  font-size: 1.5rem !important;
}

.acoes-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary, #1e293b);
  margin: 0;
  line-height: 1;
}

.acoes-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  margin: 0;
}

.acoes-painel-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.acoes-section {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 1rem 1.125rem;
  box-shadow: var(--liberty-shadow);
}

.acoes-section-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0 0 0.75rem;
}

.acoes-status-list,
.acoes-source-list,
.acoes-priority-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.acoes-status-row,
.acoes-source-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.acoes-status-row-left,
.acoes-source-row-left {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 140px;
  flex-shrink: 0;
}

.acoes-status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.acoes-status-count,
.acoes-source-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin-left: auto;
}

.acoes-source-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary, #1e293b);
}

.acoes-mini-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
}

.acoes-mini-bar-bg {
  flex: 1;
  height: 5px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}

.acoes-mini-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s;
}

.acoes-mini-bar-pct {
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 2rem;
  text-align: right;
}

.acoes-late-alert {
  background: #fff7f7;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.875rem 1rem;
}

.acoes-late-alert-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #dc2626;
  font-size: 0.875rem;
  margin-bottom: 0.625rem;
}

.acoes-late-alert-header .material-icons {
  font-size: 1rem !important;
}

.acoes-late-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.acoes-late-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-primary, #1e293b);
}

.acoes-late-date {
  margin-left: auto;
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 500;
}

.acoes-late-item--more {
  color: var(--text-secondary, #64748b);
  font-style: italic;
  font-size: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROJETOS DASHBOARD  (ProjetosDashboard.tsx)
   ═══════════════════════════════════════════════════════════════════════════ */

.proj-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.proj-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.875rem;
}

.proj-summary-card {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--liberty-shadow);
}

.proj-summary-icon {
  font-size: 1.5rem !important;
}

.proj-summary-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary, #1e293b);
  margin: 0;
  line-height: 1;
}

.proj-summary-label {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  margin: 0;
}

.proj-dashboard-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.proj-section {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 1rem 1.125rem;
  box-shadow: var(--liberty-shadow);
}

.proj-section--wide {
  grid-column: 1 / -1;
}

.proj-section-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0 0 0.75rem;
}

.proj-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.proj-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.proj-status-label {
  font-weight: 600;
  min-width: 100px;
}
.proj-status-count {
  font-weight: 700;
  min-width: 1.5rem;
  text-align: right;
}

.proj-prog-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.proj-prog-bar-bg {
  flex: 1;
  height: 5px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.proj-prog-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}

.proj-prog-bar-label {
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 2.2rem;
  text-align: right;
  flex-shrink: 0;
}

.proj-progress-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.proj-progress-row {
  text-decoration: none;
  color: inherit;
  background: var(--background-color, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  transition: box-shadow 0.15s;
}

.proj-progress-row:hover {
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.06);
}

.proj-progress-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.proj-progress-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.proj-days-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  background: #f1f5f9;
  color: var(--text-secondary, #64748b);
  white-space: nowrap;
}

.proj-days-badge--warn {
  background: #fef9c3;
  color: #a16207;
}
.proj-days-badge--late {
  background: #fee2e2;
  color: #dc2626;
}

.proj-progress-meta {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MONITORAMENTO COCKPIT  (MonitoramentoDashboard.tsx)
   ═══════════════════════════════════════════════════════════════════════════ */

.cockpit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.cockpit-card {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 1.125rem 1.25rem;
  box-shadow: var(--liberty-shadow);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cockpit-card--link {
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.cockpit-card--link:hover {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: var(--liberty-shadow-md);
}

.cockpit-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.cockpit-card-icon {
  font-size: 1.1rem !important;
  flex-shrink: 0;
}

.cockpit-card-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  flex: 1;
  letter-spacing: -0.01em;
}

.cockpit-card-arrow {
  font-size: 1rem !important;
  color: var(--text-secondary, #64748b);
}

.cockpit-card-body {
  flex: 1;
}

.cockpit-nil {
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
  margin: 0;
}

.cockpit-nil a {
  color: var(--brand-primary, #00bf9a);
  text-decoration: underline;
}

/* KPI block */
.cockpit-kpi-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cockpit-kpi-big {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  letter-spacing: -0.02em;
}

.cockpit-kpi-big-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  letter-spacing: 0;
}

.cockpit-kpi-bar {
  display: flex;
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: #e2e8f0;
}

.cockpit-kpi-seg {
  height: 100%;
  transition: width 0.4s;
}

.cockpit-kpi-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.cockpit-kpi-leg {
  font-size: 0.72rem;
  font-weight: 500;
}

.cockpit-bar-row {
  margin-top: 0.5rem;
}

/* Score ring (conformidade) */
.cockpit-score-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cockpit-score-svg {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.cockpit-score-ring {
  position: relative;
}

.cockpit-score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cockpit-score-value {
  font-size: 0.8rem;
  font-weight: 800;
}

.cockpit-score-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cockpit-score-label {
  font-size: 0.75rem;
}

.cockpit-score-sub {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
  margin: 0;
}

/* Actions block */
.cockpit-actions-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cockpit-actions-rate {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  letter-spacing: -0.02em;
}

.cockpit-actions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.cockpit-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.cockpit-chip--done {
  background: #dcfce7;
  color: #16a34a;
}
.cockpit-chip--open {
  background: #eff6ff;
  color: #3b82f6;
}
.cockpit-chip--late {
  background: #fee2e2;
  color: #dc2626;
}

/* Financial block */
.cockpit-financial-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cockpit-financial-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--success-color, #10b981);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.cockpit-financial-label {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  margin: 0;
}

/* BSC grid */
.cockpit-bsc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
}

.cockpit-bsc-card {
  background: var(--background-color, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cockpit-bsc-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.cockpit-bsc-pct {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
}

.cockpit-bsc-sub {
  font-size: 0.68rem;
  color: var(--text-secondary, #64748b);
}

/* Projects block */
.cockpit-proj-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AÇÕES HUB  (AcoesHub + components/acoes/*)
   ═══════════════════════════════════════════════════════════════════════════ */

.acoes-hub {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

/* --- KPI row --- */
.acoes-kpi-row {
  --acoes-kpi-cols: 7;
  container-type: inline-size;
  container-name: acoes-kpi;
  display: grid;
  grid-template-columns: repeat(var(--acoes-kpi-cols), minmax(0, 1fr));
  gap: 0.625rem;
}

.acoes-kpi-tile {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  box-shadow: var(--liberty-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-width: 0;
  transition: box-shadow 0.2s, transform 0.2s;
}

.acoes-kpi-tile:hover {
  box-shadow: var(--liberty-shadow-md);
  transform: translateY(-1px);
}

.acoes-kpi-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.acoes-kpi-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
}

.acoes-kpi-badge .material-icons {
  font-size: 1.05rem;
}

.acoes-kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acoes-kpi-label__short,
.acoes-kpi-foot-label__short,
.acoes-kpi-ratio__short {
  display: none;
}

.acoes-kpi-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.acoes-kpi-count {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  min-width: 0;
}

.acoes-kpi-spark {
  flex-shrink: 0;
  opacity: 0.9;
}

.acoes-kpi-foot {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border-color, #e2e8f0);
  font-size: 0.72rem;
  min-width: 0;
}

.acoes-kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  font-weight: 700;
  padding: 0.1rem 0.375rem;
  border-radius: 99px;
  flex-shrink: 0;
}

.acoes-kpi-delta .material-icons {
  font-size: 0.85rem !important;
}
.acoes-kpi-delta--up {
  background: #dcfce7;
  color: #16a34a;
}
.acoes-kpi-delta--down {
  background: #fee2e2;
  color: #dc2626;
}
.acoes-kpi-delta--flat {
  color: #94a3b8;
}
.acoes-kpi-foot-label {
  color: var(--text-secondary, #64748b);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dense single-row: shorter copy, keep spark + delta when space is mid-range */
@container acoes-kpi (max-width: 84rem) {
  .acoes-kpi-tile {
    padding: 0.55rem 0.65rem;
    gap: 0.35rem;
  }

  .acoes-kpi-badge {
    width: 24px;
    height: 24px;
    border-radius: 7px;
  }

  .acoes-kpi-badge .material-icons {
    font-size: 0.95rem;
  }

  .acoes-kpi-label {
    font-size: 0.62rem;
    letter-spacing: 0.03em;
  }

  .acoes-kpi-label__full {
    display: none;
  }

  .acoes-kpi-label__short {
    display: inline;
  }

  .acoes-kpi-count {
    font-size: 1.35rem;
  }

  .acoes-kpi-ratio__full {
    display: none;
  }

  .acoes-kpi-ratio__short {
    display: inline;
    margin: 0 0.1rem;
  }

  .acoes-kpi-foot {
    gap: 0.25rem;
    padding-top: 0.3rem;
    font-size: 0.68rem;
  }

  .acoes-kpi-foot-label__full {
    display: none;
  }

  .acoes-kpi-foot-label__short {
    display: inline;
  }
}

/* Compact single-row: number-first tiles when 7 rich cards won't fit */
@container acoes-kpi (max-width: 64rem) {
  .acoes-kpi-spark,
  .acoes-kpi-foot {
    display: none;
  }

  .acoes-kpi-body {
    align-items: center;
  }
}

@media (max-width: 720px) {
  .acoes-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Toolbar --- */
.acoes-hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 0.625rem 0.75rem;
  box-shadow: var(--liberty-shadow);
}

.acoes-hub-toolbar-grow {
  flex: 1 1 220px;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.acoes-hub-project-filter {
  min-width: 10.5rem;
  max-width: min(22rem, 100%);
  font-weight: 600;
  border-color: #cbd5e1;
}

.acoes-hub-period {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  box-shadow: var(--liberty-shadow);
}

.acoes-hub-period__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.acoes-hub-period__title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.acoes-hub-period__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  background: color-mix(in srgb, var(--brand-primary) 12%, white);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 28%, #e2e8f0);
  color: var(--brand-primary, #00bf9a);
  font-size: 0.75rem;
  font-weight: 600;
}

.acoes-hub-period__hint {
  font-size: 0.75rem;
  flex: 1 1 12rem;
}

.acoes-hub-period__fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-color, #e2e8f0);
}

.acoes-hub-period__field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 9.5rem;
}

.acoes-hub-period__field .app-input {
  min-height: 2.125rem;
}

.acoes-hub-period__warn {
  font-size: 0.75rem;
  align-self: center;
}

.acoes-hub-context {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  box-shadow: var(--liberty-shadow);
}

.acoes-hub-context__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.acoes-hub-context__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.acoes-hub-context__toggle:hover,
.acoes-hub-context__toggle--open {
  border-color: color-mix(in srgb, var(--brand-primary) 40%, #e2e8f0);
  background: color-mix(in srgb, var(--brand-primary) 5%, white);
}

.acoes-hub-context__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.3rem;
  border-radius: 100px;
  background: var(--brand-primary, #00bf9a);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
}

.acoes-hub-context__chev {
  color: var(--text-secondary, #94a3b8);
}

.acoes-hub-context__hint {
  font-size: 0.75rem;
}

.acoes-hub-context__panel {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color, #e2e8f0);
}

.acoes-hub-context__panel--with-people {
  align-items: center;
}

.acoes-hub-context__group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  flex: 1 1 18rem;
  min-width: 0;
}

.acoes-hub-context__group--people {
  flex: 0 1 11.5rem;
  grid-template-columns: minmax(0, 1fr);
  padding-left: 0.65rem;
  border-left: 1px solid
    color-mix(in srgb, var(--border-color, #e2e8f0) 70%, transparent);
}

.acoes-hub-context__group .uc-lv-filter {
  min-width: 0;
}

.acoes-hub-context__group .uc-lv-filter__trigger {
  width: 100%;
  justify-content: flex-start;
}

@media (max-width: 960px) {
  .acoes-hub-context__panel--with-people {
    flex-direction: column;
    align-items: stretch;
  }

  .acoes-hub-context__group {
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    flex: 1 1 auto;
  }

  .acoes-hub-context__group--people {
    flex: 1 1 auto;
    padding-left: 0;
    border-left: none;
    padding-top: 0.5rem;
    border-top: 1px dashed
      color-mix(in srgb, var(--border-color, #e2e8f0) 55%, transparent);
  }
}

@media (max-width: 520px) {
  .acoes-hub-context__group {
    grid-template-columns: 1fr;
  }
}

.acoes-hub-context__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.15rem;
}

/* --- Label filters (etiquetas) --- */
.acoes-hub-labels {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  box-shadow: var(--liberty-shadow);
}

.acoes-hub-labels__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.acoes-hub-labels__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: #f8fafc;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.acoes-hub-labels__toggle:hover,
.acoes-hub-labels__toggle--open {
  border-color: color-mix(in srgb, var(--brand-primary) 40%, #e2e8f0);
  background: color-mix(in srgb, var(--brand-primary) 5%, white);
}

.acoes-hub-labels__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 100px;
  background: var(--brand-primary, #00bf9a);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.acoes-hub-labels__chev {
  color: var(--text-secondary, #94a3b8);
}

.acoes-hub-labels__hint {
  font-size: 0.75rem;
}

.acoes-hub-labels__panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-color, #e2e8f0);
}

.acoes-hub-labels__search-wrap {
  position: relative;
  max-width: 16rem;
}

.acoes-hub-labels__search-icon {
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary, #94a3b8);
  pointer-events: none;
}

.acoes-hub-labels__search {
  width: 100%;
  padding-left: 2rem !important;
  min-height: 2.125rem;
}

.acoes-hub-labels__scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 9.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.1rem 0;
  scrollbar-width: thin;
}

.acoes-hub-labels__empty {
  margin: 0;
  font-size: 0.78rem;
}

.acoes-label-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 2px solid transparent;
  background: color-mix(in srgb, var(--pill-bg) 18%, white);
  color: var(--pill-fg);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
}

.acoes-label-filter-pill::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--pill-bg);
  flex-shrink: 0;
}

.acoes-label-filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--pill-bg) 25%, transparent);
}

.acoes-label-filter-pill--active {
  border-color: var(--pill-bg);
  background: color-mix(in srgb, var(--pill-bg) 28%, white);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pill-bg) 20%, transparent);
}

.acoes-label-filter-pill__check {
  font-size: 0.85rem !important;
  opacity: 0.9;
}

.acoes-label-filter-pill__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 100px;
  background: color-mix(in srgb, var(--pill-bg) 22%, white);
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0.95;
}

.acoes-hub-labels__active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.1rem;
}

.acoes-hub-labels__active-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
}

/* --- Label chips (display) --- */
.acoes-label-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.5;
  max-width: 100%;
}

.acoes-label-chip--sm {
  padding: 0.12rem 0.45rem;
  font-size: 0.68rem;
}

.acoes-label-chip__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 8rem;
}

.acoes-label-chip__remove {
  display: inline-flex;
  align-items: center;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  opacity: 0.85;
}

.acoes-labels-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.acoes-labels-strip__more {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 700;
}

.acoes-kb-card .acoes-labels-strip {
  margin-top: 0.25rem;
  margin-bottom: 0.15rem;
}

/* Compact labels on the v2 kanban card so they read as a clean visual strip
   without crowding the title/meta rows. */
.acoes-kb-card-v2__labels {
  margin-top: 0.4rem;
  gap: 0.25rem;
}

.acoes-kb-card-v2__labels .acoes-label-chip__text {
  max-width: 6.5rem;
}

.acoes-lista-labels-cell {
  min-width: 6.5rem;
  max-width: 11rem;
}

.acoes-lista-labels-cell .acoes-labels-strip {
  margin-top: 0;
}

.acoes-matriz-item-labels {
  margin: 0.2rem 0 0.35rem 1.1rem;
}

.acoes-hub-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0 0.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
}

.acoes-hub-check {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  user-select: none;
}

.acoes-hub-count {
  margin-left: auto;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  font-variant-numeric: tabular-nums;
}

/* --- Views selector --- */
.acoes-hub-views {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 0.25rem;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 0.25rem;
}

.acoes-hub-view {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: transparent;
  border: none;
  cursor: pointer;
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.acoes-hub-view__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.acoes-hub-view .material-icons {
  font-size: 1rem;
}

.acoes-hub-view:hover {
  color: var(--brand-primary, #00bf9a);
}

.acoes-hub-view--active {
  background: #fff;
  color: var(--brand-primary, #00bf9a);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.acoes-hub-body {
  min-height: 320px;
}

/* Kanban: fill viewport — page chrome stays put, columns scroll independently */
.app-main-wrap:has(.acoes-hub--kanban) {
  overflow: hidden;
}

.app-main-wrap:has(.acoes-hub--kanban) .app-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.app-main-wrap:has(.acoes-hub--kanban) .app-breadcrumbs,
.app-main-wrap:has(.acoes-hub--kanban) .app-page-header {
  flex-shrink: 0;
}

.app-main-wrap:has(.acoes-hub--kanban) .app-page-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  gap: 0;
}

/* Unimed planning wizard: fill the main column (width + remaining height) */
.app-main-wrap:has(.unimed-wizard) {
  overflow: hidden;
}

.app-main-wrap:has(.unimed-wizard) .app-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0.75rem 1rem 0.85rem;
  box-sizing: border-box;
}

.app-main-wrap:has(.unimed-wizard) .app-breadcrumbs {
  flex-shrink: 0;
  margin-bottom: 0.35rem;
}

.app-main-wrap:has(.unimed-wizard) .app-page-header {
  display: none;
}

.app-main-wrap:has(.unimed-wizard) .app-page-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  gap: 0;
}

.unimed-wizard {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-subtle, #e2e8f0);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.unimed-wizard__rail {
  flex: 0 0 17.5rem;
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.15rem;
  color: #fff;
  min-height: 0;
}

.unimed-wizard__rail-steps {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-height: 0;
}

.unimed-wizard__stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.unimed-wizard__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1.75rem 2rem 1rem;
}

.unimed-wizard__context {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.15rem 1.25rem;
  margin-bottom: 1.5rem;
}

.unimed-wizard__context > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.unimed-wizard__context > div:first-child span {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.unimed-wizard__context > div:first-child strong {
  color: #005c40;
  font-size: 0.84rem;
}

.unimed-wizard__context > p {
  display: flex;
  align-items: flex-start;
  justify-self: end;
  gap: 0.3rem;
  margin: 0;
  color: #64748b;
  font-size: 0.74rem;
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.unimed-wizard__context > p .material-icons {
  color: #00995d;
  font-size: 0.9rem;
}

.unimed-wizard__context > div:last-child {
  grid-column: 1 / -1;
  height: 0.25rem;
  overflow: hidden;
  margin-top: 0.4rem;
  background: #e2e8f0;
  border-radius: 999px;
}

.unimed-wizard__context > div:last-child span {
  display: block;
  height: 100%;
  background: #00995d;
  border-radius: inherit;
  transition: width 180ms ease;
}

.unimed-wizard__nav {
  display: flex;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 1rem 2rem 1.15rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.unimed-wizard__step {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: none;
  min-height: 100%;
}

.unimed-wizard__welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.9fr);
  gap: 2rem;
  align-items: start;
}

.unimed-wizard__org-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  padding: 1.1rem 1.15rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.unimed-wizard__org-card-text {
  min-width: 0;
}

.unimed-wizard__org-card-text > p:first-child {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.unimed-wizard__welcome-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.unimed-wizard__welcome-checklist > span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #334155;
  font-size: 0.8rem;
}

.unimed-wizard__welcome-checklist .material-icons {
  color: #00995d;
  font-size: 1rem;
}

.unimed-wizard__guidance {
  padding: 0.75rem 0.9rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
}

.unimed-wizard__guidance summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #005c40;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.unimed-wizard__guidance summary .material-icons {
  color: #00995d;
  font-size: 1rem;
}

.unimed-wizard__guidance p {
  margin: 0.65rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.55;
}

.unimed-wizard__section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.unimed-wizard__readonly-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.unimed-wizard__readonly-badges > span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  color: #005c40;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.unimed-wizard__readonly-badges > span:last-child {
  color: #0f766e;
  background: #ecfdf5;
  border-color: #99f6e4;
}

.unimed-wizard__readonly-badges .material-icons {
  font-size: 0.72rem;
}

.unimed-wizard__positioning,
.unimed-positioning-card {
  padding: 1rem 1.15rem;
  background: #f1f5f5;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
}

.unimed-wizard__positioning > span,
.unimed-positioning-card > span {
  display: block;
  margin-bottom: 0.45rem;
  color: #64748b;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.unimed-wizard__positioning p,
.unimed-positioning-card p {
  margin: 0.12rem 0;
  color: #64748b;
  font-size: 0.82rem;
  font-style: italic;
}

.unimed-wizard__positioning .unimed-wizard__positioning-signature,
.unimed-positioning-card .unimed-positioning-card__signature {
  color: #00995d;
  font-size: 0.95rem;
  font-weight: 800;
}

.unimed-principle-coverage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 0.75rem;
}

.unimed-principle-coverage__summary,
.unimed-principle-coverage__hint {
  grid-column: 1 / -1;
  margin: 0;
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.5;
}

.unimed-principle-coverage__hint {
  color: #64748b;
}

.unimed-principle-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.9rem 1rem;
  color: #334155;
  background: #fff;
  border: 1px solid #dbe4ea;
  border-radius: 0.7rem;
}

.unimed-principle-card--empty {
  border-style: dashed;
  background: #f8fafc;
}

.unimed-principle-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.unimed-principle-card__head strong {
  min-width: 0;
  color: #005c40;
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: normal;
}

.unimed-principle-card__head span {
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  color: #005c40;
  background: #ecfdf5;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.unimed-principle-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

.unimed-principle-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.unimed-principle-card li button {
  width: 100%;
  padding: 0.35rem 0;
  color: #0f172a;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
}

.unimed-principle-card li button:hover {
  color: #005c40;
}

.unimed-principle-card > .app-btn {
  justify-content: center;
}

.unimed-principle-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  color: #005c40;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 0.55rem;
  font-size: 0.78rem;
}

.unimed-principle-filter > .material-icons {
  font-size: 1rem;
}

.unimed-principle-filter > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.unimed-wizard__review {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.85rem;
}

.unimed-wizard__review-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}

.unimed-wizard__review-item > span {
  flex-shrink: 0;
}

.unimed-wizard__review-item > strong {
  min-width: 0;
  text-align: right;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.unimed-essencia-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.9rem 1.25rem;
  border: none;
  cursor: pointer;
  text-align: left;
}

.unimed-essencia-toggle__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  min-width: 0;
}

.unimed-essencia-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.unimed-essencia-block--principles {
  grid-column: 1 / -1;
}

.unimed-essencia-editor {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.unimed-essencia-purpose-edit__title,
.unimed-essencia-purpose-edit__body {
  width: 100%;
  margin-top: 0.4rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.45rem;
  font: inherit;
}

.unimed-essencia-purpose-edit__title {
  font-size: 1.15rem;
  font-weight: 800;
  padding: 0.4rem 0.6rem;
}

.unimed-essencia-purpose-edit__body {
  font-size: 0.92rem;
  line-height: 1.55;
  padding: 0.5rem 0.6rem;
  resize: vertical;
  min-height: 4.5rem;
}

.unimed-essencia-purpose-edit__title:focus,
.unimed-essencia-purpose-edit__body:focus {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 1px;
}

.unimed-essencia-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.unimed-essencia-item-row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.unimed-essencia-item-row .app-input,
.unimed-essencia-item-row .app-textarea {
  flex: 1;
  min-width: 0;
}

.unimed-essencia-item-row__remove {
  flex-shrink: 0;
  min-width: 2rem;
  padding: 0.35rem;
}

.unimed-essencia-positioning-signature {
  font-weight: 800;
  color: #00995d;
}

.unimed-principle-card__head .app-input {
  flex: 1;
  min-width: 0;
}

.unimed-principle-coverage > .app-btn {
  grid-column: 1 / -1;
  justify-self: start;
}

.strategic-identity-card {
  padding: 1.5rem 1.6rem 1.6rem;
}

.strategic-identity-fields {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.strategic-identity-fields .app-field-label {
  font-size: 0.82rem;
}

.strategic-identity-fields .app-textarea,
.strategic-identity-card .smart-input-wrap .app-textarea {
  min-height: 10.5rem;
  padding: 0.95rem 1.05rem;
  font-size: 1rem;
  line-height: 1.65;
}

.strategic-swot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1rem;
}

.strategic-swot-list {
  list-style: none;
  padding: 0.85rem 1rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 6rem;
}

.strategic-swot-composer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid #e2e8f0;
}

.strategic-swot-composer .app-textarea {
  min-height: 4.5rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.app-modal.uc-entity-modal--form[data-testid="strategic-objective-modal"] {
  width: min(100%, 46rem);
}

.strategic-obj-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.strategic-obj-form .app-textarea {
  min-height: 7.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .unimed-wizard {
    flex-direction: column;
    overflow: hidden;
  }

  .unimed-wizard__rail {
    flex: 0 0 auto;
    padding: 0.75rem;
  }

  .unimed-wizard__rail > div:first-child {
    margin-bottom: 0.6rem !important;
  }

  .unimed-wizard__rail-steps {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }

  .unimed-wizard__rail-steps > button {
    flex: 0 0 auto;
    min-width: max-content;
  }

  .unimed-wizard__body {
    padding: 1.25rem 1rem 0.75rem;
  }

  .unimed-wizard__context {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .unimed-wizard__context > p {
    justify-self: start;
  }

  .unimed-wizard__nav {
    padding: 0.8rem 1rem;
  }

  .unimed-wizard__welcome {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .unimed-wizard__welcome-checklist {
    grid-template-columns: 1fr;
  }

  .unimed-wizard__section-heading {
    flex-direction: column;
  }

  .unimed-wizard__readonly-badges {
    justify-content: flex-start;
  }

  .unimed-essencia-blocks {
    grid-template-columns: 1fr;
  }

  .unimed-essencia-toggle__badges {
    justify-content: flex-start;
  }

  .strategic-identity-fields {
    gap: 1.25rem;
  }

  .strategic-identity-card {
    padding: 1.15rem 1rem 1.25rem;
  }
}

/* Strategic plan presentation mode */
.strategic-presentation {
  --presentation-accent: #0ea5e9;
  --presentation-accent-dark: #0f4c75;
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: #0f172a;
  background: #f8fafc;
}

.strategic-presentation__header {
  display: grid;
  grid-template-columns: minmax(13rem, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--presentation-accent-dark);
}

.strategic-presentation__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.strategic-presentation__brand > .material-icons {
  font-size: 1.5rem;
}

.strategic-presentation__brand div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.strategic-presentation__brand strong,
.strategic-presentation__brand span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: break-word;
  word-break: normal;
}

.strategic-presentation__brand strong {
  font-size: 0.82rem;
}

.strategic-presentation__brand span {
  font-size: 0.68rem;
  opacity: 0.8;
}

.strategic-presentation__tabs {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  overflow-x: auto;
}

.strategic-presentation__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.1rem;
  padding: 0.4rem 0.65rem;
  color: rgb(255 255 255 / 72%);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  font: inherit;
  font-size: 0.74rem;
  cursor: pointer;
  white-space: nowrap;
}

.strategic-presentation__tab .material-icons {
  font-size: 0.9rem;
}

.strategic-presentation__tab:hover,
.strategic-presentation__tab--active {
  color: #fff;
  background: rgb(255 255 255 / 14%);
}

.strategic-presentation__tab--active {
  border-color: rgb(255 255 255 / 22%);
}

.strategic-presentation__actions {
  display: flex;
  gap: 0.35rem;
}

.strategic-presentation__icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  color: #fff;
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 0.45rem;
  cursor: pointer;
}

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

.strategic-presentation__icon-btn:hover {
  background: rgb(255 255 255 / 20%);
}

.strategic-presentation__canvas {
  min-height: 0;
  overflow: auto;
  padding: clamp(1.5rem, 4vw, 4rem);
  background:
    radial-gradient(
      circle at 90% 10%,
      color-mix(in srgb, var(--presentation-accent) 11%, transparent),
      transparent 28%
    ),
    #f8fafc;
}

.strategic-presentation__cover {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  max-width: 70rem;
  margin: 0 auto;
}

.strategic-presentation__cover-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.5rem;
  color: #fff;
  background: var(--presentation-accent);
  border-radius: 1.2rem;
  box-shadow: 0 18px 40px
    color-mix(in srgb, var(--presentation-accent) 26%, transparent);
}

.strategic-presentation__cover-mark .material-icons {
  font-size: 2.4rem;
}

.strategic-presentation__eyebrow {
  margin: 0 0 0.45rem;
  color: var(--presentation-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.strategic-presentation__cover h1,
.strategic-presentation__section-heading h1 {
  margin: 0;
  color: var(--presentation-accent-dark);
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.strategic-presentation__year {
  margin: 0.8rem 0 0;
  color: var(--presentation-accent);
  font-size: clamp(1.4rem, 3vw, 2.6rem);
  font-weight: 700;
}

.strategic-presentation__org {
  margin: 1rem 0 0;
  color: #475569;
  font-size: clamp(1rem, 2vw, 1.4rem);
  overflow-wrap: break-word;
  word-break: normal;
}

.strategic-presentation__cover blockquote {
  max-width: 52rem;
  margin: 2.25rem 0 0;
  padding-left: 1.25rem;
  color: #334155;
  border-left: 4px solid var(--presentation-accent);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  line-height: 1.65;
}

.strategic-presentation__section {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-width: 100rem;
  margin: 0 auto;
}

.strategic-presentation__section-heading {
  flex-shrink: 0;
  margin-bottom: clamp(1.25rem, 3vw, 2.5rem);
}

.strategic-presentation__section-heading h1 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.strategic-presentation__essence-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.strategic-presentation__essence-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.strategic-presentation__essence-heading .material-icons {
  font-size: 0.85rem;
}

.strategic-presentation__essence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.strategic-presentation__essence article {
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
}

.strategic-presentation__essence h2 {
  margin: 0 0 0.55rem;
  color: var(--presentation-accent-dark);
  font-size: 0.9rem;
}

.strategic-presentation__essence ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #475569;
  font-size: 0.76rem;
  line-height: 1.6;
}

.strategic-presentation__essence .strategic-presentation__purpose,
.strategic-presentation__essence .strategic-presentation__principles {
  grid-column: 1 / -1;
}

.strategic-presentation__purpose {
  color: #fff;
  background: var(--presentation-accent-dark) !important;
  border-color: transparent !important;
}

.strategic-presentation__purpose > span {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0.75;
  text-transform: uppercase;
}

.strategic-presentation__purpose h2 {
  margin: 0.3rem 0;
  color: #fff;
  font-size: 1.15rem;
}

.strategic-presentation__purpose p {
  max-width: 70rem;
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  opacity: 0.92;
}

.strategic-presentation__value-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.strategic-presentation__value-chips span {
  padding: 0.25rem 0.5rem;
  color: var(--presentation-accent-dark);
  background: color-mix(in srgb, var(--presentation-accent) 8%, #fff);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.strategic-presentation__principles > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.strategic-presentation__principles > div > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.45rem 0.55rem;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.45rem;
  font-size: 0.68rem;
}

.strategic-presentation__principles strong {
  color: var(--presentation-accent);
  white-space: nowrap;
}

.strategic-presentation__positioning p {
  margin: 0.15rem 0;
  color: #64748b;
  font-size: 0.78rem;
  font-style: italic;
}

.strategic-presentation__positioning
  .strategic-presentation__positioning-signature {
  color: var(--presentation-accent);
  font-size: 0.9rem;
  font-weight: 800;
}

.strategic-presentation__identity-grid,
.strategic-presentation__swot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.5rem);
  flex: 1;
}

.strategic-presentation__identity-grid article {
  padding: clamp(1.25rem, 2.5vw, 2.25rem);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: 4px solid var(--presentation-accent);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgb(15 23 42 / 6%);
}

.strategic-presentation__identity-grid .material-icons {
  color: var(--presentation-accent);
  font-size: 1.8rem;
}

.strategic-presentation__identity-grid h2 {
  margin: 0.75rem 0 0.6rem;
  color: var(--presentation-accent-dark);
  font-size: 1.1rem;
}

.strategic-presentation__identity-grid p {
  margin: 0;
  color: #475569;
  font-size: clamp(0.9rem, 1.3vw, 1.08rem);
  line-height: 1.65;
}

.strategic-presentation__swot-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.strategic-presentation__swot-grid article {
  min-height: 0;
  padding: 1.15rem 1.25rem;
  background: color-mix(in srgb, var(--swot-color) 6%, #fff);
  border: 1px solid color-mix(in srgb, var(--swot-color) 24%, #e2e8f0);
  border-radius: 0.9rem;
}

.strategic-presentation__swot-grid header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--swot-color);
}

.strategic-presentation__swot-grid h2 {
  margin: 0;
  font-size: 1rem;
}

.strategic-presentation__swot-grid ul {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.55;
}

.strategic-presentation__map {
  display: grid;
  grid-template-columns: repeat(var(--map-columns), minmax(15rem, 1fr));
  gap: 0.9rem;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

.strategic-presentation__map > article {
  overflow: hidden;
  background: color-mix(in srgb, var(--column-color) 5%, #fff);
  border: 1px solid color-mix(in srgb, var(--column-color) 24%, #e2e8f0);
  border-radius: 0.9rem;
}

.strategic-presentation__map > article > header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem;
  color: var(--column-color);
  background: color-mix(in srgb, var(--column-color) 9%, #fff);
  border-bottom: 1px solid color-mix(in srgb, var(--column-color) 20%, #e2e8f0);
}

.strategic-presentation__map h2 {
  margin: 0;
  font-size: 0.95rem;
}

.strategic-presentation__map header span:last-child {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.68rem;
  opacity: 0.75;
}

.strategic-presentation__objectives {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem;
}

.strategic-presentation__objectives > div {
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--column-color);
  border-radius: 0.55rem;
}

.strategic-presentation__objectives strong {
  display: block;
  font-size: 0.82rem;
  line-height: 1.35;
}

.strategic-presentation__objectives p {
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.74rem;
  line-height: 1.4;
}

.strategic-presentation__objectives span {
  display: block;
  margin-top: 0.4rem;
  color: var(--column-color);
  font-size: 0.7rem;
  font-weight: 700;
}

.strategic-presentation__empty {
  margin: 0.7rem 0 0;
  color: #94a3b8;
  font-size: 0.78rem;
}

.strategic-presentation__footer {
  display: grid;
  grid-template-columns: auto minmax(4rem, 12rem) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 1rem;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.strategic-presentation__footer > span,
.strategic-presentation__footer > p {
  margin: 0;
  color: #64748b;
  font-size: 0.72rem;
}

.strategic-presentation__progress {
  height: 0.3rem;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 999px;
}

.strategic-presentation__progress span {
  display: block;
  height: 100%;
  background: var(--presentation-accent);
  border-radius: inherit;
  transition: width 180ms ease;
}

.strategic-presentation__footer > div:last-child {
  display: flex;
  gap: 0.4rem;
}

.strategic-presentation__footer button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  color: var(--presentation-accent-dark);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.45rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.strategic-presentation__footer button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

@media (max-width: 800px) {
  .strategic-presentation__header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .strategic-presentation__tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .strategic-presentation__identity-grid {
    grid-template-columns: 1fr;
  }

  .strategic-presentation__essence,
  .strategic-presentation__principles > div {
    grid-template-columns: 1fr;
  }

  .strategic-presentation__essence .strategic-presentation__principles {
    grid-column: auto;
  }

  .strategic-presentation__swot-grid {
    grid-template-columns: 1fr;
  }

  .strategic-presentation__footer {
    grid-template-columns: auto minmax(3rem, 1fr) auto;
  }

  .strategic-presentation__footer > p {
    display: none;
  }
}

@media print {
  body.strategic-presentation-open * {
    visibility: hidden;
  }

  body.strategic-presentation-open .strategic-presentation,
  body.strategic-presentation-open .strategic-presentation * {
    visibility: visible;
  }

  .strategic-presentation {
    position: fixed;
    inset: 0;
    display: block;
    background: #fff;
  }

  .strategic-presentation__header,
  .strategic-presentation__footer {
    display: none;
  }

  .strategic-presentation__canvas {
    padding: 0;
    overflow: visible;
    background: #fff;
  }
}

.acoes-hub--kanban {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 0.75rem;
}

.acoes-hub--kanban .acoes-kpi-row {
  grid-template-columns: repeat(var(--acoes-kpi-cols, 7), minmax(0, 1fr));
  gap: 0.5rem;
}

.acoes-hub--kanban .acoes-kpi-tile {
  padding: 0.625rem 0.75rem;
  gap: 0.375rem;
}

.acoes-hub--kanban .acoes-kpi-count {
  font-size: 1.625rem;
}

.acoes-hub--kanban .acoes-kpi-row,
.acoes-hub--kanban .acoes-hub-toolbar,
.acoes-hub--kanban .acoes-hub-period,
.acoes-hub--kanban .acoes-hub-context,
.acoes-hub--kanban .acoes-hub-labels,
.acoes-hub--kanban .acoes-hub-checks,
.acoes-hub--kanban .acoes-hub-views {
  flex-shrink: 0;
}

.acoes-hub-body--kanban {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.acoes-hub-body--kanban > .app-text-danger {
  flex-shrink: 0;
  margin: 0 0 0.5rem;
}

.acoes-kb-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 720px) {
  .acoes-hub--kanban .acoes-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acoes-hub-labels__search-wrap {
    max-width: 100%;
  }

  .acoes-hub-labels__scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .acoes-hub-labels__hint {
    flex: 1 1 100%;
  }

  .acoes-hub-count {
    margin-left: 0;
    width: 100%;
    text-align: right;
  }

  .acoes-lista-labels-cell {
    max-width: 7rem;
  }
}

.acoes-hub-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary, #64748b);
}

.acoes-hub-empty .material-icons {
  font-size: 2.5rem;
  color: #cbd5e1;
  display: block;
  margin: 0 auto 0.5rem;
}

.acoes-hub-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

/* --- Prova de efeito (verification fieldset) --- */
.acoes-hub-verify {
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  padding: 0.75rem 0.875rem 0.875rem;
  margin: 0.25rem 0;
  background: #f8fafc;
}

.acoes-hub-verify-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f766e;
}

.acoes-hub-verify-legend-hint {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #64748b;
  font-size: 0.72rem;
}

.acoes-hub-verify-warn,
.acoes-hub-verify-ok {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
}

.acoes-hub-verify-warn {
  background: #fef3c7;
  color: #92400e;
}

.acoes-hub-verify-ok {
  background: #ccfbf1;
  color: #0f766e;
}

/* --- Chip na card do Kanban --- */
.acoes-kb-verify {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-top: 0.25rem;
  align-self: flex-start;
}

.acoes-kb-verify .material-icons {
  font-size: 0.8rem;
}

.acoes-kb-verify--ok {
  background: #ccfbf1;
  color: #0f766e;
}

.acoes-kb-verify--warn {
  background: #fef3c7;
  color: #92400e;
}

.acoes-kb-verify--muted {
  background: #f1f5f9;
  color: #64748b;
}

/* --- Metas por período (IndicadorDetail) --- */
.ind-period-targets {
  padding: 1.25rem;
}

.ind-period-targets-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 0.5rem;
}

.ind-period-targets-title .material-icons {
  color: #0f766e;
}

.ind-period-targets-lead {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 1rem;
  line-height: 1.5;
}

.ind-period-targets-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 2fr auto;
  gap: 0.75rem;
  align-items: end;
}

@media (max-width: 900px) {
  .ind-period-targets-form {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Ratio em "Com prova" do KPI row --- */
.acoes-kpi-ratio {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.75;
  margin-left: 0.2rem;
}

.acoes-kpi-ratio small {
  font-size: 0.75rem;
  opacity: 0.85;
}

/* --- Kanban --- */
.acoes-kb-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 0.875rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.acoes-hub--kanban .acoes-kb-board {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: stretch;
  gap: 0.75rem;
  padding-bottom: 0.25rem;
  scroll-snap-type: x proximity;
}

@media (max-width: 1100px) {
  .acoes-kb-board {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  .acoes-kb-board {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

.acoes-kb-col {
  background: #f8fafc;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-height: 240px;
}

.acoes-hub--kanban .acoes-kb-col {
  flex: 0 0 280px;
  min-width: 280px;
  max-width: none;
  width: 280px;
  min-height: 0;
  padding: 0.5rem;
  gap: 0;
  scroll-snap-align: start;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6);
}

.acoes-kb-col-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.375rem;
}

.acoes-hub--kanban .acoes-kb-col-head {
  flex-shrink: 0;
  padding: 0.375rem 0.375rem 0.5rem;
  margin-bottom: 0.375rem;
  border-bottom: 1px solid rgb(226 232 240 / 0.85);
}

.acoes-kb-col-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.acoes-kb-col-icon .material-icons {
  font-size: 1rem;
}

.acoes-kb-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex: 1;
  margin: 0;
}

.acoes-kb-col-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 99px;
  padding: 0.1rem 0.5rem;
  font-variant-numeric: tabular-nums;
}

.acoes-kb-col-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 120px;
}

.acoes-hub--kanban .acoes-kb-col-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  /* Y only: an all-axis `contain` here swallows horizontal touch swipes that
     start on a card, so the board (the x-scroller) never receives them */
  overscroll-behavior-y: contain;
  overscroll-behavior-x: auto;
  padding: 0.125rem 0.25rem 0.375rem 0.125rem;
  gap: 0.5rem;
  -webkit-overflow-scrolling: touch;
  align-items: stretch;
}

/* Prevent flex column from squishing cards to header-only height */
.acoes-hub--kanban .acoes-kb-col-body > .acoes-kb-card {
  flex-shrink: 0;
  flex-grow: 0;
  min-height: min-content;
}

.acoes-kb-col-empty {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
  padding: 1rem 0.5rem;
  border: 1px dashed #e2e8f0;
  border-radius: 8px;
  margin: 0;
}

.acoes-hub--kanban .acoes-kb-col-empty {
  padding: 2rem 0.5rem;
}

.acoes-kb-col-pagination {
  flex-shrink: 0;
  padding: 0.5rem 0.35rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  background: var(--surface-secondary, #f8fafc);
  justify-content: center;
}
.acoes-kb-col-pagination .tt-pagination-btns {
  width: 100%;
  justify-content: center;
}

.acoes-kb-card {
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 0.625rem 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.acoes-kb-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 10px rgb(15 23 42 / 0.08);
}

.acoes-kb-card:active {
  transform: scale(0.99);
}

.acoes-kb-card[data-priority="urgent"] {
  border-left: 3px solid #dc2626;
}

.acoes-kb-card[data-priority="high"] {
  border-left: 3px solid #f59e0b;
}

.acoes-kb-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.acoes-kb-src {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.acoes-kb-src .material-icons {
  font-size: 0.85rem;
}

.acoes-kb-prio {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.acoes-kb-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  margin: 0;
  line-height: 1.25;
}

.acoes-kb-meta {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.acoes-kb-meta .material-icons {
  font-size: 0.85rem;
}

.acoes-kb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.15rem;
  padding-top: 0.375rem;
  border-top: 1px dashed var(--border-color, #e2e8f0);
}

.acoes-kb-due {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.acoes-kb-due .material-icons {
  font-size: 0.85rem;
}

.acoes-kb-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.acoes-kb-qa {
  background: #f1f5f9;
  border: none;
  color: #475569;
  border-radius: 6px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.acoes-kb-qa:hover {
  background: #dcfce7;
  color: #16a34a;
}

.acoes-kb-qa .material-icons {
  font-size: 0.85rem;
}

.acoes-kb-avatar {
  width: 22px;
  height: 22px;
  border-radius: 99px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

/* ── Ações board: maximize Kanban viewport (Monday-style) ───────── */
.app-page--acoes-board .app-breadcrumbs,
.app-page--acoes-board .app-page-header {
  display: none;
}

.app-page--acoes-board {
  padding-top: 0.5rem;
}

.app-main-wrap:has(.app-page--acoes-board) .app-page,
.app-main-wrap:has(.app-page--acoes-board) .app-page-body {
  height: 100%;
  min-height: 0;
}

/* ── Kanban variant switcher (Ações 1/2/3 preview) ───────────────── */
.acoes-kb-variant-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  border: 1px solid #c7d2fe;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 55%, #ecfdf5 100%);
  box-shadow: 0 2px 12px rgb(79 70 229 / 0.08);
}

.acoes-kb-variant-switcher--compact {
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 10px;
  flex-shrink: 0;
}

.acoes-kb-variant-switcher--compact .acoes-kb-variant-switcher__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.acoes-kb-variant-switcher--compact .acoes-kb-variant-switcher__badge {
  margin: 0;
  flex-shrink: 0;
}

.acoes-kb-variant-switcher--compact .acoes-kb-variant-switcher__title {
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
}

.acoes-kb-variant-switcher--compact .acoes-kb-variant-switcher__desc {
  font-size: 0.75rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.acoes-kb-variant-switcher--compact .acoes-kb-variant-switcher__tabs {
  flex-shrink: 0;
}

.acoes-kb-variant-switcher--compact .acoes-kb-variant-switcher__tab {
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
}

.acoes-kb-variant-switcher__badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4338ca;
  background: #fff;
  border: 1px solid #c7d2fe;
  border-radius: 99px;
  padding: 0.15rem 0.55rem;
  margin-bottom: 0.35rem;
}

.acoes-kb-variant-switcher__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e1b4b;
  letter-spacing: -0.02em;
}

.acoes-kb-variant-switcher__desc {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: #475569;
  max-width: 42rem;
  line-height: 1.45;
}

.acoes-kb-variant-switcher__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.acoes-kb-variant-switcher__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.12s,
    color 0.15s;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.acoes-kb-variant-switcher__tab .material-icons {
  font-size: 1.1rem;
}

.acoes-kb-variant-switcher__tab:hover {
  border-color: #a5b4fc;
  color: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(79 70 229 / 0.12);
}

.acoes-kb-variant-switcher__tab--active {
  border-color: #6366f1;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  box-shadow: 0 4px 14px rgb(79 70 229 / 0.35);
}

.acoes-kb-variant-switcher__tab--active:hover {
  color: #fff;
  border-color: #4f46e5;
}

.acoes-kb-variant-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.625rem 0.875rem;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  flex-shrink: 0;
}

.acoes-kb-variant-toolbar__hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
}

.acoes-kb-variant-toolbar__hint .material-icons {
  font-size: 1rem;
  color: #94a3b8;
}

.acoes-kb-variant-toolbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.acoes-kb-variant-toolbar__btn:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.08);
}

.acoes-kb-variant-toolbar__btn .material-icons {
  font-size: 1rem;
}

.acoes-kb-variant-toolbar__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
}

.acoes-kb-variant-toolbar__stat .material-icons {
  font-size: 1rem;
  color: #64748b;
}

.acoes-kb-variant-toolbar--v1 {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.acoes-kb-variant-toolbar--v2 {
  background: linear-gradient(90deg, #f1f5f9, #f8fafc);
  border: 1px solid #cbd5e1;
}

.acoes-kb-variant-toolbar--v3 {
  background: transparent;
  border: none;
  padding: 0 0 0.5rem;
  margin-bottom: 0.5rem;
}

.acoes-kb-v3-tabs {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
  background: #f1f5f9;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.acoes-kb-v3-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.acoes-kb-v3-tab .material-icons {
  font-size: 1.05rem;
}

.acoes-kb-v3-tab--active {
  background: #fff;
  color: #0f766e;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.08);
}

.acoes-kb-card-head-end {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.acoes-kb-due--head {
  font-size: 0.72rem;
}

.acoes-kb-foot-spacer {
  flex: 1;
}

/* ── Variant 1: Focus Flow (wide columns, generous type) ────────── */
.acoes-hub--kanban-v1 .acoes-kb-board--v1 {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 1.25rem;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  align-items: stretch;
}

.acoes-hub--kanban-v1 .acoes-kb-col--v1 {
  flex: 0 0 320px;
  min-width: 320px;
  width: 320px;
  max-width: none;
  min-height: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.875rem;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.04);
  scroll-snap-align: start;
}

.acoes-hub--kanban-v1 .acoes-kb-col-head--v1 {
  padding: 0.5rem 0.25rem 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.acoes-hub--kanban-v1 .acoes-kb-col-title {
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.acoes-hub--kanban-v1 .acoes-kb-col-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.acoes-hub--kanban-v1 .acoes-kb-col-icon .material-icons {
  font-size: 1.15rem;
}

.acoes-hub--kanban-v1 .acoes-kb-col-count {
  font-size: 0.8rem;
  padding: 0.2rem 0.65rem;
}

.acoes-hub--kanban-v1 .acoes-kb-col-body {
  gap: 0.75rem;
}

.acoes-hub--kanban-v1 .acoes-kb-card--v1 {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  gap: 0.5rem;
}

.acoes-hub--kanban-v1 .acoes-kb-title {
  font-size: 1rem;
  line-height: 1.4;
}

.acoes-hub--kanban-v1 .acoes-kb-src {
  font-size: 0.78rem;
}

.acoes-hub--kanban-v1 .acoes-kb-prio {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
}

.acoes-hub--kanban-v1 .acoes-kb-meta {
  font-size: 0.8rem;
}

.acoes-hub--kanban-v1 .acoes-kb-due {
  font-size: 0.8rem;
}

.acoes-hub--kanban-v1 .acoes-kb-col-empty {
  font-size: 0.85rem;
  padding: 2.5rem 1rem;
}

/* ── Variant 2: Command Center (Jira-style fixed columns) ─────────── */
.acoes-hub--kanban-v2 .acoes-kb-board--v2 {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 1rem;
  padding: 0.15rem 0.5rem 0.75rem;
  align-items: stretch;
}

.acoes-hub--kanban-v2 .acoes-kb-col--v2 {
  flex: 0 0 280px;
  min-width: 280px;
  width: 280px;
  max-width: none;
  min-height: 0;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.06);
}

.acoes-hub--kanban-v2 .acoes-kb-col--v2::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--col-accent, #64748b);
}

.acoes-hub--kanban-v2 .acoes-kb-col-head--v2 {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  padding: 0.75rem 0.875rem;
  margin: 0;
  border-bottom: 1px solid #e2e8f0;
}

.acoes-hub--kanban-v2 .acoes-kb-col-title {
  font-size: 0.78rem;
  font-weight: 800;
}

.acoes-hub--kanban-v2 .acoes-kb-col-count {
  font-size: 0.75rem;
  min-width: 1.75rem;
  text-align: center;
  background: #fff;
}

.acoes-hub--kanban-v2 .acoes-kb-col-body {
  padding: 0.625rem 0.75rem 0.875rem;
  gap: 0.625rem;
}

.acoes-hub--kanban-v2 .acoes-kb-card--v2 {
  padding: 0.875rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05), 0 4px 12px rgb(15 23 42 / 0.04);
  gap: 0.45rem;
}

.acoes-hub--kanban-v2 .acoes-kb-card--v2:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 4px rgb(15 23 42 / 0.06), 0 8px 20px rgb(15 23 42 / 0.08);
  transform: translateY(-1px);
}

/* Left-border criticality accent — reinforces the chip on the whole card.
   Covers both legacy English keys and the pt-BR / Monday labels stored in
   the DB (e.g. "Critica ⚠️️", "Alta"). */
.acoes-hub--kanban-v2 .acoes-kb-card--v2[data-priority="urgent"],
.acoes-hub--kanban-v2 .acoes-kb-card--v2[data-priority="Critica ⚠️️"],
.acoes-hub--kanban-v2 .acoes-kb-card--v2[data-priority="Crítica ⚠️️"] {
  border-left: 4px solid #ef4444;
}

.acoes-hub--kanban-v2 .acoes-kb-card--v2[data-priority="high"],
.acoes-hub--kanban-v2 .acoes-kb-card--v2[data-priority="Alta"] {
  border-left: 4px solid #f59e0b;
}

.acoes-hub--kanban-v2 .acoes-kb-title {
  font-size: 0.925rem;
  line-height: 1.35;
}

.acoes-hub--kanban-v2 .acoes-kb-foot {
  border-top-style: solid;
  border-top-color: #f1f5f9;
  padding-top: 0.5rem;
}

.acoes-hub--kanban-v2 .acoes-kb-avatar,
.acoes-hub--kanban-v2 .acoes-assign-trigger {
  width: 30px;
  height: 30px;
  font-size: 0.72rem;
}

.acoes-hub--kanban-v2 .acoes-kb-col-empty {
  margin: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

/* ── Variant 3: Visual Board (color columns, expressive cards) ──── */
.acoes-hub--kanban-v3 .acoes-kb-board--v3 {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 1.25rem;
  padding-bottom: 0.5rem;
  align-items: stretch;
}

.acoes-hub--kanban-v3 .acoes-kb-col--v3 {
  flex: 0 0 320px;
  min-width: 320px;
  width: 320px;
  max-width: none;
  min-height: 0;
  background: color-mix(in srgb, var(--col-tint, #64748b) 6%, #fff);
  border: 1px solid color-mix(in srgb, var(--col-tint, #64748b) 18%, #e2e8f0);
  border-radius: 18px;
  padding: 0.75rem;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7);
}

.acoes-hub--kanban-v3 .acoes-kb-col-head--v3 {
  padding: 0.5rem 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid
    color-mix(in srgb, var(--col-tint, #64748b) 12%, transparent);
}

.acoes-hub--kanban-v3 .acoes-kb-col-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--col-tint, #64748b) 14%, #fff) !important;
}

.acoes-hub--kanban-v3 .acoes-kb-col-icon .material-icons {
  font-size: 1.2rem;
}

.acoes-hub--kanban-v3 .acoes-kb-col-title {
  font-size: 0.95rem;
  font-weight: 800;
}

.acoes-hub--kanban-v3 .acoes-kb-col-count {
  font-size: 0.82rem;
  font-weight: 800;
  background: #fff;
  border-color: color-mix(in srgb, var(--col-tint, #64748b) 20%, #e2e8f0);
  color: var(--col-tint, #64748b);
}

.acoes-hub--kanban-v3 .acoes-kb-col-body {
  gap: 0.875rem;
}

.acoes-hub--kanban-v3 .acoes-kb-card--v3 {
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid rgb(255 255 255 / 0.8);
  border-left-width: 5px;
  background: #fff;
  box-shadow: 0 2px 6px rgb(15 23 42 / 0.06), 0 8px 24px rgb(15 23 42 / 0.04);
  gap: 0.55rem;
}

.acoes-hub--kanban-v3 .acoes-kb-card--v3:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgb(15 23 42 / 0.08), 0 12px 32px rgb(15 23 42 / 0.08);
}

.acoes-hub--kanban-v3 .acoes-kb-title {
  font-size: 1.02rem;
  line-height: 1.4;
  font-weight: 700;
}

.acoes-hub--kanban-v3 .acoes-kb-src {
  font-size: 0.78rem;
  background: color-mix(in srgb, currentColor 8%, #fff);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.acoes-hub--kanban-v3 .acoes-kb-prio {
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
}

.acoes-hub--kanban-v3 .acoes-kb-due--head {
  font-size: 0.78rem;
  font-weight: 700;
  background: #f8fafc;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.acoes-hub--kanban-v3 .acoes-kb-col-empty {
  font-size: 0.88rem;
  padding: 3rem 1rem;
  background: rgb(255 255 255 / 0.5);
  border-color: color-mix(in srgb, var(--col-tint, #64748b) 15%, #e2e8f0);
}

/* ════════════════════════════════════════════════════════════════
   Three structurally different layouts (Ações 1 / 2 / 3)
   V1 Monday left panel | V2 Jira top bands | V3 Linear rail+inspector
   ════════════════════════════════════════════════════════════════ */
.acoes-hub--layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
  min-height: 0;
  height: 100%;
}

.acoes-lay {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  gap: 0.35rem;
}

/* Shared search + filter field primitives */
.acoes-hub-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.acoes-hub-search__icon {
  position: absolute;
  left: 0.6rem;
  font-size: 1.1rem;
  color: #94a3b8;
  pointer-events: none;
}

.acoes-hub-search__input {
  width: 100%;
  padding-left: 2.1rem !important;
  background-image: none;
}

.acoes-hub-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.acoes-hub-field__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.acoes-hub-quickfilters {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* Board height chain (all variants) */
.acoes-lay-v1__board,
.acoes-lay-v2__board,
.acoes-lay-v3__board {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.acoes-lay-v1__board .acoes-hub-body,
.acoes-lay-v1__board .acoes-hub-body--kanban,
.acoes-lay-v1__board .acoes-hub-body--matriz,
.acoes-lay-v2__board .acoes-hub-body,
.acoes-lay-v2__board .acoes-hub-body--kanban,
.acoes-lay-v2__board .acoes-hub-body--matriz,
.acoes-lay-v3__board .acoes-hub-body,
.acoes-lay-v3__board .acoes-hub-body--kanban,
.acoes-lay-v3__board .acoes-hub-body--matriz {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ── V1 Monday: LEFT panel fixo + quadro à direita ────────────── */
.acoes-lay-v1__frame {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 4px 24px rgb(15 23 42 / 0.07);
}

.acoes-lay-v1__left {
  flex: 0 0 272px;
  min-width: 240px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fafbff 0%, #f8fafc 100%);
  overflow: hidden;
}

.acoes-lay-v1__left-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1rem 0.75rem;
  font-size: 1rem;
  font-weight: 800;
  color: #4338ca;
}

.acoes-lay-v1__left-brand-text {
  white-space: nowrap;
}

.acoes-lay-v1__left-brand .material-icons {
  font-size: 1.35rem;
}

.acoes-lay-v1__views .acoes-hub-views {
  flex-direction: column;
  border: none;
  background: transparent;
  padding: 0 0.65rem;
  gap: 0.2rem;
}

.acoes-lay-v1__views .acoes-hub-view {
  justify-content: flex-start;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  font-size: 0.875rem;
}

.acoes-lay-v1__views .acoes-hub-view--active {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 700;
}

.acoes-lay-v1__left-divider {
  height: 1px;
  margin: 0.65rem 1rem;
  background: #e2e8f0;
}

.acoes-lay-v1__kpis {
  flex-shrink: 0;
  padding: 0 0.75rem 0.5rem;
}

.acoes-lay-v1__kpis .acoes-kpi-row--v1 {
  flex-direction: column;
  gap: 0.35rem;
}

.acoes-lay-v1__kpis .acoes-kpi-tile--v1 {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  width: 100%;
}

.acoes-lay-v1__filters-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.acoes-lay-v1__section-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.acoes-lay-v1__filters-scroll .acoes-hub-checks {
  flex-direction: column;
  align-items: flex-start;
  border: none;
  padding: 0;
  background: transparent;
}

.acoes-lay-v1__main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f1f5f9;
}

.acoes-lay-v1__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.acoes-lay-v1__header .acoes-hub-search {
  flex: 1;
  max-width: 480px;
}

.acoes-lay-v1__left {
  transition:
    flex-basis 0.24s ease,
    width 0.24s ease,
    min-width 0.24s ease,
    opacity 0.2s ease,
    border-width 0.24s ease;
}

.acoes-lay-v1__left--collapsed {
  flex: 0 0 0 !important;
  min-width: 0 !important;
  width: 0 !important;
  opacity: 0;
  overflow: hidden;
  border-width: 0;
  padding: 0;
  pointer-events: none;
}

.acoes-lay-v1__frame--focus .acoes-lay-v1__board,
.acoes-lay-v2__frame--focus .acoes-lay-v2__board,
.acoes-lay-v3__frame--focus .acoes-lay-v3__board {
  padding: 0.35rem;
}

/* Shared fullscreen / focus controls */
.acoes-lay-focus-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  flex-shrink: 0;
  height: var(--ds-btn-h);
  padding: 0 0.75rem;
  border-radius: var(--ds-radius-md);
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.acoes-lay-focus-toggle:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #1e293b;
}

.acoes-lay-focus-toggle .material-icons {
  font-size: 1.05rem;
}

.acoes-lay--focus .acoes-lay-focus-toggle {
  border-color: #6366f1;
  background: #eef2ff;
  color: #4338ca;
}

.acoes-lay-edge-reveal {
  position: absolute;
  z-index: 12;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 56px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgb(15 23 42 / 0.12);
  transition: background 0.15s, color 0.15s;
}

.acoes-lay-edge-reveal:hover {
  background: #eef2ff;
  color: #4338ca;
}

.acoes-lay-edge-reveal--left {
  left: 0;
  border-radius: 0 10px 10px 0;
  border-left: none;
}

.acoes-lay-edge-reveal--right {
  right: 0;
  border-radius: 10px 0 0 10px;
  border-right: none;
}

/* Always-visible handles on hub panel edges */
.acoes-lay-panel-toggle {
  position: absolute;
  top: 50%;
  z-index: 14;
  transform: translateY(-50%);
  width: 24px;
  height: 48px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgb(15 23 42 / 0.1);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.acoes-lay-panel-toggle:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.acoes-lay-panel-toggle .material-icons {
  font-size: 1.1rem;
}

.acoes-lay-panel-toggle--left {
  border-radius: 0 8px 8px 0;
  border-left: none;
}

.acoes-lay-panel-toggle--right {
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.acoes-lay-v1__frame > .acoes-lay-panel-toggle--left {
  left: calc(272px - 12px);
}

.acoes-lay-v3__frame > .acoes-lay-panel-toggle--left {
  left: calc(56px - 12px);
}

.acoes-lay-v3__frame > .acoes-lay-panel-toggle--right {
  right: calc(288px - 12px);
}

.acoes-lay-v1__main {
  position: relative;
}

/* ── V2 Jira: faixas horizontais no topo, quadro 100% ──────────── */
.acoes-lay-v2__frame {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  background: #f4f5f7;
}

.acoes-lay-v2__masthead {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 2px solid #dfe1e6;
  transition: border-color 0.2s;
}

.acoes-lay-v2__masthead--collapsed {
  border-bottom-width: 1px;
}

.acoes-lay-v2__masthead--collapsed .acoes-lay-v2__masthead-row {
  border-bottom: none;
}

.acoes-lay-v2__masthead-views {
  padding: 0.45rem 0.75rem 0;
  border-bottom: 1px solid #ebecf0;
}

.acoes-lay-v2__masthead-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem 0.75rem;
  border-bottom: 1px solid #ebecf0;
}

.acoes-lay-v2__masthead-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #ebecf0;
}

.acoes-lay-v2__views {
  width: 100%;
  min-width: 0;
}

.acoes-lay-v2__views .acoes-hub-views {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  background: #f4f5f7;
  padding: 0.2rem;
  gap: 0.2rem;
  border-radius: 10px;
}

.acoes-lay-v2__views .acoes-hub-view {
  padding: 0.45rem 0.35rem;
  border-radius: 8px;
  border: none;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #5e6c84;
  background: transparent;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 2.75rem;
}

.acoes-lay-v2__views .acoes-hub-view .material-icons {
  font-size: 1.15rem;
}

.acoes-lay-v2__views .acoes-hub-view__label {
  font-size: 0.65rem;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.acoes-lay-v2__views .acoes-hub-view--active {
  color: #0052cc;
  background: #fff;
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.08);
}

.acoes-lay-v2__masthead-search {
  flex: 1;
  min-width: 0;
}

.acoes-lay-v2__masthead-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.acoes-lay-v2__masthead-actions .uc-entity-toolbar__cta {
  align-self: center;
}

@media (max-width: 768px) {
  .acoes-lay-v2__masthead-views,
  .acoes-lay-v2__masthead-toolbar {
    padding-inline: 0.65rem;
  }

  .acoes-lay-v2__masthead-row {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }

  .acoes-lay-v2__views .acoes-hub-views {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .acoes-lay-v2__kpi-strip {
    padding-inline: 0.65rem;
  }
}

.acoes-lay-v2__filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 1rem;
  background: #fafbfc;
  border-bottom: 1px solid #ebecf0;
}

.acoes-lay-v2__filter-bar .acoes-hub-quickfilters {
  flex-direction: row;
  flex-wrap: wrap;
  flex: 1;
  gap: 0.5rem;
}

.acoes-lay-v2__filter-bar .acoes-hub-field {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.acoes-lay-v2__filter-bar .acoes-hub-field__label {
  white-space: nowrap;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.acoes-lay-v2__filter-bar .app-filter-select {
  min-width: 7.5rem;
  font-size: 0.8rem;
}

.acoes-lay-v2__filter-bar-end .acoes-hub-checks {
  border: none;
  padding: 0;
  background: transparent;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.acoes-lay-v2__kpi-strip {
  border-bottom: 1px solid #ebecf0;
  background: #fafbfc;
}

.acoes-lay-v2__kpi-strip--collapsed .acoes-lay-v2__kpi-toggle {
  color: #42526e;
}

.acoes-lay-v2__kpi-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: none;
  background: transparent;
  color: #5e6c84;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.acoes-lay-v2__kpi-toggle:hover {
  color: #0052cc;
  background: rgb(0 82 204 / 0.04);
}

.acoes-lay-v2__kpi-toggle:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgb(0 82 204 / 0.35);
}

.acoes-lay-v2__kpi-toggle-hint {
  margin-left: 0.15rem;
  color: #97a0af;
  font-size: 0.7rem;
  font-weight: 500;
}

@media (max-width: 640px) {
  .acoes-lay-v2__kpi-toggle-hint {
    display: none;
  }
}

.acoes-lay-v2__kpi-toggle-chev {
  margin-left: auto;
  transition: transform 0.15s ease;
}

.acoes-lay-v2__kpi-panel {
  container-type: inline-size;
  container-name: acoes-kpi-panel;
  padding: 0.9rem 0.75rem 1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

/* Breathing room between Métricas and the kanban/board below */
.acoes-lay-v2__board {
  padding-top: 0.9rem;
}

.acoes-lay-v2__kpi-strip--open .acoes-lay-v2__kpi-toggle {
  border-bottom: 1px solid #ebecf0;
}

/* Narrow viewports: horizontal strip of compact tiles (no wrap) */
.acoes-lay-v2__kpi-panel .acoes-kpi-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  width: max-content;
  min-width: 100%;
  container-type: normal;
}

.acoes-lay-v2__kpi-panel .acoes-kpi-tile {
  flex: 0 0 min(8.5rem, 40vw);
  padding: 0.55rem 0.65rem;
  gap: 0.35rem;
}

.acoes-lay-v2__kpi-panel .acoes-kpi-count {
  font-size: 1.35rem;
}

.acoes-lay-v2__kpi-panel .acoes-kpi-label {
  font-size: 0.62rem;
}

.acoes-lay-v2__kpi-panel .acoes-kpi-label__full {
  display: none;
}

.acoes-lay-v2__kpi-panel .acoes-kpi-label__short {
  display: inline;
}

.acoes-lay-v2__kpi-panel .acoes-kpi-spark,
.acoes-lay-v2__kpi-panel .acoes-kpi-foot {
  display: none;
}

.acoes-lay-v2__kpi-panel .acoes-kpi-body {
  align-items: center;
}

@media (min-width: 1280px) {
  .acoes-lay-v2__masthead-views,
  .acoes-lay-v2__masthead-toolbar {
    padding-inline: 1rem;
  }

  .acoes-lay-v2__views .acoes-hub-view {
    flex-direction: row;
    min-height: auto;
    padding: 0.45rem 0.65rem;
    gap: 0.35rem;
  }

  .acoes-lay-v2__views .acoes-hub-view__label {
    font-size: 0.78rem;
    -webkit-line-clamp: 1;
    white-space: nowrap;
  }

  /* Desktop: always keep all 7 metrics on one row; density via container queries */
  .acoes-lay-v2__kpi-panel .acoes-kpi-row {
    display: grid;
    grid-template-columns: repeat(var(--acoes-kpi-cols, 7), minmax(0, 1fr));
    width: 100%;
    container-type: inline-size;
    container-name: acoes-kpi;
  }

  .acoes-lay-v2__kpi-panel .acoes-kpi-tile {
    flex: initial;
    padding: 0.55rem 0.65rem;
    gap: 0.35rem;
  }

  .acoes-lay-v2__kpi-panel .acoes-kpi-count {
    font-size: 1.45rem;
  }

  .acoes-lay-v2__kpi-panel .acoes-kpi-label {
    font-size: 0.62rem;
  }

  /* Dense default: short labels + spark + short delta (fits 7 across) */
  .acoes-lay-v2__kpi-panel .acoes-kpi-label__full {
    display: none;
  }

  .acoes-lay-v2__kpi-panel .acoes-kpi-label__short {
    display: inline;
  }

  .acoes-lay-v2__kpi-panel .acoes-kpi-ratio__full {
    display: none;
  }

  .acoes-lay-v2__kpi-panel .acoes-kpi-ratio__short {
    display: inline;
    margin: 0 0.1rem;
  }

  .acoes-lay-v2__kpi-panel .acoes-kpi-spark {
    display: block;
  }

  .acoes-lay-v2__kpi-panel .acoes-kpi-foot {
    display: flex;
    gap: 0.25rem;
    padding-top: 0.3rem;
    font-size: 0.68rem;
  }

  .acoes-lay-v2__kpi-panel .acoes-kpi-foot-label__full {
    display: none;
  }

  .acoes-lay-v2__kpi-panel .acoes-kpi-foot-label__short {
    display: inline;
  }

  .acoes-lay-v2__kpi-panel .acoes-kpi-body {
    align-items: flex-end;
  }
}

/* Tighter desktop widths: drop spark/foot so all 7 stay readable in one row */
@container acoes-kpi (max-width: 58rem) {
  .acoes-kpi-tile[data-key] .acoes-kpi-spark,
  .acoes-kpi-tile[data-key] .acoes-kpi-foot {
    display: none;
  }

  .acoes-kpi-tile[data-key] .acoes-kpi-body {
    align-items: center;
  }
}

/* Roomy desktop: restore full labels and foot copy */
@container acoes-kpi (min-width: 90rem) {
  .acoes-kpi-tile[data-key] {
    padding: 0.75rem 0.85rem;
    gap: 0.5rem;
  }

  .acoes-kpi-tile[data-key] .acoes-kpi-count {
    font-size: 1.75rem;
  }

  .acoes-kpi-tile[data-key] .acoes-kpi-label {
    font-size: 0.72rem;
  }

  .acoes-kpi-tile[data-key] .acoes-kpi-label__full {
    display: inline;
  }

  .acoes-kpi-tile[data-key] .acoes-kpi-label__short {
    display: none;
  }

  .acoes-kpi-tile[data-key] .acoes-kpi-ratio__full {
    display: inline;
  }

  .acoes-kpi-tile[data-key] .acoes-kpi-ratio__short {
    display: none;
  }

  .acoes-kpi-tile[data-key] .acoes-kpi-foot {
    gap: 0.375rem;
    padding-top: 0.4rem;
    font-size: 0.72rem;
  }

  .acoes-kpi-tile[data-key] .acoes-kpi-foot-label__full {
    display: inline;
  }

  .acoes-kpi-tile[data-key] .acoes-kpi-foot-label__short {
    display: none;
  }
}

@media (max-width: 1100px), (orientation: portrait) and (max-width: 1600px) {
  .acoes-lay-v2__views .acoes-hub-view__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .acoes-lay-v2__views .acoes-hub-view {
    min-height: 2.35rem;
  }

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

  .acoes-hub-create {
    padding-inline: 0.65rem !important;
  }
}

/* Tablet: 3-col view grid (~226px/tab) has room for labels.
   The ≤1100px/portrait rule above sr-hides them; phones (≤767) restore
   via the later one-row scroll rule. 768px was stuck icon-only. */
@media (max-width: 768px) {
  .acoes-lay-v2__views .acoes-hub-view__label {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip: auto;
    white-space: normal;
    border: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.65rem;
    line-height: 1.1;
    text-align: center;
  }

  .acoes-lay-v2__views .acoes-hub-view {
    min-height: 2.75rem;
    flex-direction: column;
  }
}

.acoes-lay-v2__advanced-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.4rem 1rem;
  border: none;
  border-bottom: 1px solid #ebecf0;
  background: #fafbfc;
  color: #5e6c84;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.acoes-lay-v2__advanced-badge {
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  background: #0052cc;
  color: #fff;
  font-size: 0.68rem;
}

.acoes-lay-v2__advanced-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.65rem 1rem 0.85rem;
  background: #fafbfc;
  border-bottom: 1px solid #ebecf0;
}

/* ── V2 filter drawer (Linear / Notion pattern) ─────────────────── */
.acoes-filter-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-shrink: 0;
  height: var(--ds-btn-h);
  padding: 0 0.85rem;
  border-radius: var(--ds-radius-md);
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    box-shadow 0.15s;
}

.acoes-filter-trigger:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  color: #1e293b;
}

.acoes-filter-trigger--active {
  border-color: #6366f1;
  background: #eef2ff;
  color: #4338ca;
}

.acoes-filter-trigger .material-icons {
  font-size: 1.05rem;
}

.acoes-filter-trigger__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 99px;
  background: #6366f1;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.acoes-lay-v2__active-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.35rem 1rem;
  background: linear-gradient(90deg, #eef2ff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e0e7ff;
  font-size: 0.8rem;
  color: #4338ca;
}

.acoes-lay-v2__active-bar-icon {
  font-size: 1rem;
  opacity: 0.85;
}

.acoes-lay-v2__active-bar-text {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.acoes-lay-v2__active-bar-clear,
.acoes-lay-v2__active-bar-edit {
  padding: 0.2rem 0.55rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #4338ca;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.acoes-lay-v2__active-bar-clear:hover,
.acoes-lay-v2__active-bar-edit:hover {
  background: rgb(99 102 241 / 0.12);
}

.acoes-filter-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  justify-content: flex-end;
  contain: layout style;
  pointer-events: auto;
}

.acoes-filter-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgb(15 23 42 / 0.42);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.acoes-filter-drawer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(24rem, 100vw);
  max-width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: -12px 0 40px rgb(15 23 42 / 0.18);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  box-sizing: border-box;
  will-change: transform;
}

.acoes-filter-drawer-root--open .acoes-filter-drawer-backdrop {
  opacity: 1;
}

.acoes-filter-drawer-root--open .acoes-filter-drawer {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .acoes-filter-drawer-backdrop,
  .acoes-filter-drawer {
    transition: none;
  }
}

.acoes-filter-drawer__toolbar {
  flex-shrink: 0;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.acoes-filter-drawer__clear:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.acoes-filter-drawer__head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}

.acoes-filter-drawer__title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.acoes-filter-drawer__title .material-icons {
  font-size: 1.2rem;
  color: #6366f1;
}

.acoes-filter-drawer__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.acoes-filter-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.acoes-filter-drawer__close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.acoes-filter-drawer__clear {
  color: #6366f1 !important;
}

.acoes-filter-drawer__body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.5rem 0 1rem;
}

.acoes-filter-drawer__section {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  min-width: 0;
  box-sizing: border-box;
}

.acoes-filter-drawer__section:last-child {
  border-bottom: none;
}

.acoes-filter-drawer__section-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.acoes-filter-drawer__section-title .material-icons {
  font-size: 0.95rem;
  color: #6366f1;
}

.acoes-filter-drawer__section-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  width: 100%;
}

.acoes-filter-drawer__foot {
  flex-shrink: 0;
  padding: 0.75rem 1rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.acoes-filter-drawer__result {
  font-size: 0.85rem;
  color: #64748b;
}

.acoes-filter-drawer__result strong {
  color: #0f172a;
  font-weight: 800;
}

.acoes-filter-drawer .acoes-hub-quickfilters {
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.acoes-filter-drawer .acoes-hub-field {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}

.acoes-filter-drawer .acoes-hub-field__label {
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
}

.acoes-filter-drawer .app-filter-select,
.acoes-filter-drawer .app-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 0.875rem;
}

/* Strip chrome from nested filter blocks — drawer sections already frame them */
.acoes-filter-drawer .acoes-hub-context--drawer,
.acoes-filter-drawer .acoes-hub-labels--drawer {
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
}

.acoes-filter-drawer .acoes-hub-context--drawer .acoes-hub-context__panel,
.acoes-filter-drawer
  .acoes-hub-context--drawer
  .acoes-hub-context__panel--with-people,
.acoes-filter-drawer .acoes-hub-labels--drawer .acoes-hub-labels__panel {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.65rem;
  padding: 0;
  border: none;
  background: transparent;
  min-width: 0;
  width: 100%;
}

/* Override the inline 3+1 grid: stack Melhoria/Área/Processo/Pessoa full-width */
.acoes-filter-drawer .acoes-hub-context__group,
.acoes-filter-drawer .acoes-hub-context__group--people {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  grid-template-columns: none;
}

.acoes-filter-drawer .acoes-hub-context__group .uc-lv-filter,
.acoes-filter-drawer .acoes-hub-context__group--people .uc-lv-filter {
  width: 100%;
  min-width: 0;
}

.acoes-filter-drawer .uc-lv-filter__trigger {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;
  overflow: hidden;
}

.acoes-filter-drawer .uc-lv-filter__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acoes-filter-drawer .uc-lv-filter__hint {
  flex-shrink: 0;
}

.acoes-filter-drawer .uc-lv-filter__menu {
  left: 0;
  right: 0;
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}

.acoes-filter-drawer .acoes-hub-period-drawer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.acoes-filter-drawer .acoes-hub-period {
  margin: 0;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.acoes-filter-drawer .acoes-hub-checks--drawer {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.65rem;
  border: none;
  padding: 0;
  background: transparent;
  width: 100%;
  min-width: 0;
}

.acoes-filter-drawer .acoes-hub-check {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
  white-space: normal;
  align-items: flex-start;
}

.acoes-filter-drawer .acoes-hub-check:has(input:checked) {
  border-color: #6366f1;
  background: #eef2ff;
}

.acoes-filter-drawer .acoes-hub-labels__scroll {
  max-height: 12rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.acoes-filter-drawer .acoes-hub-labels__search-wrap,
.acoes-filter-drawer .acoes-label-filter-pill {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .acoes-filter-trigger__label {
    display: none;
  }

  .acoes-filter-drawer {
    width: 100vw;
  }

  .acoes-lay-v2__active-bar {
    padding-inline: 0.65rem;
  }

  .acoes-lay-v2__masthead-toolbar {
    flex-wrap: wrap;
  }

  .acoes-lay-v2__masthead-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (min-width: 1024px) {
  .acoes-filter-drawer {
    width: min(26rem, 38vw);
  }
}

/* ── V3 Linear: trilho ícones + centro + inspector direito fixo ─ */
.acoes-lay-v3__frame {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.acoes-lay-v3__rail {
  flex: 0 0 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  background: #0f172a;
  border-right: 1px solid rgb(255 255 255 / 0.08);
  transition:
    flex-basis 0.24s ease,
    width 0.24s ease,
    min-width 0.24s ease,
    opacity 0.2s ease;
  overflow: hidden;
}

.acoes-lay-v3__rail--collapsed {
  flex: 0 0 0 !important;
  min-width: 0 !important;
  width: 0 !important;
  opacity: 0;
  border-width: 0;
  padding: 0;
  pointer-events: none;
}

.acoes-lay-v3__rail-views {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  width: 100%;
}

.acoes-lay-v3__rail-views .acoes-hub-views {
  flex-direction: column;
  border: none;
  background: transparent;
  padding: 0 0.25rem;
  gap: 0.25rem;
}

.acoes-lay-v3__rail-views .acoes-hub-view {
  justify-content: center;
  padding: 0.55rem;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 0;
}

.acoes-lay-v3__rail-views .acoes-hub-view .material-icons {
  font-size: 1.25rem;
}

.acoes-lay-v3__rail-views .acoes-hub-view--active {
  background: rgb(255 255 255 / 0.12);
  color: #fff;
}

.acoes-lay-v3__center {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

.acoes-lay-v3__center-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.acoes-lay-v3__center-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  flex: 1;
  min-width: 0;
}

.acoes-lay-v3__center-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.acoes-lay-v3__inspector {
  flex: 0 0 288px;
  min-width: 260px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e2e8f0;
  background: #fff;
  overflow: hidden;
  transition:
    flex-basis 0.24s ease,
    width 0.24s ease,
    min-width 0.24s ease,
    opacity 0.2s ease;
}

.acoes-lay-v3__inspector--collapsed {
  flex: 0 0 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  width: 0 !important;
  opacity: 0;
  border-width: 0;
  overflow: hidden;
  pointer-events: none;
}

.acoes-lay-v3__inspector-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.acoes-lay-v3__inspector-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1e293b;
}

.acoes-lay-v3__inspector-close {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.acoes-lay-v3__inspector-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.acoes-lay-v3__inspector-search {
  flex-shrink: 0;
  padding: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.acoes-lay-v3__inspector-kpis {
  flex-shrink: 0;
  padding: 0 0.75rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.acoes-lay-v3__inspector-kpis .acoes-kpi-row--v3 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}

.acoes-lay-v3__inspector-filters {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.65rem 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.acoes-lay-v3__section-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.acoes-lay-v3__inspector-filters .acoes-hub-checks {
  flex-direction: column;
  align-items: flex-start;
  border: none;
  padding: 0;
  background: transparent;
}

/* ── Kanban cards: structural differences per variant ──────────── */
.acoes-kb-card--v1 {
  position: relative;
  padding: 0.875rem 0.875rem 0.875rem 1rem;
  border-radius: 12px;
  gap: 0.5rem;
  overflow: visible;
  min-height: 4.5rem;
}

.acoes-kb-card-v1__prio-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.acoes-kb-title--v1 {
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 700;
  color: #0f172a;
  display: block;
  word-break: break-word;
}

.acoes-kb-prio--v1 {
  font-size: 0.68rem;
  padding: 0.12rem 0.45rem;
}

.acoes-kb-foot--v1 {
  margin-top: 0.25rem;
}

.acoes-kb-card--v2 {
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border-left-width: 3px;
  gap: 0.3rem;
  box-shadow: none;
  background: #fff;
}

.acoes-kb-card-v2__row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.acoes-kb-card-v2__row > .acoes-kb-avatar,
.acoes-kb-card-v2__row > .acoes-assign,
.acoes-kb-card-v2__row > .acoes-assign-readonly,
.acoes-kb-card-v2__row > .acoes-assign-fallback {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Criticality chip — labeled + tinted so it reads as priority, never as
   status. Status lives in its own "Status" field / column header; criticality
   carries an icon + word and a colored fill to stay unmistakably distinct. */
.acoes-kb-crit {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  flex-shrink: 0;
  padding: 0.08rem 0.4rem 0.08rem 0.28rem;
  border-radius: 99px;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--crit-color, #64748b);
  background: color-mix(in srgb, var(--crit-color, #64748b) 14%, #fff);
  border: 1px solid color-mix(in srgb, var(--crit-color, #64748b) 32%, #fff);
}

.acoes-kb-crit__icon {
  font-size: 0.85rem !important;
  line-height: 1;
}

.acoes-kb-title--v2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  /* Wrap so similar titles stay distinguishable (Monday-style). Soft clamp
     keeps very long names from dominating the card; native title tooltip
     still exposes the full string on hover. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.acoes-kb-card-v2__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  font-size: 0.7rem;
  color: #64748b;
}

.acoes-kb-src--v2 {
  font-size: 0.68rem;
}

.acoes-kb-due--v2 {
  font-size: 0.68rem;
}

.acoes-kb-card-v2__subs {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.acoes-kb-card-v2__subs .material-icons {
  font-size: 0.85rem;
}

.acoes-kb-card-v2__ticket-attach {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #0e7490;
}

.acoes-kb-card-v2__ticket-attach .material-icons {
  font-size: 0.85rem;
}

.acoes-kb-card-v2__ticket-attach--new {
  color: #0d9488;
  animation: acoes-kb-ticket-attach-pulse 1.6s ease-in-out infinite;
}

@keyframes acoes-kb-ticket-attach-pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgb(13 148 136 / 0.45);
  }
  50% {
    opacity: 0.88;
    box-shadow: 0 0 0 4px rgb(13 148 136 / 0);
  }
}

.acoes-kb-card-v2__status-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.15rem;
  padding-top: 0.45rem;
  border-top: 1px dashed #e2e8f0;
}

.acoes-kb-card-v2__status-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.acoes-kb-card-v2__status-select {
  height: 1.85rem;
  padding: 0 0.45rem;
  font-size: 0.78rem;
  background: #f8fafc;
  border-color: #e2e8f0;
}

@media (min-width: 901px) {
  .acoes-kb-card-v2__status-field {
    display: none;
  }
}

@media (max-width: 900px) {
  .acoes-lay-focus-toggle__label {
    display: none;
  }

  .acoes-lay-v1__frame {
    flex-direction: column;
  }

  .acoes-lay-v1__left {
    flex: none;
    max-width: none;
    max-height: 38vh;
  }

  .acoes-lay-v1__left--collapsed {
    max-height: 0;
    display: none;
  }

  .acoes-lay-v3__frame {
    flex-direction: column;
  }

  .acoes-lay-v3__rail {
    flex-direction: row;
    flex: none;
    width: 100%;
    padding: 0.35rem;
  }

  .acoes-lay-v3__rail--collapsed {
    display: none;
  }

  .acoes-lay-v3__rail-views .acoes-hub-views {
    flex-direction: row;
  }

  .acoes-lay-v3__inspector {
    flex: none;
    max-width: none;
    max-height: 40vh;
  }

  .acoes-lay-v3__inspector--collapsed {
    max-height: 0;
    display: none;
  }

  .acoes-lay-v2__filter-bar .acoes-hub-quickfilters {
    flex-direction: column;
  }
}

/* ── Legacy (unused) full-screen layout shells kept for safety ──── */
.acoes-layout-legacy-unused {
  display: none;
}

/* Board area must consume all remaining viewport height */
.acoes-layout-v1__board .acoes-hub-body,
.acoes-layout-v1__board .acoes-hub-body--kanban,
.acoes-layout-v2__canvas .acoes-hub-body,
.acoes-layout-v2__canvas .acoes-hub-body--kanban,
.acoes-layout-v3__board .acoes-hub-body,
.acoes-layout-v3__board .acoes-hub-body--kanban {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.acoes-hub--layout .acoes-kb-shell,
.acoes-hub--layout .acoes-kb-board {
  flex: 1;
  min-height: 0;
  height: 100%;
}

/* Wider fixed columns + horizontal scroll (Monday-style) */
.acoes-hub--layout .acoes-kb-col,
.acoes-hub--layout .acoes-kb-col--v1,
.acoes-hub--layout .acoes-kb-col--v2,
.acoes-hub--layout .acoes-kb-col--v3 {
  flex: 0 0 320px;
  min-width: 320px;
  width: 320px;
  max-width: none;
}

.acoes-hub--layout .acoes-kb-board--v1,
.acoes-hub--layout .acoes-kb-board--v2,
.acoes-hub--layout .acoes-kb-board--v3,
.acoes-hub--layout .acoes-hub--kanban .acoes-kb-board {
  flex: 1;
  min-height: 0;
  height: 100%;
  align-items: stretch;
}

/* Compact in-board controls — don't steal board height */
.acoes-hub--layout .acoes-kb-variant-toolbar {
  padding: 0.3rem 0.5rem;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}

.acoes-hub--layout .acoes-kb-variant-toolbar__hint {
  display: none;
}

.acoes-hub--layout .acoes-kb-variant-toolbar--v2 {
  display: none;
}

.app-main-wrap:has(.acoes-hub--layout) {
  overflow: hidden;
}

.app-main-wrap:has(.acoes-hub--layout) .app-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.app-main-wrap:has(.acoes-hub--layout) .app-page-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/*
 * Relatório / Lista (and other document views): keep the masthead fixed and
 * scroll the board pane so charts/lists below the fold stay reachable.
 */
.acoes-hub--doc-scroll .acoes-lay-v2__board,
.acoes-hub--doc-scroll .acoes-lay-v1__board,
.acoes-hub--doc-scroll .acoes-lay-v3__board {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.acoes-hub--doc-scroll .acoes-lay-v2__board .acoes-hub-body,
.acoes-hub--doc-scroll .acoes-lay-v1__board .acoes-hub-body,
.acoes-hub--doc-scroll .acoes-lay-v3__board .acoes-hub-body {
  flex: 0 0 auto;
  height: auto;
  min-height: min-content;
  overflow: visible;
}

.acoes-hub--doc-scroll .acoes-lay-v2__board::-webkit-scrollbar,
.acoes-hub--doc-scroll .acoes-lay-v1__board::-webkit-scrollbar,
.acoes-hub--doc-scroll .acoes-lay-v3__board::-webkit-scrollbar {
  width: 8px;
}

.acoes-hub--doc-scroll .acoes-lay-v2__board::-webkit-scrollbar-thumb,
.acoes-hub--doc-scroll .acoes-lay-v1__board::-webkit-scrollbar-thumb,
.acoes-hub--doc-scroll .acoes-lay-v3__board::-webkit-scrollbar-thumb {
  background-color: rgb(148 163 184 / 0.55);
  border-radius: 99px;
}

/* Ações / Kanban — mobile: allow vertical scroll instead of trapping content */
@media (max-width: 767px) {
  .app-main-wrap:has(.acoes-hub--kanban),
  .app-main-wrap:has(.acoes-hub--layout),
  .app-main-wrap:has(.app-page--acoes-board) {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .app-main-wrap:has(.acoes-hub--kanban) .app-page,
  .app-main-wrap:has(.acoes-hub--layout) .app-page,
  .app-main-wrap:has(.app-page--acoes-board) .app-page,
  .app-main-wrap:has(.acoes-hub--kanban) .app-page-body,
  .app-main-wrap:has(.acoes-hub--layout) .app-page-body,
  .app-main-wrap:has(.app-page--acoes-board) .app-page-body {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .acoes-hub--kanban,
  .acoes-hub--layout,
  .acoes-lay,
  .acoes-lay-v1__frame,
  .acoes-lay-v2__frame,
  .acoes-lay-v3__frame,
  .acoes-lay-v1__board,
  .acoes-lay-v2__board,
  .acoes-lay-v3__board,
  .acoes-hub-body--kanban,
  .acoes-kb-shell {
    height: auto;
    overflow: visible;
  }

  .acoes-hub--layout .acoes-kb-board,
  .acoes-hub--kanban .acoes-kb-board,
  .acoes-hub--layout .acoes-kb-board--v1,
  .acoes-hub--layout .acoes-kb-board--v2,
  .acoes-hub--layout .acoes-kb-board--v3 {
    flex: none;
    height: auto;
    min-height: min(68dvh, 34rem);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
  }

  .acoes-hub--layout .acoes-kb-col,
  .acoes-hub--kanban .acoes-kb-col,
  .acoes-hub--layout .acoes-kb-col--v1,
  .acoes-hub--layout .acoes-kb-col--v2,
  .acoes-hub--layout .acoes-kb-col--v3 {
    flex: 0 0 min(85vw, 300px);
    min-width: min(85vw, 280px);
    width: min(85vw, 300px);
    min-height: min(64dvh, 32rem);
    max-height: min(72dvh, 36rem);
  }

  .acoes-hub--kanban .acoes-kb-col-body,
  .acoes-hub--layout .acoes-kb-col-body {
    flex: 1;
    min-height: 10rem;
    max-height: calc(min(64dvh, 32rem) - 2.75rem);
    overflow-y: auto;
    /* Y only — see the base rule: x-contain blocks board swipes over cards */
    overscroll-behavior-y: contain;
    overscroll-behavior-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* V1 — Sidebar Studio */
.acoes-layout-v1__frame {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 1rem;
  overflow: hidden;
}

.acoes-layout-v1__sidebar {
  flex: 0 0 260px;
  min-width: 240px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgb(15 23 42 / 0.06);
  overflow-y: auto;
}

.acoes-layout-v1__sidebar-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: #1e293b;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.acoes-layout-v1__sidebar-head .material-icons {
  color: #4f46e5;
}

.acoes-layout-v1__sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.acoes-layout-v1__sidebar-section--search .acoes-hub-toolbar {
  flex-direction: column;
  align-items: stretch;
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
  gap: 0.5rem;
}

.acoes-layout-v1__sidebar-section--search .acoes-hub-toolbar-grow {
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.acoes-layout-v1__sidebar-section--search .app-toolbar-search,
.acoes-layout-v1__sidebar-section--search .app-filter-select {
  width: 100%;
}

.acoes-layout-v1__sidebar-section--checks .acoes-hub-checks {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  border: none;
  padding: 0;
  background: transparent;
}

.acoes-layout-v1__sidebar-views .acoes-hub-views {
  flex-direction: column;
  border: none;
  padding: 0;
  background: transparent;
  gap: 0.35rem;
}

.acoes-layout-v1__sidebar-views .acoes-hub-view {
  justify-content: flex-start;
  width: 100%;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
}

.acoes-layout-v1__sidebar-kpis {
  flex-shrink: 0;
}

.acoes-layout-v1__sidebar-kpis .acoes-kpi-row--v1 {
  flex-direction: column;
  align-items: stretch;
}

.acoes-layout-v1__sidebar-kpis .acoes-kpi-tile--v1 {
  justify-content: flex-start;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.acoes-layout-v1__main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.acoes-kpi-row--v1 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  grid-template-columns: none;
}

.acoes-kpi-tile--v1 {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.9rem;
  border-radius: 99px;
  box-shadow: none;
}

.acoes-kpi-tile--v1:hover {
  transform: none;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.08);
}

.acoes-kpi-count--v1 {
  font-size: 1.25rem;
  font-weight: 800;
}

.acoes-kpi-label--v1 {
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
}

.acoes-layout-v1__board {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* V2 — Command Deck */
.acoes-layout-v2__command {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #334155 100%);
  border-radius: 16px;
  color: #f8fafc;
  box-shadow: 0 8px 32px rgb(15 23 42 / 0.25);
}

.acoes-layout-v2__command--slim {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
}

.acoes-layout-v2__command--slim .acoes-layout-v2__command-search {
  flex: 1 1 280px;
}

.acoes-layout-v2__command--slim .acoes-layout-v2__command-views {
  flex: 0 1 auto;
}

.acoes-layout-v2__command--slim .acoes-layout-v2__command-meta {
  flex: 0 0 auto;
  margin-left: auto;
}

.acoes-layout-v2__command-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.acoes-layout-v2__command-search {
  flex: 1 1 320px;
  min-width: 0;
}

.acoes-layout-v2__command-search .acoes-hub-toolbar {
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.12);
  box-shadow: none;
}

.acoes-layout-v2__command-search .app-toolbar-search,
.acoes-layout-v2__command-search .app-filter-select {
  background: rgb(255 255 255 / 0.95);
}

.acoes-layout-v2__command-views .acoes-hub-views {
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.12);
}

.acoes-layout-v2__command-views .acoes-hub-view {
  color: #cbd5e1;
}

.acoes-layout-v2__command-views .acoes-hub-view--active {
  background: #fff;
  color: #0f172a;
}

.acoes-layout-v2__kpi-deck .acoes-kpi-row--v2 {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
}

.acoes-kpi-tile--v2 {
  background: rgb(255 255 255 / 0.95);
  border-color: rgb(255 255 255 / 0.2);
  padding: 0.75rem 0.9rem;
}

.acoes-kpi-tile--v2 .acoes-kpi-count {
  font-size: 2.25rem;
}

.acoes-kpi-foot--v2 {
  border-top-color: #e2e8f0;
}

.acoes-layout-v2__command-meta .acoes-hub-checks {
  background: transparent;
  border: none;
  padding: 0;
  color: #cbd5e1;
}

.acoes-layout-v2__command-meta .acoes-hub-count {
  color: #fff;
  font-weight: 700;
}

.acoes-layout-v2__advanced {
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.acoes-layout-v2__advanced-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: #334155;
  cursor: pointer;
  list-style: none;
}

.acoes-layout-v2__advanced-toggle::-webkit-details-marker {
  display: none;
}

.acoes-layout-v2__advanced-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
  border-top: 1px dashed #e2e8f0;
}

.acoes-layout-v2__canvas {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* V3 — Workspace Canvas */
.acoes-layout-v3__frame {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 1rem;
  overflow: hidden;
}

.acoes-layout-v3__workspace {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f1f5f9;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.acoes-layout-v3__topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgb(15 23 42 / 0.04);
  flex-shrink: 0;
}

.acoes-layout-v3__topbar-search {
  flex: 1 1 280px;
}

.acoes-layout-v3__topbar-search .acoes-hub-toolbar {
  border: none;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.acoes-layout-v3__topbar-views .acoes-hub-views {
  border: none;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 12px;
  gap: 0.25rem;
}

.acoes-layout-v3__topbar-views .acoes-hub-view {
  padding: 0.5rem 0.75rem;
  border-radius: 9px;
  font-size: 0.8rem;
}

.acoes-layout-v3__topbar-views .acoes-hub-view .material-icons {
  font-size: 1.1rem;
}

.acoes-layout-v3__board {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.acoes-layout-v3__statusbar {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.acoes-layout-v3__statusbar .acoes-hub-checks {
  border: none;
  padding: 0;
  background: transparent;
  margin: 0;
}

.acoes-layout-v3__inspector {
  flex: 0 0 260px;
  min-width: 240px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 8px 28px rgb(15 23 42 / 0.08);
  overflow-y: auto;
}

.acoes-layout-v3__inspector-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f766e;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ccfbf1;
}

.acoes-kpi-row--v3 {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  grid-template-columns: none;
}

.acoes-kpi-tile--v3 {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
}

.acoes-kpi-count--v3 {
  font-size: 1.5rem;
  font-weight: 800;
}

.acoes-layout-v3__inspector-filters {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Variant modals */
.acoes-action-modal-backdrop--v1 {
  justify-content: flex-end;
  align-items: stretch;
  padding: 0;
}

.acoes-action-modal--v1 {
  width: min(560px, 100vw);
  max-width: 100%;
  height: 100%;
  max-height: 100vh;
  margin: 0;
  border-radius: 16px 0 0 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  box-shadow: -12px 0 40px rgb(15 23 42 / 0.2);
}

.acoes-action-modal--v2 {
  width: min(1100px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
}

.acoes-action-modal-backdrop--v3 {
  padding: 0;
}

.acoes-action-modal--v3 {
  width: 100vw;
  height: 100vh;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  border-radius: 0;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.acoes-action-modal__hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.acoes-action-modal--v3 .acoes-action-modal__hdr {
  grid-column: 1 / -1;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  color: #fff;
  border-bottom: none;
}

.acoes-action-modal--v3 .acoes-action-modal__title,
.acoes-action-modal--v3 .acoes-action-modal__lead {
  color: #fff;
}

.acoes-action-modal--v3 .acoes-action-modal__close {
  color: #fff;
  border-color: rgb(255 255 255 / 0.3);
}

.acoes-action-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.acoes-action-modal__lead {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.45;
}

.acoes-action-modal__close {
  margin-left: auto;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.acoes-action-modal__rail {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0.75rem;
  background: #0f172a;
  overflow-y: auto;
}

.acoes-action-modal__rail-link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.acoes-action-modal__rail-link:hover {
  background: rgb(255 255 255 / 0.08);
  color: #fff;
}

.acoes-action-modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 1.5rem 1.5rem;
}

.acoes-action-modal--v3 .acoes-action-modal__body {
  grid-row: 2;
  padding: 1.25rem 1.5rem 1.5rem;
}

.acoes-modal-form--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1.25rem;
  align-items: start;
}

.acoes-modal-form__side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  max-height: 65vh;
  overflow-y: auto;
}

.acoes-action-modal--v3 .acoes-modal-form__side {
  max-height: none;
}

.acoes-modal-form__footer {
  grid-column: 1 / -1;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 900px) {
  .acoes-kb-variant-switcher {
    flex-direction: column;
    align-items: stretch;
  }

  .acoes-layout-v1__frame,
  .acoes-layout-v3__frame {
    flex-direction: column;
  }

  .acoes-layout-v1__sidebar,
  .acoes-layout-v3__inspector {
    flex: none;
    max-width: none;
    max-height: 40vh;
  }

  .acoes-modal-form--split {
    grid-template-columns: 1fr;
  }

  .acoes-action-modal--v3 {
    grid-template-columns: 1fr;
  }

  .acoes-action-modal__rail {
    flex-direction: row;
    flex-wrap: wrap;
    grid-row: auto;
  }

  .acoes-hub--kanban-v1 .acoes-kb-col--v1,
  .acoes-hub--kanban-v3 .acoes-kb-col--v3 {
    flex: 0 0 88vw;
    min-width: 300px;
  }

  .acoes-hub--kanban-v2 .acoes-kb-col--v2 {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
  }
}

/* ── Inline assignee picker (Kanban / Lista) — Monday-style ───────── */
.acoes-assign {
  position: relative;
  flex-shrink: 0;
}

.acoes-assign--table {
  display: inline-flex;
  vertical-align: middle;
}

.acoes-assign-trigger {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #e2e8f0;
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.acoes-assign-trigger:hover:not(:disabled) {
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  transform: translateY(-1px);
}

.acoes-assign-trigger:focus-visible {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.acoes-assign-trigger--set {
  width: auto;
  min-width: 28px;
  padding: 0 3px;
  border: none;
  background: linear-gradient(
    135deg,
    hsl(var(--acoes-assign-hue, 210), 72%, 52%),
    hsl(calc(var(--acoes-assign-hue, 210) + 22), 65%, 44%)
  );
  color: #fff;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.acoes-assign-trigger--set:hover:not(:disabled) {
  border: none;
  color: #fff;
  filter: brightness(1.06);
}

.acoes-assign-trigger--busy {
  pointer-events: none;
  opacity: 0.85;
}

.acoes-assign-trigger--table {
  width: 30px;
  height: 30px;
}

.acoes-assign-readonly {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  cursor: default;
  pointer-events: none;
}

.acoes-assign-readonly--table {
  min-height: 30px;
}

.acoes-assign-readonly--empty {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #e2e8f0;
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  color: #94a3b8;
}

.acoes-assign-readonly--empty .material-icons {
  font-size: 1rem;
}

.acoes-assign-add {
  font-size: 1.1rem !important;
}

.acoes-assign-initials {
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}

.acoes-assign-stack {
  display: inline-flex;
  align-items: center;
  padding: 0 1px;
}

.acoes-assign-stack-avatar,
.acoes-assign-stack-more {
  position: relative;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -5px;
  color: #fff;
  font-size: 0.52rem;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    hsl(var(--ah, 210), 68%, 52%),
    hsl(calc(var(--ah, 210) + 22), 62%, 42%)
  );
  overflow: hidden;
}

.acoes-assign-stack-avatar img,
.acoes-assign-mini img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.acoes-assign-stack-avatar:first-child {
  margin-left: 0;
}

.acoes-assign-stack-more {
  background: #475569;
}

.acoes-assign-spin {
  animation: acoes-assign-spin-ico 0.85s linear infinite;
  font-size: 1rem !important;
}

@keyframes acoes-assign-spin-ico {
  to {
    transform: rotate(360deg);
  }
}

.acoes-assign-pop {
  max-height: min(340px, 52vh);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  box-shadow:
    0 12px 40px rgba(15, 23, 42, 0.16),
    0 4px 12px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  animation: acoes-assign-pop-in 0.16s ease both;
}

/* Portaled to document.body + position set in JS — escapes board overflow & column overlap */
.acoes-assign-pop--fixed {
  position: fixed;
  z-index: 10060;
  margin: 0;
}

@keyframes acoes-assign-pop-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}

.acoes-assign-pop-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.acoes-assign-pop-search > .material-icons {
  font-size: 1.1rem;
  color: #94a3b8;
}

.acoes-assign-pop-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.82rem;
  min-width: 0;
  outline: none;
  color: #1e293b;
}

.acoes-assign-pop-scroll {
  overflow-y: auto;
  padding: 0.35rem;
  max-height: 240px;
}

.acoes-assign-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  border: none;
  border-radius: 10px;
  background: transparent;
  padding: 0.45rem 0.5rem;
  cursor: pointer;
  font-size: 0.82rem;
  color: #334155;
  transition: background 0.12s;
}

.acoes-assign-row:hover {
  background: #f1f5f9;
}

.acoes-assign-row--inherited,
.acoes-assign-row--inherited:disabled {
  cursor: not-allowed;
  opacity: 0.78;
}

.acoes-assign-inherited-label {
  display: block;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 500;
}

.acoes-assign-row--active {
  background: #eff6ff;
}

.acoes-assign-row--muted {
  color: #64748b;
}

.acoes-assign-row--accent {
  background: linear-gradient(90deg, #fefce8 0%, #fff 100%);
  color: #a16207;
  font-weight: 600;
}

.acoes-assign-row--accent:hover {
  background: #fef9c3;
}

.acoes-assign-row-ico {
  font-size: 1.1rem !important;
  opacity: 0.8;
}

.acoes-assign-row-text {
  flex: 1;
  min-width: 0;
}

.acoes-assign-row-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acoes-assign-mini {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(
    135deg,
    hsl(var(--ah, 200), 65%, 50%),
    hsl(calc(var(--ah, 200) + 20), 58%, 42%)
  );
  flex-shrink: 0;
  overflow: hidden;
}

.acoes-assign-check {
  font-size: 1rem !important;
  color: #2563eb;
  flex-shrink: 0;
}

.acoes-assign-empty {
  margin: 0.75rem 0.5rem;
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
}

.acoes-assign-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #cbd5e1;
}

.acoes-assign-fallback--table {
  width: 30px;
  height: 30px;
}

.acoes-lista-assign-cell {
  vertical-align: middle;
  white-space: nowrap;
}

.acoes-lista-time-cell {
  vertical-align: middle;
  white-space: nowrap;
  min-width: 9.5rem;
}

.acoes-lista-time-cell .acoes-kb-time-wrap {
  margin-top: 0;
}

/* Kanban · inline time tracking (Monday-style) */
.acoes-kb-time-wrap {
  position: relative;
  margin-top: 0.25rem;
}

.acoes-kb-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.25rem 0 0;
  border-top: 1px dashed var(--border-color, #e2e8f0);
  min-height: 26px;
}

.acoes-kb-time-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.acoes-kb-time-total {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  border: none;
  background: transparent;
  padding: 0.15rem 0.25rem;
  margin: -0.15rem -0.25rem;
  border-radius: 6px;
  font-family: inherit;
  line-height: 1.2;
}

.acoes-kb-time-total--expandable {
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.acoes-kb-time-total--expandable:hover:not(:disabled) {
  background: #f1f5f9;
  color: #334155;
}

.acoes-kb-time-total--expandable:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.acoes-kb-time-total--open {
  background: #f8fafc;
  color: #1e293b;
}

.acoes-kb-time-count {
  margin-left: 0.15rem;
  padding: 0 0.3rem;
  border-radius: 99px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.4;
}

.acoes-kb-time-chevron {
  font-size: 0.95rem !important;
  color: #94a3b8;
  margin-left: 0.05rem;
}

.acoes-kb-time-sessions {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0.4rem 0 0;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: min(16rem, 40vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.acoes-kb-time-sessions--compact {
  margin-top: 0.25rem;
  padding-top: 0.3rem;
  max-height: min(12rem, 36vh);
  width: 100%;
}

.acoes-kb-time-session {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.5rem;
  row-gap: 0.15rem;
  align-items: start;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e8eef5;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.acoes-kb-time-session:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.acoes-kb-time-session-top {
  grid-column: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.acoes-kb-time-session-dur {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.acoes-kb-time-session-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.acoes-kb-time-session-date {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 500;
}

.acoes-kb-time-session-src {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.35rem;
  border-radius: 99px;
}

.acoes-kb-time-session-src--timer {
  background: #dbeafe;
  color: #1d4ed8;
}

.acoes-kb-time-session-src--manual {
  background: #e2e8f0;
  color: #475569;
}

.acoes-kb-time-session-sub {
  grid-column: 1;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #4f46e5;
}

.acoes-kb-time-session-desc {
  grid-column: 1;
  min-width: 0;
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.acoes-kb-time-session-actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.acoes-kb-time-session-edit,
.acoes-kb-time-session-delete {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  flex-shrink: 0;
  animation: none;
}

.acoes-kb-time-session-edit {
  background: #eef2ff;
  color: #4f46e5;
}

.acoes-kb-time-session-edit:hover:not(:disabled) {
  background: #e0e7ff;
}

.acoes-kb-time-session-delete {
  background: #fef2f2;
  color: #dc2626;
}

.acoes-kb-time-session-delete:hover:not(:disabled) {
  background: #fee2e2;
}

.acoes-kb-time-session-edit:disabled,
.acoes-kb-time-session-delete:disabled {
  opacity: 0.5;
  cursor: progress;
}

.acoes-kb-time-session-edit .material-icons,
.acoes-kb-time-session-delete .material-icons {
  font-size: 0.9rem !important;
  animation: none !important;
}

.tt-modal-input {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #1e293b;
  font: inherit;
  box-sizing: border-box;
}
.tt-modal-input:focus {
  border-color: #3b82f6;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.acoes-kb-time-total .material-icons {
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Running state: clock gets blue accent + pulse on the icon */
.acoes-kb-time-total--live {
  color: #1d4ed8;
}

.acoes-kb-time-total--live .material-icons {
  color: #2563eb;
  animation: acoes-timer-pulse 1s ease-in-out infinite;
}

@keyframes acoes-timer-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Previous logged-time badge shown while running: "+12m" */
.acoes-kb-time-prior {
  margin-left: 0.2rem;
  padding: 0 0.3rem;
  border-radius: 99px;
  background: #eff6ff;
  color: #3b82f6;
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
}

.acoes-kb-time-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #f1f5f9;
  color: #475569;
  transition: background 0.12s ease, color 0.12s ease, transform 0.1s ease;
}

.acoes-kb-time-btn:hover:not(:disabled) {
  background: #e0f2fe;
  color: #0369a1;
  transform: scale(1.1);
}

.acoes-kb-time-btn:active:not(:disabled) {
  transform: scale(0.95);
}

/* Running on THIS card: stop button — red on hover */
.acoes-kb-time-btn--on {
  background: #dbeafe;
  color: #1d4ed8;
}

.acoes-kb-time-btn--on:hover:not(:disabled) {
  background: #fee2e2;
  color: #b91c1c;
}

.acoes-kb-time-btn--add {
  background: #f8fafc;
  color: #64748b;
}

.acoes-kb-time-btn--add:hover:not(:disabled) {
  background: #ecfdf5;
  color: #047857;
}

.acoes-kb-time-btn--add-on {
  background: #d1fae5;
  color: #047857;
}

/* Inline manual time popover on card */
.acoes-kb-manual-pop {
  min-width: 14.5rem;
  max-height: min(420px, calc(100vh - 16px));
  overflow-y: auto;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgb(15 23 42 / 0.04), 0 16px 40px rgb(15 23 42 / 0.12);
  animation: acoes-manual-pop-in 0.16s ease;
}

/* Portaled to document.body — escapes Kanban overflow and column stacking */
.acoes-kb-manual-pop--fixed {
  position: fixed;
  z-index: 10060;
  margin: 0;
}

@keyframes acoes-manual-pop-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.acoes-kb-manual-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.acoes-kb-manual-pop-title {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
}

.acoes-kb-manual-pop-title .material-icons {
  font-size: 0.95rem;
  color: #2563eb;
}

.acoes-kb-manual-pop-close {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acoes-kb-manual-pop-close:hover {
  background: #f1f5f9;
  color: #475569;
}

.acoes-kb-manual-pop-close .material-icons {
  font-size: 1rem;
}

.acoes-kb-manual-pop-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.acoes-kb-manual-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.acoes-kb-manual-preset {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  font-family: inherit;
}

.acoes-kb-manual-preset:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.acoes-kb-manual-preset--on {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.acoes-kb-manual-dur-row {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
}

.acoes-kb-manual-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.acoes-kb-manual-field--dur {
  flex: 0 0 auto;
  width: 3.25rem;
}

.acoes-kb-manual-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.acoes-kb-manual-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
}

.acoes-kb-manual-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.12);
}

.acoes-kb-manual-input--date {
  font-weight: 500;
}

.acoes-kb-manual-sep {
  font-size: 1rem;
  font-weight: 700;
  color: #cbd5e1;
  padding-bottom: 0.35rem;
}

.acoes-kb-manual-dur-hint {
  font-size: 0.68rem;
  font-weight: 600;
  color: #2563eb;
  padding-bottom: 0.35rem;
  white-space: nowrap;
}

.acoes-kb-manual-textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  font-size: 0.75rem;
  color: #334155;
  resize: vertical;
  min-height: 2.5rem;
  font-family: inherit;
  line-height: 1.35;
}

.acoes-kb-manual-textarea:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.12);
}

.acoes-kb-manual-err {
  margin: 0;
  font-size: 0.68rem;
  color: #dc2626;
  font-weight: 500;
}

.acoes-kb-manual-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.acoes-kb-manual-cancel {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.acoes-kb-manual-cancel:hover {
  background: #f1f5f9;
  color: #334155;
}

.acoes-kb-manual-save {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: none;
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.12s, transform 0.1s;
}

.acoes-kb-manual-save:hover:not(:disabled) {
  transform: translateY(-1px);
}

.acoes-kb-manual-save:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.acoes-kb-manual-save .material-icons {
  font-size: 0.9rem;
}

/* Only THIS card is busy — no global dim; spin the icon, not the button chrome */
.acoes-kb-time-btn--busy {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

.acoes-kb-time-btn--busy .material-icons {
  animation: acoes-timer-spin 0.9s linear infinite;
}

@keyframes acoes-timer-spin {
  to {
    transform: rotate(360deg);
  }
}

.acoes-kb-time-btn .material-icons {
  font-size: 1rem;
}

/* Timer stripe — no flex-wrap needed (inline form removed) */

/* --- Kanban SubtaskPanel --- */
.acoes-kb-sub {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 0.35rem;
}

/* Compact progress chip (always shown if there are subtasks) */
.acoes-kb-sub-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: var(--surface-secondary, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  align-self: flex-start;
}
.acoes-kb-sub-chip:hover {
  background: var(--primary-color, #3b82f6);
  color: #fff;
  border-color: var(--primary-color, #3b82f6);
}
.acoes-kb-sub-chip--open {
  background: var(--primary-color, #3b82f6);
  color: #fff;
  border-color: var(--primary-color, #3b82f6);
}
.acoes-kb-sub-chip .material-icons {
  font-size: 0.9rem;
}
.acoes-kb-sub-chip-label {
  font-size: 0.72rem;
}
.acoes-kb-sub-chip-progress {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}
.acoes-kb-sub-chip-bar {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}
.acoes-kb-sub-chip:not(.acoes-kb-sub-chip--open) .acoes-kb-sub-chip-bar {
  background: var(--border-color, #e2e8f0);
}
.acoes-kb-sub-chip-bar-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: #22c55e;
  transition: width 0.3s;
}
.acoes-kb-sub-chip--open .acoes-kb-sub-chip-bar-fill {
  background: rgba(255, 255, 255, 0.85);
}

/* Melhorias — compact action progress chip */
.melhoria-acoes-progress {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
}
.melhoria-acoes-progress--empty {
  margin-top: 0.35rem;
}
.melhoria-acoes-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: var(--surface-secondary, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  max-width: 100%;
}
.melhoria-acoes-chip:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.melhoria-acoes-chip--open {
  background: var(--primary-color, #2563eb);
  color: #fff;
  border-color: var(--primary-color, #2563eb);
}
.melhoria-acoes-chip--empty {
  opacity: 0.85;
}
.melhoria-acoes-chip--empty:hover {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
}
.melhoria-acoes-chip .material-icons {
  font-size: 0.9rem;
}
.melhoria-acoes-chip-label,
.melhoria-acoes-chip-count,
.melhoria-acoes-chip-pct {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.melhoria-acoes-chip-bar {
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-color, #e2e8f0);
  overflow: hidden;
  flex-shrink: 0;
}
.melhoria-acoes-chip--open .melhoria-acoes-chip-bar {
  background: rgba(255, 255, 255, 0.35);
}
.melhoria-acoes-chip-bar-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}
.melhoria-acoes-panel {
  margin-top: 0.35rem;
  width: min(100%, 22rem);
  padding: 0.5rem 0.55rem;
  background: var(--surface-secondary, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  animation: acoes-form-in 0.15s ease;
}
.melhoria-acoes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 10.5rem;
  overflow-y: auto;
}
.melhoria-acoes-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.35rem 0.45rem;
  padding: 0.2rem 0;
}
.melhoria-acoes-item-icon {
  font-size: 0.95rem;
  color: #cbd5e1;
}
.melhoria-acoes-item-icon--done {
  color: #16a34a;
}
.melhoria-acoes-item-title {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.melhoria-acoes-item-title--done {
  color: var(--text-secondary, #64748b);
  text-decoration: line-through;
  text-decoration-color: #cbd5e1;
}
.melhoria-acoes-item .uc-badge {
  font-size: 0.62rem;
  padding: 0.08rem 0.35rem;
}
.melhoria-acoes-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}
.melhoria-acoes-panel-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-color, #2563eb);
  text-decoration: none;
}
.melhoria-acoes-panel-link:hover {
  text-decoration: underline;
}
.melhoria-acoes-panel-add {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: transparent;
  border: 1px dashed var(--border-color, #cbd5e1);
  border-radius: 6px;
  cursor: pointer;
}
.melhoria-acoes-panel-add:hover {
  color: #15803d;
  border-color: #86efac;
  background: #f0fdf4;
}

/* Melhorias table scroll + row actions + modal grids */
.uc-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 721px) {
  .uc-table-scroll.uc-table-cards {
    border-radius: 10px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #fff;
  }

  .uc-table-scroll.uc-table-cards .app-table {
    min-width: 58rem;
  }
}

.melhoria-row-actions {
  position: relative;
}

.melhoria-row-actions__inline-secondary {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
}

.melhoria-row-actions__primary {
  flex-shrink: 0;
}

.melhoria-row-actions__label {
  white-space: nowrap;
}

.melhoria-row-actions__more {
  position: relative;
  display: none;
}

@media (max-width: 1024px) {
  .melhoria-row-actions__inline-secondary {
    display: none;
  }

  .melhoria-row-actions__more {
    display: block;
  }
}

.melhoria-row-actions__menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  z-index: 40;
  min-width: 11.5rem;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.12);
}

.melhoria-row-actions__menu-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.melhoria-row-actions__menu-item:hover {
  background: #f1f5f9;
}

.melhoria-modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.melhoria-modal-duo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.melhoria-modal-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.imp-history {
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.imp-history__created,
.imp-history__summary {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary, #475569);
}

.imp-history__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 16rem;
  overflow: auto;
}

.imp-history__item {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-1, #fff);
}

.imp-history__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
}

.imp-history__changes {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: var(--text-secondary, #475569);
}

@media (max-width: 900px) {
  .melhoria-modal-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .melhoria-row-actions__label {
    display: none;
  }

  .melhoria-modal-meta-grid,
  .melhoria-modal-duo-grid {
    grid-template-columns: 1fr;
  }
}

/* Expanded panel */
.acoes-kb-sub-panel {
  margin-top: 0.35rem;
  padding: 0.4rem 0.45rem;
  background: var(--surface-secondary, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  animation: acoes-form-in 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: min(22rem, 48vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* Subtask list — compact single-row items */
.acoes-kb-sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.acoes-kb-sub-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.3rem;
  row-gap: 0.25rem;
  padding: 0.28rem 0.35rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface-color, #fff);
  transition: background 0.12s, border-color 0.12s;
}

.acoes-kb-sub-item:hover {
  border-color: #e2e8f0;
}

.acoes-kb-sub-item--done {
  background: #f8fafc;
}

.acoes-kb-sub-lead {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 7rem;
  min-width: 0;
}

.acoes-kb-sub-main {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
}

.acoes-kb-sub-check {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  accent-color: var(--brand-primary, #00bf9a);
  cursor: pointer;
}

.acoes-kb-sub-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--text-primary, #1e293b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acoes-kb-sub-title--done {
  text-decoration: line-through;
  color: var(--text-secondary, #94a3b8);
}

.acoes-kb-sub-title-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--text-primary, #1e293b);
  padding: 0.12rem 0.3rem;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}

.acoes-kb-sub-title-input:hover {
  border-color: var(--border-color, #e2e8f0);
}

.acoes-kb-sub-title-input:focus {
  border-color: var(--brand-primary, #00bf9a);
  background: var(--surface-color, #fff);
  white-space: normal;
}

/* Trailing controls sit tight on the right — no stretched empty gap */
.acoes-kb-sub-order {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.12s;
}

.acoes-kb-sub-item:hover .acoes-kb-sub-order,
.acoes-kb-sub-item:focus-within .acoes-kb-sub-order {
  opacity: 1;
}

.acoes-kb-sub-order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, opacity 0.12s;
}

.acoes-kb-sub-order-btn:hover:not(:disabled) {
  background: var(--border-color, #e2e8f0);
  color: var(--text-primary, #1e293b);
}

.acoes-kb-sub-order-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.acoes-kb-sub-order-btn--danger {
  opacity: 0;
}

.acoes-kb-sub-item:hover .acoes-kb-sub-order-btn--danger,
.acoes-kb-sub-item:focus-within .acoes-kb-sub-order-btn--danger {
  opacity: 1;
}

.acoes-kb-sub-order-btn--danger:hover:not(:disabled) {
  background: #fee2e2;
  color: #ef4444;
}

.acoes-kb-sub-order-btn .material-icons {
  font-size: 0.85rem;
}

.acoes-kb-sub-assignee {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.acoes-kb-sub-item:not(:has(.acoes-kb-sub-order)) .acoes-kb-sub-timer {
  margin-left: auto;
}

/* Timer cluster stays content-sized; sessions break out full-width */
.acoes-kb-sub-item .acoes-kb-sub-timer {
  flex: 0 0 auto;
}

.acoes-kb-sub-item .acoes-kb-sub-timer-badge-icon {
  display: none;
}

.acoes-kb-sub-item .acoes-kb-sub-timer-badge {
  padding: 0.12rem 0.35rem 0.12rem 0.4rem;
  min-height: 1.4rem;
  font-size: 0.68rem;
}

.acoes-kb-sub-item .acoes-kb-sub-timer-btn {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 6px;
}

.acoes-kb-sub-item .acoes-kb-sub-timer-btn .material-icons {
  font-size: 0.85rem;
}

.acoes-kb-sub-item .acoes-kb-sub-timer-sessions {
  flex: 1 1 100%;
  order: 20;
  width: 100%;
}

.acoes-kb-sub-item .acoes-kb-sub-timer-sessions .acoes-kb-time-sessions {
  max-height: none;
  overflow: visible;
  margin-top: 0;
  padding: 0.35rem 0 0;
  border-top: 1px solid #e2e8f0;
  gap: 0.3rem;
}

.acoes-kb-sub-item .acoes-kb-time-session {
  padding: 0.35rem 0.45rem;
}

/* Legacy tools container (kept for safety if still referenced) */
.acoes-kb-sub-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
  min-width: 0;
}

/* Add input row */
.acoes-kb-sub-add {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  margin-top: 0.1rem;
  position: sticky;
  bottom: 0;
  background: var(--surface-secondary, #f8fafc);
  padding-top: 0.2rem;
}

.acoes-kb-sub-add-input {
  flex: 1;
  min-width: 0;
  padding: 0.25rem 0.4rem;
  font-size: 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 5px;
  background: var(--surface-color, #fff);
  color: var(--text-primary, #1e293b);
  outline: none;
  transition: border-color 0.15s;
}

.acoes-kb-sub-add-input:focus {
  border-color: var(--brand-primary, #00bf9a);
}

.acoes-kb-sub-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border: none;
  border-radius: 5px;
  background: var(--brand-primary, #00bf9a);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.1s;
}

.acoes-kb-sub-add-btn:hover:not(:disabled) {
  opacity: 0.92;
}

.acoes-kb-sub-add-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.acoes-kb-sub-add-btn .material-icons {
  font-size: 0.9rem;
}

@media (hover: none), (pointer: coarse) {
  .acoes-kb-sub-order,
  .acoes-kb-sub-order-btn--danger {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .acoes-kb-sub-item .acoes-kb-sub-title,
  .acoes-kb-sub-item .acoes-kb-sub-title-input:not(:focus) {
    white-space: nowrap;
  }

  .acoes-kb-sub-lead {
    flex: 1 1 100%;
  }

  .acoes-kb-sub-order {
    margin-left: 0;
    opacity: 1;
  }

  .acoes-kb-sub-item .acoes-kb-sub-timer {
    margin-left: auto;
  }
}

/* Per-subtask timer chip inside SubtaskPanel / modal Sub-itens */
.acoes-kb-sub-timer-wrap {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  max-width: 100%;
  min-width: 0;
}

/* Modal: children join the row flex; sessions take a full-width line */
.acoes-kb-sub-timer-wrap--breakout {
  display: contents;
}

.acoes-kb-sub-timer-sessions {
  width: 100%;
  min-width: 0;
}

.acoes-kb-sub-timer-wrap--breakout > .acoes-kb-sub-timer-sessions {
  flex: 1 1 100%;
  order: 30;
  width: 100%;
  margin-top: 0.1rem;
}

.acoes-kb-sub-timer-wrap--breakout
  > .acoes-kb-sub-timer-sessions
  .acoes-kb-time-sessions {
  max-height: none;
  overflow: visible;
  margin-top: 0;
  padding: 0.5rem 0 0;
  border-top: 1px solid #e2e8f0;
}

.acoes-kb-sub-timer {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
  position: relative;
  flex-shrink: 0;
}

.acoes-kb-sub-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary, #64748b);
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 999px;
  padding: 0.2rem 0.45rem 0.2rem 0.35rem;
  font-family: inherit;
  line-height: 1.25;
  min-height: 1.6rem;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.acoes-kb-sub-timer-badge-icon {
  font-size: 0.85rem !important;
  color: #94a3b8;
}

.acoes-kb-sub-timer-badge-val {
  font-weight: 600;
  color: #334155;
}

.acoes-kb-sub-timer-badge-chev {
  font-size: 0.95rem !important;
  color: #94a3b8;
  margin-left: -0.05rem;
}

.acoes-kb-sub-timer-badge--expandable {
  cursor: pointer;
}

.acoes-kb-sub-timer-badge--expandable:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.acoes-kb-sub-timer-badge--open {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.acoes-kb-sub-timer-badge--live {
  color: #2563eb;
  border-color: #93c5fd;
  background: #eff6ff;
  animation: acoes-timer-pulse 1s ease-in-out infinite;
}

.acoes-kb-sub-timer-badge--live .acoes-kb-sub-timer-badge-icon,
.acoes-kb-sub-timer-badge--live .acoes-kb-sub-timer-badge-val {
  color: #2563eb;
}

.acoes-kb-sub-timer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.acoes-kb-sub-timer-btn:hover:not(:disabled) {
  background: var(--primary-color, #3b82f6);
  color: #fff;
}

.acoes-kb-sub-timer-btn--on {
  background: #dbeafe;
  color: #2563eb;
}

.acoes-kb-sub-timer-btn--on:hover:not(:disabled) {
  background: #ef4444;
  color: #fff;
}

.acoes-kb-sub-timer-btn--add {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.acoes-kb-sub-timer-btn--add:hover:not(:disabled) {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.acoes-kb-sub-timer-btn--add-on {
  background: #d1fae5;
  color: #047857;
  border-color: #6ee7b7;
}

.acoes-kb-sub-timer-btn--busy {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

.acoes-kb-sub-timer-btn--busy .material-icons {
  animation: acoes-timer-spin 0.9s linear infinite;
}

.acoes-kb-sub-timer-btn .material-icons {
  font-size: 0.95rem;
}

/* =========================================================
   Timer Modal — floating dialog opened by any play/stop click
   ========================================================= */
.tt-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: tt-backdrop-in 0.15s ease;
}
@keyframes tt-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.tt-modal {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 14px;
  box-shadow:
    0 20px 60px rgba(15, 23, 42, 0.22),
    0 4px 16px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  animation: tt-modal-in 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}
@keyframes tt-modal-in {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Header strip */
.tt-modal-hdr {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem 0.9rem;
  border-bottom: 1px solid #e2e8f0;
}
.tt-modal-hdr > h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
  margin: 0;
  color: #1e293b;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}
.tt-modal--start .tt-modal-hdr {
  background: linear-gradient(135deg, #eff6ff 0%, #fff 70%);
}
.tt-modal--stop .tt-modal-hdr {
  background: linear-gradient(135deg, #fff7ed 0%, #fff 70%);
}
.tt-modal-icon {
  font-size: 2rem !important;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.tt-modal--start .tt-modal-icon {
  color: #22c55e;
}
.tt-modal--stop .tt-modal-icon {
  color: #f97316;
}
.tt-modal-hdr-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.tt-modal-verb {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.tt-modal--start .tt-modal-verb {
  color: #16a34a;
}
.tt-modal--stop .tt-modal-verb {
  color: #ea580c;
}
.tt-modal-task {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tt-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #94a3b8;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.tt-modal-close:hover {
  background: #f1f5f9;
  color: #475569;
}
.tt-modal-close .material-icons {
  font-size: 1.1rem !important;
}

/* Switch warning */
.tt-modal-warn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: #fef9c3;
  border-bottom: 1px solid #fde047;
  font-size: 0.8rem;
  color: #713f12;
}
.tt-modal-warn .material-icons {
  font-size: 1rem !important;
  color: #ca8a04;
  flex-shrink: 0;
}

/* Body */
.tt-modal-body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.tt-modal-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  display: block;
}
.tt-modal-textarea {
  width: 100%;
  resize: vertical;
  min-height: 5.5rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #1e293b;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  font-family: inherit;
}
.tt-modal-textarea:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.tt-modal-textarea--err {
  border-color: #ef4444;
}
.tt-modal-textarea--err:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.tt-modal-err {
  font-size: 0.78rem;
  color: #ef4444;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.tt-modal-err::before {
  content: "error";
  font-family: "Material Icons";
  font-size: 0.9rem;
}

/* Footer buttons */
.tt-modal-foot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: flex-end;
}
.tt-modal-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  letter-spacing: 0.01em;
}
.tt-modal-submit:active {
  transform: scale(0.97);
}
.tt-modal-submit--start {
  background: #22c55e;
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}
.tt-modal-submit--start:hover {
  background: #16a34a;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}
.tt-modal-submit--stop {
  background: #f97316;
  color: #fff;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}
.tt-modal-submit--stop:hover {
  background: #ea580c;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}
.tt-modal-submit .material-icons {
  font-size: 1.1rem !important;
}
.tt-modal-cancel {
  padding: 0.52rem 1rem;
  font-size: 0.86rem;
  font-weight: 500;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.tt-modal-cancel:hover {
  border-color: #94a3b8;
  color: #334155;
  background: #f8fafc;
}

@media (max-width: 480px) {
  .tt-modal {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
  }
  .tt-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  @keyframes tt-modal-in {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* --- Edit modal Sub-itens fieldset --- */
.acoes-hub-subtasks {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
}
.acoes-hub-subtasks-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  padding: 0 0.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.acoes-hub-subtasks-count {
  background: var(--primary-color, #3b82f6);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 0.1rem 0.45rem;
  margin-left: 0.2rem;
}
.acoes-hub-subtasks-list {
  list-style: none;
  margin: 0 0 0.65rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.acoes-hub-subtask-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  transition: background 0.12s;
}
.acoes-hub-subtask-item:hover {
  background: var(--surface-secondary, #f1f5f9);
}
.acoes-hub-subtask-check {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--primary-color, #3b82f6);
  cursor: pointer;
}
.acoes-hub-subtask-title {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-primary, #1e293b);
}
.acoes-hub-subtask-title--done {
  text-decoration: line-through;
  color: var(--text-secondary, #94a3b8);
}
.acoes-hub-subtask-title-input {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  padding: 0.25rem 0.45rem;
}
.acoes-hub-subtask-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.acoes-hub-subtask-item:hover .acoes-hub-subtask-del {
  opacity: 1;
}
.acoes-hub-subtask-del:hover {
  background: #fee2e2;
  color: #ef4444;
}
.acoes-hub-subtask-del .material-icons {
  font-size: 0.85rem;
}
.acoes-hub-subtask-add {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.acoes-hub-subtask-add-input {
  min-width: 0;
}

/* --- Sub-itens manager (modal: task cronômetro + sub-itens) --- */
.acoes-subitems {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.acoes-subitems-task {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.acoes-subitems-task .acoes-kb-time-wrap {
  width: 100%;
}

.acoes-subitems-task .acoes-kb-time-sessions {
  max-height: none;
  overflow: visible;
}

.acoes-subitems-task-label,
.acoes-subitems-head {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.acoes-subitems-count {
  background: var(--brand-primary, #00bf9a);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 0.12rem 0.5rem;
  margin-left: 0.15rem;
  letter-spacing: 0;
  text-transform: none;
}

.acoes-subitems-empty {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-secondary, #94a3b8);
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--border-color, #e2e8f0);
  border-radius: 10px;
  background: #fafbfc;
}

.acoes-subitems-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.acoes-subitems-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.45rem;
  row-gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: var(--surface-color, #fff);
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.acoes-subitems-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.acoes-subitems-item--done {
  background: #f8fafc;
}

.acoes-subitems-lead {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 12rem;
  min-width: 0;
}

.acoes-subitems-check {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--brand-primary, #00bf9a);
  cursor: pointer;
}

.acoes-subitems-title {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--text-primary, #1e293b);
  overflow-wrap: anywhere;
}

.acoes-subitems-title--done {
  text-decoration: line-through;
  color: var(--text-secondary, #94a3b8);
}

.acoes-subitems-title-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  font-size: 0.875rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.acoes-subitems-title-input:hover {
  border-color: var(--border-color, #e2e8f0);
}

.acoes-subitems-title-input:focus {
  border-color: var(--brand-primary, #00bf9a);
  background: var(--surface-color, #fff);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 191, 154, 0.15);
}

/* Push trailing controls to the right on wide rows */
.acoes-subitems-order {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
  margin-left: auto;
}

.acoes-subitems-item:not(:has(.acoes-subitems-order)) .acoes-kb-sub-timer {
  margin-left: auto;
}

.acoes-subitems-item:not(:has(.acoes-subitems-order)):not(
  :has(.acoes-kb-sub-timer)
)
  > .acoes-subitems-assignee {
  margin-left: auto;
}

.acoes-subitems-item:not(:has(.acoes-subitems-order)):not(
  :has(.acoes-kb-sub-timer)
):not(:has(.acoes-subitems-assignee))
  > .acoes-subitems-icon-btn--danger {
  margin-left: auto;
}

.acoes-subitems-assignee {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.acoes-subitems-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}

.acoes-subitems-icon-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: #334155;
}

.acoes-subitems-icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.acoes-subitems-icon-btn--danger {
  opacity: 0;
}

.acoes-subitems-item:hover .acoes-subitems-icon-btn--danger,
.acoes-subitems-item:focus-within .acoes-subitems-icon-btn--danger {
  opacity: 1;
}

.acoes-subitems-icon-btn--danger:hover:not(:disabled) {
  background: #fee2e2;
  color: #ef4444;
}

.acoes-subitems-icon-btn .material-icons {
  font-size: 0.95rem;
}

/* Legacy alias kept for any leftover markup */
.acoes-subitems-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}

.acoes-subitems-item:hover .acoes-subitems-del {
  opacity: 1;
}

.acoes-subitems-del:hover {
  background: #fee2e2;
  color: #ef4444;
}

.acoes-subitems-del .material-icons {
  font-size: 0.95rem;
}

.acoes-subitems-add {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.acoes-subitems-add-input {
  min-width: 0;
  flex: 1 1 12rem;
}

.acoes-subitems-add .app-btn {
  flex: 0 0 auto;
}

/* Sub-itens responsive: reposition, don't just shrink */
@media (max-width: 720px) {
  .acoes-subitems-item {
    padding: 0.65rem 0.7rem;
    gap: 0.5rem;
  }

  .acoes-subitems-lead {
    flex: 1 1 100%;
    order: 1;
  }

  .acoes-subitems-order {
    margin-left: 0;
    order: 2;
  }

  .acoes-subitems-item .acoes-kb-sub-timer {
    order: 3;
    margin-left: 0;
    flex: 1 1 auto;
    justify-content: flex-start;
  }

  .acoes-subitems-assignee {
    order: 4;
    margin-left: auto;
  }

  .acoes-subitems-item > .acoes-subitems-icon-btn--danger {
    order: 5;
    opacity: 1;
    margin-left: 0;
  }

  .acoes-kb-sub-timer-wrap--breakout > .acoes-kb-sub-timer-sessions {
    order: 20;
  }

  .acoes-kb-sub-timer-btn {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
  }

  .acoes-kb-sub-timer-badge {
    min-height: 2.25rem;
    padding: 0.3rem 0.55rem 0.3rem 0.45rem;
    font-size: 0.78rem;
  }

  .acoes-subitems-icon-btn {
    width: 2.25rem;
    height: 2.25rem;
  }

  .acoes-subitems-add {
    flex-direction: column;
    align-items: stretch;
  }

  .acoes-subitems-add .app-btn {
    width: 100%;
    justify-content: center;
    min-height: 2.5rem;
  }

  .acoes-kb-time-session {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.35rem;
  }

  .acoes-kb-time-session-actions {
    grid-column: 1;
    grid-row: auto;
    align-self: start;
    justify-content: flex-end;
    width: 100%;
  }

  .acoes-kb-time-session-edit,
  .acoes-kb-time-session-delete {
    width: 2.25rem;
    height: 2.25rem;
  }
}

@media (max-width: 420px) {
  .acoes-subitems-order {
    display: none;
  }

  .acoes-subitems-task {
    padding: 0.65rem 0.7rem;
  }
}

/* --- Matriz Eisenhower --- */
.acoes-hub-body--matriz {
  min-height: min(72vh, 52rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.acoes-matriz {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(min(58vh, 640px), 1fr) auto;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--liberty-shadow);
}

.acoes-matriz-plot {
  min-height: min(58vh, 640px);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.acoes-matriz-plot svg {
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: min(58vh, 640px);
  display: block;
}

.acoes-matriz-bubble {
  cursor: pointer;
  outline: none;
}

/* Scale the circles around their own centre on hover. Scaling the <g> itself
   would override its inline translate() transform, teleporting the bubble to
   the SVG origin and causing a mouseenter/mouseleave flicker loop. */
.acoes-matriz-bubble circle {
  transition: transform 0.12s, filter 0.12s;
  transform-box: fill-box;
  transform-origin: center;
}

.acoes-matriz-bubble:hover circle,
.acoes-matriz-bubble--active circle,
.acoes-matriz-bubble:focus-visible circle {
  transform: scale(1.25);
}

.acoes-matriz-bubble--active circle:last-child,
.acoes-matriz-bubble:focus-visible circle:last-child {
  filter: drop-shadow(0 0 0 2px #fff) drop-shadow(
    0 0 0 4px var(--brand-primary, #00bf9a)
  );
}

/* Rich hover peek — Cronograma + Matriz (same language as ContextPeek) */
.acoes-matriz-peek,
.acoes-action-peek {
  position: fixed;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  box-shadow:
    0 12px 40px rgba(15, 23, 42, 0.16),
    0 4px 12px rgba(15, 23, 42, 0.08);
  padding: 0.85rem 0.95rem;
  animation: ctx-peek-in 0.14s ease-out;
}

.acoes-matriz-peek__head,
.acoes-action-peek__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.acoes-matriz-peek__quad,
.acoes-action-peek__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.acoes-matriz-peek__quad .material-icons,
.acoes-action-peek__badge .material-icons {
  font-size: 0.9rem;
}

.acoes-matriz-peek__prio,
.acoes-action-peek__prio {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
}

.acoes-matriz-peek__title,
.acoes-action-peek__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.35;
  color: var(--brand-dark, #002b49);
}

.acoes-matriz-peek__meta,
.acoes-action-peek__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
}

.acoes-matriz-peek__meta > span,
.acoes-action-peek__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.acoes-matriz-peek__meta .material-icons,
.acoes-action-peek__meta .material-icons {
  font-size: 0.95rem;
  opacity: 0.85;
}

.acoes-matriz-peek__hint,
.acoes-action-peek__hint {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
  font-style: italic;
}

.acoes-matriz-peek__labels,
.acoes-action-peek__labels {
  margin-top: 0.1rem;
}

.acoes-matriz-peek__ctx,
.acoes-action-peek__ctx {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.acoes-matriz-peek__prio-row,
.acoes-action-peek__prio-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-color, #e2e8f0);
}

.acoes-matriz-peek__prio-label,
.acoes-action-peek__prio-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.acoes-matriz-peek__prio-opts,
.acoes-action-peek__prio-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.acoes-matriz-peek__prio-opt,
.acoes-action-peek__prio-opt {
  appearance: none;
  border: 1px solid var(--border-color, #e2e8f0);
  background: #f8fafc;
  color: #475569;
  border-radius: 99px;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.acoes-matriz-peek__prio-opt:hover,
.acoes-action-peek__prio-opt:hover {
  border-color: #94a3b8;
  background: #fff;
}

.acoes-matriz-peek__prio-opt--active,
.acoes-action-peek__prio-opt--active {
  color: #fff;
}

.acoes-matriz-peek__actions,
.acoes-action-peek__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.1rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.acoes-matriz-side {
  border-left: none;
  padding-left: 0;
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding-top: 1rem;
  min-width: 0;
  max-height: min(28vh, 260px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.acoes-matriz-side-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #64748b);
  margin: 0 0 0.25rem;
}

.acoes-matriz-side-lead {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.acoes-matriz-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.acoes-matriz-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

.acoes-matriz-item-title {
  flex: 1;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 0.78rem;
  color: var(--text-primary, #1e293b);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acoes-matriz-item-title:hover {
  color: var(--brand-primary, #00bf9a);
}

.acoes-matriz-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  flex-shrink: 0;
}

.acoes-matriz-item-prio {
  font-size: 0.72rem;
  padding: 0.15rem 0.3rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  background: #fff;
}

.acoes-matriz-item--more {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
  font-style: italic;
}

/* Wide landscape only: legend beside the plot */
@media (min-width: 1280px) and (orientation: landscape) {
  .acoes-matriz {
    grid-template-columns: minmax(0, 1fr) min(260px, 28%);
    grid-template-rows: minmax(420px, 1fr);
  }

  .acoes-matriz-plot {
    min-height: 420px;
  }

  .acoes-matriz-plot svg {
    min-height: 420px;
  }

  .acoes-matriz-side {
    border-left: 1px solid var(--border-color, #e2e8f0);
    border-top: none;
    padding-left: 1rem;
    padding-top: 0;
    max-height: none;
  }
}

/* --- Cronograma (Gantt-lite) --- */
.acoes-crono {
  --acoes-crono-label-w: 240px;
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--liberty-shadow);
  display: flex;
  flex-direction: column;
}

.acoes-crono-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.acoes-crono-zoom {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 0.2rem;
  gap: 0.15rem;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.acoes-crono-zoom-btn {
  border: none;
  background: transparent;
  padding: 0.4rem 0.75rem;
  min-height: 36px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.acoes-crono-zoom-btn--active {
  background: #fff;
  color: var(--brand-primary, #00bf9a);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.acoes-crono-nav {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
  flex-shrink: 0;
}

.acoes-crono-nav .app-btn {
  min-width: 36px;
  min-height: 36px;
}

.acoes-crono-scroll {
  overflow: auto;
  background: #fff;
  max-height: min(70vh, 640px);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.acoes-crono-inner {
  min-width: 100%;
  position: relative;
}

.acoes-crono-header {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 6;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.acoes-crono-header-left {
  width: var(--acoes-crono-label-w);
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-right: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  align-items: center;
  position: sticky;
  left: 0;
  z-index: 7;
  background: #f8fafc;
  box-shadow: 4px 0 8px -4px rgb(15 23 42 / 0.12);
}

.acoes-crono-header-right {
  position: relative;
  flex-shrink: 0;
}

.acoes-crono-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(148, 163, 184, 0.25);
}

.acoes-crono-tick--major {
  background: rgba(148, 163, 184, 0.5);
}

.acoes-crono-tick-label {
  position: absolute;
  top: 8px;
  left: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  white-space: nowrap;
}

.acoes-crono-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #dc2626;
  pointer-events: none;
}

.acoes-crono-lanes {
  position: relative;
}

.acoes-crono-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #f1f5f9;
}

.acoes-crono-row-left {
  width: var(--acoes-crono-label-w);
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary, #1e293b);
  border-right: 1px solid var(--border-color, #e2e8f0);
  background: #fff;
  border: none;
  border-right: 1px solid var(--border-color, #e2e8f0) !important;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: sticky;
  left: 0;
  z-index: 4;
  box-shadow: 4px 0 8px -4px rgb(15 23 42 / 0.1);
}

.acoes-crono-row-left:hover {
  background: #f8fafc;
}

.acoes-crono-row-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.acoes-crono-row-labels {
  margin-top: 0;
}

.acoes-crono-row-right {
  position: relative;
  flex-shrink: 0;
  min-height: 100%;
}

.acoes-crono-bar {
  position: absolute;
  top: 7px;
  height: 22px;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: grab;
  padding: 0 0.5rem;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
  transition: transform 0.12s, box-shadow 0.12s;
  touch-action: none;
  z-index: 1;
}

.acoes-crono-bar:active {
  cursor: grabbing;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.18);
}

.acoes-crono-bar:hover {
  transform: translateY(-1px);
}

.acoes-crono-bar-label {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}

.acoes-crono-floating {
  position: absolute;
  top: 7px;
  left: 8px;
  height: 22px;
  padding: 0 0.625rem;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  color: var(--text-secondary, #64748b);
  font-size: 0.72rem;
  cursor: pointer;
}

.acoes-crono-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(220, 38, 38, 0.35);
  pointer-events: none;
  z-index: 1;
}

.acoes-crono-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-secondary, #64748b);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .acoes-crono {
    --acoes-crono-label-w: min(38vw, 156px);
    border-radius: 10px;
    padding: 0;
  }

  .acoes-crono-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.625rem 0.5rem;
    gap: 0.4rem;
  }

  .acoes-crono-zoom,
  .acoes-crono-nav {
    width: 100%;
    justify-content: center;
  }

  .acoes-crono-header-left {
    font-size: 0.72rem;
    padding-inline: 0.5rem;
  }

  .acoes-crono-row-left {
    font-size: 0.72rem;
    padding-inline: 0.5rem;
    line-height: 1.25;
    white-space: normal;
  }

  .acoes-crono-row-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
  }

  .acoes-crono-tick-label {
    font-size: 0.62rem;
    top: 6px;
    left: 2px;
  }

  .acoes-crono-bar {
    top: 5px;
    height: 26px;
    min-height: 26px;
    border-radius: 5px;
  }

  .acoes-crono-floating {
    top: 5px;
    height: 26px;
    font-size: 0.68rem;
  }

  .acoes-crono-row {
    min-height: 44px;
    height: auto !important;
  }

  .acoes-crono-row-right {
    min-height: 44px;
  }

  .acoes-crono-scroll {
    max-height: min(65vh, 520px);
    border-inline: none;
    border-radius: 0 0 10px 10px;
  }
}

@media (max-width: 420px) {
  .acoes-crono {
    --acoes-crono-label-w: min(42vw, 148px);
  }

  .acoes-crono-zoom-btn {
    padding-inline: 0.55rem;
    font-size: 0.72rem;
  }
}

/* --- Relatório --- */
.acoes-rel {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 1.125rem 1.25rem;
  box-shadow: var(--liberty-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.acoes-rel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.acoes-rel-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-primary, #1e293b);
}

.acoes-rel-export-error {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.875rem;
}

.acoes-rel-lead {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
}

.acoes-rel-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.625rem;
}

.acoes-rel-metric {
  background: #f8fafc;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.acoes-rel-metric-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #64748b);
}

.acoes-rel-metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary, #1e293b);
  line-height: 1;
  letter-spacing: -0.02em;
}

.acoes-rel-metric--ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.acoes-rel-metric--ok .acoes-rel-metric-value {
  color: #16a34a;
}

.acoes-rel-metric--danger {
  background: #fff7f7;
  border-color: #fecaca;
}

.acoes-rel-metric--danger .acoes-rel-metric-value {
  color: #dc2626;
}

.acoes-rel-section {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.acoes-rel-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #64748b);
  margin: 0;
}

.acoes-rel-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.acoes-rel-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
}

.acoes-rel-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 0.375rem;
  vertical-align: middle;
}

.acoes-rel-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.acoes-rel-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.acoes-rel-list-item {
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  gap: 0.5rem;
  align-items: center;
}

.acoes-rel-list-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary, #1e293b);
}

.acoes-rel-list-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}

.acoes-rel-list-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s;
}

.acoes-rel-list-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.acoes-lista-titlebtn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  color: var(--text-primary, #1e293b);
}

.acoes-lista-titlebtn:hover {
  color: var(--brand-primary, #00bf9a);
}

@media print {
  .acoes-hub-toolbar,
  .acoes-hub-views,
  .acoes-hub-checks,
  .acoes-kpi-row,
  .app-sidebar,
  .app-header,
  .page-tabs,
  .app-page-header {
    display: none !important;
  }
  .acoes-rel {
    border: none;
    box-shadow: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Projetos Hub (Wave 10)
   ═══════════════════════════════════════════════════════════════════════ */

.projetos-hub {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.projetos-hub-toolbar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.75rem;
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
}

.projetos-hub-toolbar-grow {
  flex: 1 1 280px;
  min-width: 200px;
}

.projetos-hub-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.projetos-hub > .acoes-hub-views {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}

.projetos-hub > .acoes-hub-views .acoes-hub-view {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  min-width: max-content;
  overflow: hidden;
  white-space: nowrap;
}

.projetos-hub > .acoes-hub-views .acoes-hub-view__cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: nowrap;
  min-width: max-content;
  white-space: nowrap;
}

.projetos-hub > .acoes-hub-views .acoes-hub-view .material-icons {
  flex-shrink: 0;
}

.projetos-hub > .acoes-hub-views .acoes-hub-view__label {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: hidden;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .projetos-hub > .acoes-hub-views {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

@media (max-width: 720px) {
  .projetos-hub {
    gap: 0.75rem;
  }

  .projetos-hub-toolbar {
    padding: 0.65rem;
    gap: 0.45rem;
  }

  .projetos-hub-toolbar-grow {
    flex: 1 1 100%;
    min-width: 0;
  }

  .projetos-hub-toolbar .app-filter-select {
    flex: 1 1 auto;
    min-width: 0;
  }

  .projetos-hub-toolbar .uc-entity-toolbar__cta {
    flex: 0 0 auto;
  }

  .projetos-hub > .acoes-hub-views {
    padding: 0.2rem;
    gap: 0.2rem;
  }

  .projetos-hub > .acoes-hub-views .acoes-hub-view {
    min-height: 40px;
    padding: 0.45rem 0.7rem;
    font-size: 0.78rem;
  }
}

/* ── Cards grid ─────────────────────────────────────────────────────── */
.proj-cards-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.proj-card {
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 14px;
  padding: 1rem 1.125rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-width: 0;
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}
.proj-card:hover {
  box-shadow: 0 6px 24px -10px rgba(15, 23, 42, 0.15);
  transform: translateY(-2px);
  border-color: var(--brand-primary, #00bf9a);
}

.proj-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.proj-card-head-left {
  flex: 1;
  min-width: 0;
}
.proj-card-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary, #1e293b);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.proj-card-client {
  margin: 0.35rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj-card-client .material-icons {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.proj-card-radial {
  flex-shrink: 0;
}

.proj-card-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.proj-card-days {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  padding: 0.2rem 0.55rem;
  background: #f1f5f9;
  border-radius: 99px;
  max-width: 100%;
  white-space: nowrap;
}
.proj-card-days .material-icons {
  font-size: 0.8rem;
  flex-shrink: 0;
}
.proj-card-days--warn {
  background: #fef3c7;
  color: #92400e;
}
.proj-card-days--late {
  background: #fee2e2;
  color: #b91c1c;
}

.proj-card-stats {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #eef2f6;
}
.proj-card-stats-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
}
.proj-card-stats-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
  padding-top: 0.625rem;
  border-top: 1px solid #e2e8f0;
}
.proj-card-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.proj-card-stat-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj-card-stat-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.proj-card-stat-value strong {
  font-weight: 700;
}

.proj-card-foot {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}
.proj-card-foot-primary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
.proj-card-foot-primary .app-btn {
  width: 100%;
  min-width: 0;
}
.proj-card-foot-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.125rem;
  border-top: 1px solid var(--border-soft, #e2e8f0);
}
.proj-card-foot-secondary .app-btn {
  min-width: 0;
}

@media (max-width: 480px) {
  .proj-card {
    padding: 0.875rem 1rem;
  }
  .proj-card-stats-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .proj-card-stats-metrics .proj-card-stat:last-child {
    grid-column: 1 / -1;
  }
  .proj-card-foot-primary {
    grid-template-columns: 1fr;
  }
}

/* ── Gantt hierárquico ─────────────────────────────────────────────── */
.proj-gantt {
  --proj-gantt-label-w: 260px;
  --proj-gantt-proj: #5b4bdb;
  --proj-gantt-proj-soft: #eeebff;
  --proj-gantt-svc: #0284c7;
  --proj-gantt-svc-track: #e0f2fe;
  --proj-gantt-act: #d97706;
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--liberty-shadow);
}

.proj-gantt-toolbar {
  padding: 0.7rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  border-bottom: 1px solid var(--border-soft, #e2e8f0);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.proj-gantt-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.proj-gantt-toolbar-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.proj-gantt-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid var(--border-soft, #e2e8f0);
  background: #fff;
  color: var(--text-secondary, #64748b);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  min-height: 34px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.proj-gantt-tool-btn .material-icons {
  font-size: 1rem;
}

.proj-gantt-tool-btn:hover {
  border-color: #cbd5e1;
  color: var(--text-primary, #1e293b);
  background: #f8fafc;
}

.proj-gantt-tool-btn--on {
  border-color: rgb(0 191 154 / 0.45);
  background: rgb(0 191 154 / 0.1);
  color: var(--brand-primary, #00bf9a);
}

.proj-gantt-legend {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
}

.proj-gantt-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.proj-gantt-legend-sw {
  width: 16px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.proj-gantt-legend-sw--proj {
  background: var(--proj-gantt-proj);
}

.proj-gantt-legend-sw--svc {
  background: linear-gradient(
    90deg,
    var(--proj-gantt-svc) 55%,
    var(--proj-gantt-svc-track) 55%
  );
}

.proj-gantt-legend-sw--action {
  width: 9px;
  height: 9px;
  background: var(--proj-gantt-act);
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
}

.proj-gantt-empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--text-secondary, #64748b);
  font-size: 0.9rem;
}

.proj-gantt-scroll {
  overflow: auto;
  max-height: min(70vh, 680px);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background:
    linear-gradient(90deg, #fff 0, #fff var(--proj-gantt-label-w)),
    repeating-linear-gradient(
    90deg,
    transparent,
    transparent 55px,
    rgb(148 163 184 / 0.06) 55px,
    rgb(148 163 184 / 0.06) 56px
  );
}

.proj-gantt-inner {
  min-width: 100%;
  position: relative;
}

.proj-gantt-header {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 6;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-soft, #e2e8f0);
}

.proj-gantt-header-left {
  width: var(--proj-gantt-label-w);
  flex-shrink: 0;
  padding: 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-right: 1px solid var(--border-soft, #e2e8f0);
  display: flex;
  align-items: center;
  position: sticky;
  left: 0;
  z-index: 7;
  background: #f1f5f9;
  box-shadow: 4px 0 10px -6px rgb(15 23 42 / 0.18);
}

.proj-gantt-header-right {
  position: relative;
  flex-shrink: 0;
}

.proj-gantt-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgb(148 163 184 / 0.18);
}

.proj-gantt-tick--major {
  background: rgb(148 163 184 / 0.4);
}

.proj-gantt-tick-label {
  position: absolute;
  top: 50%;
  left: 6px;
  transform: translateY(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.proj-gantt-today-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ef4444;
  z-index: 2;
  pointer-events: none;
}

.proj-gantt-today-badge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: #ef4444;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(239 68 68 / 0.35);
}

.proj-gantt-group {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #e2e8f0;
}

.proj-gantt-row {
  display: flex;
  position: relative;
  align-items: stretch;
}

.proj-gantt-row--proj {
  background: #f8fafc;
}

.proj-gantt-row--svc {
  background: #fff;
  border-top: 1px solid #f1f5f9;
}

.proj-gantt-row--act {
  background: #fff;
  border-top: 1px solid #f8fafc;
}

.proj-gantt-row-left {
  width: var(--proj-gantt-label-w);
  flex-shrink: 0;
  padding: 0 0.65rem 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-primary, #1e293b);
  background: inherit;
  border: none;
  border-right: 1px solid var(--border-soft, #e2e8f0);
  text-align: left;
  cursor: pointer;
  position: sticky;
  left: 0;
  z-index: 4;
  box-shadow: 4px 0 10px -6px rgb(15 23 42 / 0.14);
  min-width: 0;
}

.proj-gantt-row--proj .proj-gantt-row-left {
  background: #f8fafc;
}

.proj-gantt-row--svc .proj-gantt-row-left,
.proj-gantt-row--act .proj-gantt-row-left {
  background: #fff;
}

.proj-gantt-row-left--child {
  cursor: default;
  padding-left: 1.65rem;
  color: var(--text-secondary, #475569);
}

.proj-gantt-row-left--leaf {
  padding-left: 2.1rem;
}

.proj-gantt-chevron {
  font-size: 1.1rem !important;
  color: #94a3b8;
  flex-shrink: 0;
}

.proj-gantt-row-icon {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.proj-gantt-row-icon .material-icons {
  font-size: 0.85rem;
}

.proj-gantt-row-icon--proj {
  background: var(--proj-gantt-proj-soft);
  color: var(--proj-gantt-proj);
}

.proj-gantt-row-icon--svc {
  background: #e0f2fe;
  color: var(--proj-gantt-svc);
}

.proj-gantt-row-icon--act {
  background: #fef3c7;
  color: var(--proj-gantt-act);
}

.proj-gantt-row-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 0.05rem;
}

.proj-gantt-row-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  line-height: 1.25;
  color: inherit;
}

.proj-gantt-row--proj .proj-gantt-row-title {
  font-weight: 700;
  color: #0f172a;
}

.proj-gantt-row-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.65rem;
  font-weight: 500;
  color: #94a3b8;
}

.proj-gantt-count,
.proj-gantt-pct {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  min-width: 1.4rem;
  text-align: center;
}

.proj-gantt-pct {
  background: #e0f2fe;
  color: #0369a1;
}

.proj-gantt-row-right {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

.proj-gantt-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.proj-gantt-grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgb(148 163 184 / 0.14);
}

.proj-gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgb(239 68 68 / 0.85);
  z-index: 2;
  pointer-events: none;
}

.proj-gantt-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 22px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
  border: none;
  cursor: pointer;
  z-index: 3;
}

.proj-gantt-bar--proj {
  height: 18px;
  background: linear-gradient(90deg, #5b4bdb, #7c6ef0);
  color: #fff;
  cursor: default;
  opacity: 0.95;
}

.proj-gantt-bar--svc {
  background: var(--proj-gantt-svc-track);
  color: #0c4a6e;
  position: absolute;
}

.proj-gantt-bar--svc:hover {
  filter: brightness(0.97);
  box-shadow: 0 2px 6px rgb(2 132 199 / 0.2);
}

.proj-gantt-bar--external-label {
  padding: 0;
}

.proj-gantt-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--proj-gantt-svc);
  border-radius: 7px;
  opacity: 0.45;
  pointer-events: none;
}

.proj-gantt-bar-label {
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.proj-gantt-ext-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  font-size: 0.68rem;
  font-weight: 650;
  color: #334155;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  text-shadow: 0 0 4px #fff, 0 0 6px #fff, 1px 0 0 #fff, -1px 0 0 #fff;
}

.proj-gantt-ext-label--btn {
  pointer-events: auto;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.proj-gantt-ext-label--btn:hover {
  color: var(--proj-gantt-svc);
  text-decoration: underline;
}

.proj-gantt-ext-label--act {
  max-width: 160px;
  color: #92400e;
  font-weight: 600;
}

.proj-gantt-nodates {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.68rem;
  color: #94a3b8;
  font-style: italic;
}

.proj-gantt-milestone {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  appearance: none;
  font: inherit;
  z-index: 4;
  display: grid;
  place-items: center;
}

.proj-gantt-milestone-dot {
  width: 11px;
  height: 11px;
  background: var(--proj-gantt-act);
  border: 2px solid #fff;
  border-radius: 2px;
  transform: rotate(45deg);
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.25);
}

.proj-gantt-milestone:hover .proj-gantt-milestone-dot {
  transform: rotate(45deg) scale(1.12);
}

.proj-gantt-milestone:disabled {
  cursor: default;
  opacity: 0.9;
}

/* Mobile stacked timeline (hidden on desktop) */
.proj-gantt-mobile {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
}

.proj-gantt-mcard {
  background: #fff;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.proj-gantt-mcard-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.85rem 0.85rem 0.45rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.proj-gantt-mcard-head-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.proj-gantt-mcard-title {
  font-size: 0.92rem;
  font-weight: 750;
  color: #0f172a;
  line-height: 1.3;
}

.proj-gantt-mcard-meta {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.proj-gantt-mtrack {
  padding: 0 0.85rem 0.75rem;
}

.proj-gantt-mcard-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0 0.65rem 0.75rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.65rem;
}

.proj-gantt-mempty {
  margin: 0;
  padding: 0.5rem 0.25rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.proj-gantt-mitem {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fafbfc;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.proj-gantt-mitem:hover {
  border-color: #bae6fd;
  background: #f0f9ff;
}

.proj-gantt-mitem--act {
  background: #fffbeb;
  border-color: #fde68a;
}

.proj-gantt-mitem--act:hover {
  background: #fef3c7;
  border-color: #fcd34d;
}

.proj-gantt-mitem:disabled {
  cursor: default;
  opacity: 0.9;
}

.proj-gantt-mitem-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.proj-gantt-mitem-name {
  font-size: 0.82rem;
  font-weight: 650;
  color: #1e293b;
  line-height: 1.3;
  min-width: 0;
}

.proj-gantt-mitem-pct {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}

.proj-gantt-mitem-due {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}

.proj-gantt-mitem-dates {
  font-size: 0.7rem;
  color: #64748b;
}

.proj-gantt-mini {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: visible;
  margin-top: 0.15rem;
}

.proj-gantt-mini--empty {
  opacity: 0.55;
}

.proj-gantt-mini-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  min-width: 6px;
  overflow: hidden;
}

.proj-gantt-mini-bar--proj {
  background: linear-gradient(90deg, #5b4bdb, #7c6ef0);
}

.proj-gantt-mini-bar--svc {
  background: var(--proj-gantt-svc-track);
}

.proj-gantt-mini-fill {
  display: block;
  height: 100%;
  background: var(--proj-gantt-svc);
  border-radius: 999px;
}

.proj-gantt-mini-today {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: #ef4444;
  z-index: 2;
  transform: translateX(-50%);
  border-radius: 1px;
}

.proj-gantt-mini-milestone {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  background: var(--proj-gantt-act);
  border: 2px solid #fff;
  border-radius: 2px;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.2);
  z-index: 3;
}

@media (max-width: 900px) {
  .proj-gantt {
    --proj-gantt-label-w: min(42vw, 200px);
  }

  .proj-gantt-toolbar {
    padding: 0.65rem 0.7rem;
  }

  .proj-gantt-tool-btn {
    min-height: 36px;
  }

  .proj-gantt-row-sub {
    display: none;
  }

  .proj-gantt-ext-label {
    max-width: 120px;
  }
}

@media (max-width: 720px) {
  .proj-gantt-scroll {
    display: none;
  }

  .proj-gantt-mobile {
    display: flex;
  }

  /* Zoom / Hoje only apply to the desktop chart */
  .proj-gantt .acoes-crono-zoom,
  .proj-gantt-tool-btn--today {
    display: none;
  }

  .proj-gantt-legend {
    width: 100%;
    justify-content: flex-start;
  }

  .proj-gantt-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .proj-gantt-toolbar-main {
    flex-direction: column;
    align-items: stretch;
  }

  .proj-gantt-toolbar-actions {
    width: 100%;
  }

  .proj-gantt-toolbar-actions .proj-gantt-tool-btn {
    flex: 1 1 calc(50% - 0.3rem);
    justify-content: center;
    min-height: 40px;
  }
}

@media (max-width: 420px) {
  .proj-gantt-mcard-title {
    font-size: 0.88rem;
  }

  .proj-gantt-toolbar-actions .proj-gantt-tool-btn {
    font-size: 0.68rem;
    padding-inline: 0.45rem;
  }
}

/* Planejador de ações do projeto (modal) */
.proj-acao-planner__tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.proj-acao-planner__tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft, #e2e8f0);
  background: #f8fafc;
  color: var(--text-secondary, #64748b);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.proj-acao-planner__tab--on {
  background: var(--brand, #0ea5e9);
  border-color: transparent;
  color: #fff;
}
.proj-acao-planner__track {
  border: 1px dashed var(--border-soft, #e2e8f0);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.proj-acao-planner__radio {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  cursor: pointer;
}
.proj-acao-planner__radio input {
  margin-top: 0.2rem;
}
.proj-acao-planner__ai .ai-fill {
  margin-bottom: 0.5rem;
}

/* Seleção de comitê no modal de aprovação estratégica */
.approval-committee-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: min(18rem, 42vh);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.approval-committee-picker__option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.approval-committee-picker__option:hover:not(:disabled) {
  border-color: #94a3b8;
  background: #fff;
}

.approval-committee-picker__option--selected {
  border-color: var(--brand, #0ea5e9);
  background: #f0f9ff;
  box-shadow: 0 0 0 1px rgb(14 165 233 / 0.22);
}

.approval-committee-picker__option--empty,
.approval-committee-picker__option:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.approval-committee-picker__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.approval-committee-picker__name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
  line-height: 1.3;
}

.approval-committee-picker__desc {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--liberty-text-muted, #64748b);
  line-height: 1.4;
}

.approval-committee-picker__empty-hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: #b45309;
  line-height: 1.4;
}

.approval-committee-picker__members {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.55rem 0 0;
  padding: 0;
}

.approval-committee-picker__member {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 0.72rem;
  color: #334155;
  line-height: 1.3;
}

.approval-committee-picker__member--chair {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
}

.approval-committee-picker__chair-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

/* Timeline de aprovações (histórico visual) */
.approval-timeline-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 10rem;
  padding: 1.25rem;
}

.approval-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.approval-timeline__request {
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.approval-timeline__request-head {
  padding: 0.875rem 1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid var(--border-soft, #e2e8f0);
}

.approval-timeline__request-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.approval-timeline__request-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: var(--liberty-text-muted, #64748b);
}

.approval-timeline__request-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.approval-timeline__request-meta .material-icons {
  font-size: 0.9rem;
}

.approval-timeline__inbox-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand, #0ea5e9);
  text-decoration: none;
}

.approval-timeline__inbox-link:hover {
  text-decoration: underline;
}

.approval-timeline__steps {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1rem 1rem;
}

.approval-timeline__step {
  display: flex;
  gap: 0.75rem;
  min-height: 0;
}

.approval-timeline__step--current .approval-timeline__step-body {
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.approval-timeline__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 2rem;
}

.approval-timeline__dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
  flex-shrink: 0;
}

.approval-timeline__dot .material-icons {
  font-size: 0.95rem;
}

.approval-timeline__dot--done {
  border-color: #16a34a;
  background: #dcfce7;
  color: #16a34a;
}

.approval-timeline__dot--rejected {
  border-color: #dc2626;
  background: #fef2f2;
  color: #dc2626;
}

.approval-timeline__dot--current {
  border-color: #8b5cf6;
  background: #8b5cf6;
  color: #fff;
  box-shadow: 0 0 0 3px rgb(139 92 246 / 0.2);
}

.approval-timeline__dot--pending {
  border-color: #cbd5e1;
  background: #fff;
  color: #94a3b8;
}

.approval-timeline__line {
  flex: 1;
  width: 2px;
  min-height: 1rem;
  margin: 0.15rem 0;
  background: linear-gradient(180deg, #cbd5e1 0%, #e2e8f0 100%);
}

.approval-timeline__step-body {
  flex: 1;
  min-width: 0;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 10px;
}

.approval-timeline__step-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.approval-timeline__step-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
}

.approval-timeline__step-title--success {
  color: #16a34a;
}

.approval-timeline__step-title--danger {
  color: #dc2626;
}

.approval-timeline__step-detail {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--liberty-text-muted, #64748b);
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.approval-timeline__comment {
  margin: 0.45rem 0 0;
  padding: 0.5rem 0.65rem;
  border-left: 3px solid #dc2626;
  border-radius: 0 8px 8px 0;
  background: #fef2f2;
  font-size: 0.75rem;
  color: #991b1b;
  line-height: 1.45;
  display: flex;
  gap: 0.35rem;
  align-items: flex-start;
}

.approval-timeline__comment .material-icons {
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.approval-timeline__comment--neutral {
  border-left-color: #94a3b8;
  background: #f8fafc;
  color: #475569;
}

/* ── Calendário ────────────────────────────────────────────────────── */
.proj-cal {
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.proj-cal-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.proj-cal-title {
  flex: 1;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  text-transform: capitalize;
}
.proj-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--border-soft, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-soft, #e2e8f0);
}
.proj-cal-wk {
  text-align: center;
  padding: 0.35rem;
  background: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.proj-cal-cell {
  min-height: 84px;
  background: #fff;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.proj-cal-cell--empty {
  background: #f8fafc;
}
.proj-cal-cell--today {
  background: #eff6ff;
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}
.proj-cal-cell-day {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}
.proj-cal-cell-items {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}
.proj-cal-pill {
  border: none;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-cal-pill:hover {
  filter: brightness(0.95);
}
.proj-cal-more {
  font-size: 0.62rem;
  color: var(--text-secondary, #64748b);
}

/* ── Dashboard ─────────────────────────────────────────────────────── */
.proj-dashview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.proj-dashview-kpis {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.proj-dashview-kpi {
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.proj-dashview-kpi-label {
  font-size: 0.7rem;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.proj-dashview-kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary, #1e293b);
  font-variant-numeric: tabular-nums;
}
.proj-dashview-kpi-sub {
  font-size: 0.68rem;
  color: var(--text-secondary, #64748b);
}

.proj-dashview-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.proj-dashview-section {
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
  padding: 1rem;
}
.proj-dashview-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}
.proj-dashview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.proj-dashview-list-item {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 2fr auto;
  gap: 0.5rem;
  align-items: center;
}
.proj-dashview-list-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary, #1e293b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj-dashview-list-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}
.proj-dashview-list-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s;
}
.proj-dashview-list-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ── Drawer de serviços ────────────────────────────────────────────── */
.proj-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  animation: proj-fadein 0.2s ease;
}
@keyframes proj-fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.proj-drawer {
  width: min(560px, 100vw);
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px -8px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  animation: proj-slidein 0.24s ease;
}
@keyframes proj-slidein {
  from {
    transform: translateX(40px);
  }
  to {
    transform: translateX(0);
  }
}
.proj-drawer-head {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-soft, #e2e8f0);
}
.proj-drawer-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.proj-drawer-sub {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
}

.proj-drawer-meta {
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-soft, #e2e8f0);
}
.proj-drawer-meta-label {
  font-size: 0.68rem;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}
.proj-drawer-progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}
.proj-drawer-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00bf9a, #00b6d6);
  border-radius: 99px;
  transition: width 0.4s;
}

.proj-drawer-actions {
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-soft, #e2e8f0);
}
.proj-drawer-tmpl {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}

.proj-drawer-form {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border-soft, #e2e8f0);
  background: #f8fafc;
}
.proj-drawer-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}
.proj-drawer-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.proj-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  flex: 1;
}
.proj-drawer-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 10px;
}
.proj-drawer-item-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.proj-drawer-item-title {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}
.proj-drawer-item-weight {
  font-size: 0.65rem;
  color: var(--text-secondary, #64748b);
}
.proj-drawer-item-desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.proj-drawer-item-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.7rem;
  color: var(--text-secondary, #64748b);
}
.proj-drawer-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.proj-drawer-item-meta .material-icons {
  font-size: 0.8rem;
}
.proj-drawer-item-status {
  padding: 0.1rem 0.4rem;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 99px;
  font-weight: 600;
}
.proj-drawer-item-prog {
  height: 6px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}
.proj-drawer-item-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #00bf9a, #00b6d6);
  border-radius: 99px;
  transition: width 0.4s;
}
.proj-drawer-item-prog-label {
  font-size: 0.65rem;
  color: var(--text-secondary, #64748b);
  text-align: right;
}
.proj-drawer-item-actions {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* ── Modelos de entrega ────────────────────────────────────────────── */
.proj-templates {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.proj-templates-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.proj-templates-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}
.proj-templates-lead {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
  max-width: 680px;
}
.proj-templates-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.proj-template-card {
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.proj-template-card:hover {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 4px 18px -8px rgba(15, 23, 42, 0.15);
}
.proj-template-card-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--brand-primary, #00bf9a);
}
.proj-template-card-head .material-icons {
  font-size: 1.1rem;
}
.proj-template-card-head h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}
.proj-template-card-cat {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  background: #ede9fe;
  color: #6d28d9;
  border-radius: 99px;
}
.proj-template-card-desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.proj-template-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0;
  padding: 0.5rem;
  background: #f8fafc;
  border-radius: 8px;
}
.proj-template-card-meta div {
  margin: 0;
}
.proj-template-card-meta dt {
  font-size: 0.62rem;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.proj-template-card-meta dd {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}
.proj-template-card-foot {
  display: flex;
  gap: 0.35rem;
  margin-top: auto;
}
.proj-template-card-foot .app-btn {
  flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════
   Indicator (Wave A)
   ═══════════════════════════════════════════════════════════════════════ */

/* Wizard */
.ind-wiz {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ind-wiz-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
}
.ind-wiz-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft, #e2e8f0);
  background: #fff;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s, background 0.2s;
}
.ind-wiz-step--active {
  opacity: 1;
  border-color: var(--brand-primary, #00bf9a);
  background: #ecfdf5;
}
.ind-wiz-step--done {
  opacity: 1;
  border-color: #d1fae5;
  background: #f0fdf4;
}
.ind-wiz-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  background: #f1f5f9;
  color: var(--text-secondary, #64748b);
}
.ind-wiz-step--active .ind-wiz-step-num {
  background: var(--brand-primary, #00bf9a);
  color: #fff;
}
.ind-wiz-step--done .ind-wiz-step-num {
  background: #16a34a;
  color: #fff;
}
.ind-wiz-step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.ind-wiz-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 260px;
}
.ind-wiz-row {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.ind-wiz-polarity {
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  margin: 0;
}
.ind-wiz-polarity legend {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  padding: 0 0.35rem;
  letter-spacing: 0.05em;
}
.ind-wiz-polarity-opts {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.ind-wiz-polarity-opt {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.6rem;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.ind-wiz-polarity-opt:hover {
  background: #f8fafc;
}
.ind-wiz-polarity-opt--active {
  border-color: var(--brand-primary, #00bf9a);
  background: #ecfdf5;
}
.ind-wiz-polarity-opt input {
  margin-top: 3px;
}
.ind-wiz-polarity-opt .material-icons {
  color: var(--brand-primary, #00bf9a);
}
.ind-wiz-polarity-opt strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-primary, #1e293b);
}
.ind-wiz-polarity-opt small {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
}

.ind-wiz-summary {
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft, #e2e8f0);
}
.ind-wiz-summary h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}
.ind-wiz-summary dl {
  margin: 0;
  display: grid;
  gap: 0.35rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.ind-wiz-summary dl div {
  margin: 0;
}
.ind-wiz-summary dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #64748b);
  font-weight: 600;
}
.ind-wiz-summary dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

/* View toggle */
.kpi-view-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: #f1f5f9;
  border-radius: 8px;
}
.kpi-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.6rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary, #64748b);
}
.kpi-view-btn .material-icons {
  font-size: 1rem;
}
.kpi-view-btn--active {
  background: #fff;
  color: var(--brand-primary, #00bf9a);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

/* Card tweaks for edit button + tree compact */
.kpi-card {
  position: relative;
}
.kpi-card-hit {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.kpi-card > :not(.kpi-card-hit) {
  position: relative;
  z-index: 1;
}
.kpi-card-edit {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  padding: 0.15rem;
  border-radius: 6px;
  display: inline-flex;
}
.kpi-card-edit:hover {
  background: #f1f5f9;
  color: var(--brand-primary, #00bf9a);
}
.kpi-card-foot {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.kpi-card-weight {
  font-size: 0.68rem;
  color: var(--text-secondary, #64748b);
  padding: 0.12rem 0.4rem;
  background: #f1f5f9;
  border-radius: 99px;
}
.kpi-card-overdue {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #7c3aed;
  background: #ede9fe;
  padding: 0.12rem 0.5rem;
  border-radius: 99px;
}
.kpi-card--compact {
  padding: 0.6rem 0.75rem;
}

/* Tree view */
.kpi-tree {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.kpi-tree-node {
  margin-left: calc(var(--depth, 0) * 24px);
  position: relative;
}
.kpi-tree-node::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 12px;
  width: 10px;
  height: 2px;
  background: #cbd5e1;
  display: var(--depth-line, block);
}
.kpi-tree-node[style*="--depth:0"]::before {
  display: none;
}
.kpi-tree-children {
  list-style: none;
  margin: 0.4rem 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-left: 2px dashed #e2e8f0;
  padding-left: 0;
}

/* Ficha técnica */
.ind-description {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--text-secondary, #64748b);
}
.ind-ficha {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
}
.ind-ficha-title {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-primary, #1e293b);
}
.ind-ficha-title .material-icons {
  color: var(--brand-primary, #00bf9a);
  font-size: 1.05rem;
}
.ind-ficha-grid {
  margin: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.ind-ficha-grid div {
  margin: 0;
}
.ind-ficha-grid dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #64748b);
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.ind-ficha-grid dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}
.ind-ficha-wide {
  grid-column: 1 / -1;
}
.ind-ficha-code {
  display: inline-block;
  padding: 0.35rem 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.82rem;
  color: #334155;
}

/* ═══════════════════════════════════════════════════════════════════════
   Financial Impact (Wave B) - extensions
   ═══════════════════════════════════════════════════════════════════════ */

.fin-total-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.fin-total-sub {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
}

.fin-view-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: #f1f5f9;
  border-radius: 8px;
}
.fin-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.55rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary, #64748b);
}
.fin-view-btn .material-icons {
  font-size: 0.95rem;
}
.fin-view-btn--active {
  background: #fff;
  color: var(--brand-primary, #00bf9a);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.fin-cat-formula {
  background: #f8fafc;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-left: 3px solid #e2e8f0;
}
.fin-cat-formula-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #64748b);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.fin-cat-formula-label .material-icons {
  font-size: 0.8rem;
}
.fin-cat-formula code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  color: #334155;
  background: transparent;
  padding: 0;
}

.fin-cat-examples {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.fin-cat-examples li {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.fin-cat-examples .material-icons {
  font-size: 0.55rem;
  color: #cbd5e1;
}

/* Tree */
.fin-tree {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fin-tree-node {
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 10px;
  background: var(--surface-base, #fff);
  overflow: hidden;
}
.fin-tree-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.75rem 0.85rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  border-left: 3px solid var(--c, #64748b);
}
.fin-tree-summary::-webkit-details-marker {
  display: none;
}
.fin-tree-summary .material-icons {
  color: var(--c, #64748b);
}
.fin-tree-summary strong {
  font-size: 0.92rem;
  color: var(--text-primary, #1e293b);
}
.fin-tree-count {
  font-size: 0.7rem;
  color: var(--text-secondary, #64748b);
  padding: 0.1rem 0.4rem;
  background: #f1f5f9;
  border-radius: 99px;
}
.fin-tree-amount {
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--c, #64748b);
  font-variant-numeric: tabular-nums;
}
.fin-tree-subs {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fin-tree-subs li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.fin-tree-sub-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-primary, #1e293b);
}
.fin-tree-sub-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fin-tree-sub-bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}
.fin-tree-sub-bar-fill {
  height: 100%;
  border-radius: 99px;
}
.fin-tree-empty {
  margin: 0 0.85rem 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
}

/* Waterfall */
.fin-waterfall {
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
  padding: 1rem;
  overflow-x: auto;
}
.fin-waterfall-lead {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary, #64748b);
}
.fin-waterfall-svg {
  display: block;
  min-width: 480px;
}

/* ═══════════════════════════════════════════════════════════════════════
   MASP/FCA Wizard (Wave C)
   ═══════════════════════════════════════════════════════════════════════ */

.masp-wizard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.masp-header {
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.masp-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.masp-method-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  background: #ecfdf5;
  color: #065f46;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid #a7f3d0;
}
.masp-method-badge .material-icons {
  font-size: 1rem;
}
.masp-progress-label {
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
  font-weight: 600;
}
.masp-progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}
.masp-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00bf9a, #00b6d6);
  border-radius: 99px;
  transition: width 0.4s;
}

.masp-stepper {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.masp-step {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.6rem 0.75rem;
  background: #fff;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.masp-step:hover {
  border-color: var(--brand-primary, #00bf9a);
  transform: translateY(-1px);
}
.masp-step--active {
  border-color: var(--brand-primary, #00bf9a);
  background: #ecfdf5;
}
.masp-step--done {
  border-color: #a7f3d0;
}
.masp-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  background: #f1f5f9;
  color: var(--text-secondary, #64748b);
  flex-shrink: 0;
}
.masp-step--active .masp-step-num {
  background: var(--brand-primary, #00bf9a);
  color: #fff;
}
.masp-step--done .masp-step-num {
  background: #16a34a;
  color: #fff;
}
.masp-step--done .masp-step-num .material-icons {
  font-size: 1rem;
}
.masp-step-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.masp-step-title {
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-primary, #1e293b);
}
.masp-step-title .material-icons {
  font-size: 0.95rem;
  color: var(--brand-primary, #00bf9a);
}
.masp-step-sub {
  font-size: 0.7rem;
  color: var(--text-secondary, #64748b);
}

.masp-panel {
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 14px;
  padding: 1.25rem;
  min-height: 300px;
}
.masp-step-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.masp-step-content h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary, #1e293b);
}
.masp-step-content .app-muted {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary, #64748b);
}

.masp-row {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.masp-card {
  background: #f8fafc;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 10px;
  padding: 0.85rem;
}
.masp-card h4 {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}

.masp-hint {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.75rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
}
.masp-hint .material-icons {
  color: #2563eb;
  flex-shrink: 0;
}
.masp-hint strong {
  font-size: 0.85rem;
  color: #1e40af;
  display: block;
}
.masp-hint p {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #1e3a8a;
}

.masp-5w2h-wrap {
  overflow-x: auto;
}
.masp-5w2h-wrap .app-table {
  width: 100%;
  min-width: 900px;
}
.masp-5w2h-wrap .app-table .app-input {
  min-width: 110px;
}

.masp-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
  position: sticky;
  bottom: 0.5rem;
  z-index: 3;
  box-shadow: 0 2px 12px -4px rgba(15, 23, 42, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════
   Monitoramento Executivo Cockpit (Wave D)
   ═══════════════════════════════════════════════════════════════════════ */

.cockpit {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cockpit-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cockpit-header-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary, #1e293b);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.cockpit-header-title .material-icons {
  color: var(--brand-primary, #00bf9a);
}

.cockpit-gauges {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 14px;
  padding: 1rem;
}
.cockpit-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
}
.cockpit-gauge-foot {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}
.cockpit-gauge-foot .material-icons {
  font-size: 1rem;
}

.cockpit-main {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.2fr);
}
@media (max-width: 900px) {
  .cockpit-main {
    grid-template-columns: 1fr;
  }
}

.cockpit-alerts,
.cockpit-impact {
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 14px;
  padding: 1rem;
}
.cockpit-alerts-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-primary, #1e293b);
}
.cockpit-alerts-title .material-icons {
  color: var(--brand-primary, #00bf9a);
}
.cockpit-alerts-empty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary, #64748b);
}
.cockpit-alerts-empty .material-icons {
  color: #16a34a;
}
.cockpit-alerts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cockpit-alert {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #f8fafc;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  border-left: 3px solid #94a3b8;
}
.cockpit-alert:hover {
  background: #f1f5f9;
  transform: translateX(2px);
}
.cockpit-alert--high {
  border-color: #dc2626;
  background: #fee2e215;
}
.cockpit-alert--high .material-icons {
  color: #dc2626;
}
.cockpit-alert--medium {
  border-color: #d97706;
  background: #fef9c315;
}
.cockpit-alert--medium .material-icons {
  color: #d97706;
}
.cockpit-alert--low {
  border-color: #64748b;
}
.cockpit-alert strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-primary, #1e293b);
}
.cockpit-alert span:not(.material-icons) {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
}
.cockpit-alert div {
  flex: 1;
  min-width: 0;
}
.cockpit-alert-arrow {
  color: #94a3b8;
}

.cockpit-impact-svg {
  display: block;
  width: 100%;
  height: auto;
}

.cockpit-section-title {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-primary, #1e293b);
}
.cockpit-section-title .material-icons {
  color: var(--brand-primary, #00bf9a);
}

/* Presentation mode */
.cockpit--presentation {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  padding: 2rem;
  overflow-y: auto;
  color: #fff;
}
.cockpit--presentation .cockpit-header-title {
  color: #fff;
}
.cockpit--presentation .cockpit-header-title .material-icons {
  color: #5eead4;
}
.cockpit--presentation .cockpit-section-title {
  color: #fff;
}
.cockpit--presentation .cockpit-gauges,
.cockpit--presentation .cockpit-alerts,
.cockpit--presentation .cockpit-impact,
.cockpit--presentation .cockpit-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}
.cockpit--presentation .cockpit-card-title,
.cockpit--presentation .cockpit-alert strong {
  color: #f1f5f9;
}
.cockpit--presentation .cockpit-alert {
  background: rgba(255, 255, 255, 0.03);
}
.cockpit--presentation .cockpit-alert:hover {
  background: rgba(255, 255, 255, 0.08);
}
.cockpit--presentation .cockpit-gauge-foot {
  color: #e2e8f0;
}

/* ═══════════════════════════════════════════════════════════════════════
   Dual-capture (Wave E)
   ═══════════════════════════════════════════════════════════════════════ */
.dual-capture {
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
  padding: 0.8rem 1rem 1rem;
  margin: 0;
  background: linear-gradient(135deg, #fafaff, #f8fafc);
}
.dual-capture-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-primary, #00bf9a);
  padding: 0 0.4rem;
}
.dual-capture-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 720px) {
  .dual-capture-grid {
    grid-template-columns: 1fr;
  }
}
.dual-capture-score {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: #f1f5f9;
  color: var(--text-primary, #1e293b);
  font-size: 0.85rem;
}
.dual-capture-score strong {
  font-size: 1.15rem;
  color: var(--brand-primary, #00bf9a);
  padding: 0 0.25rem;
}
.dual-capture-score .material-icons {
  color: var(--brand-primary, #00bf9a);
}
.dual-capture-formula {
  margin-left: auto;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--text-secondary, #64748b);
}

/* ═══════════════════════════════════════════════════════════════════════
   Conformidade ponderada — heatmap (Wave F)
   ═══════════════════════════════════════════════════════════════════════ */
.conf-heatmap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.conf-heatmap-stds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.conf-std-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid transparent;
  border-radius: 10px;
  background: color-mix(in srgb, var(--chip, #0891b2) 8%, transparent);
  color: var(--text-primary, #1e293b);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.conf-std-chip:hover {
  border-color: var(--chip, #0891b2);
}
.conf-std-chip.is-active {
  background: color-mix(in srgb, var(--chip, #0891b2) 20%, transparent);
  border-color: var(--chip, #0891b2);
}
.conf-std-chip .material-icons {
  color: var(--chip, #0891b2);
}
.conf-std-chip-body {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  line-height: 1.2;
}
.conf-std-chip-body strong {
  font-size: 0.85rem;
}
.conf-std-chip-score {
  margin-left: 0.5rem;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
}

.conf-overall {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--adh, #94a3b8) 10%, #fff),
    #fff
  );
  border: 2px solid color-mix(in srgb, var(--adh, #94a3b8) 40%, transparent);
}
.conf-overall > div:first-child {
  flex: 1;
}
.conf-overall h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-primary, #1e293b);
}
.conf-overall h4 .material-icons {
  color: var(--adh, #94a3b8);
}
.conf-overall p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary, #64748b);
}
.conf-overall-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.conf-overall-big {
  font-size: 2rem;
  font-weight: 900;
  color: var(--adh, #94a3b8);
  line-height: 1;
}
.conf-overall-lbl {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--adh, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.conf-heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
  margin-bottom: 0.4rem;
}
.conf-legend-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
}

.conf-chapters {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.conf-chapter {
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-base, #fff);
}
.conf-chapter-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: #fff;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.85rem;
  border-left: 4px solid var(--adh, #cbd5e1);
  transition: background 0.15s;
}
.conf-chapter-head:hover {
  background: #f8fafc;
}
.conf-chapter-code {
  font-weight: 800;
  color: var(--text-primary, #1e293b);
  min-width: 44px;
}
.conf-chapter-name {
  flex: 1;
  color: var(--text-primary, #1e293b);
  font-weight: 600;
}
.conf-chapter-meta {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
  margin-right: 0.5rem;
}
.conf-chapter-score {
  font-weight: 800;
  color: var(--adh, #cbd5e1);
  min-width: 48px;
  text-align: right;
}

.conf-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.4rem 0.5rem 0.6rem 2rem;
  background: #fafbfd;
  border-top: 1px solid var(--border-soft, #e2e8f0);
}
.conf-item {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.4rem 0.5rem;
  background: #fff;
  border-radius: 8px;
  border-left: 3px solid var(--adh, #cbd5e1);
  font-size: 0.8rem;
}
.conf-item-code {
  font-weight: 700;
  color: var(--text-secondary, #64748b);
}
.conf-item-req {
  color: var(--text-primary, #1e293b);
}
.conf-item-w {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
  background: #f1f5f9;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
}
.conf-item-score {
  font-weight: 700;
  color: var(--adh, #cbd5e1);
  min-width: 72px;
  text-align: right;
}

@media (max-width: 640px) {
  .conf-item {
    grid-template-columns: 44px 1fr;
  }
  .conf-item-w,
  .conf-item-score {
    grid-column: 2 / 3;
    justify-self: end;
  }
  .conf-chapter-meta {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Harmonização visual (Wave G)
   ═══════════════════════════════════════════════════════════════════════ */
/* Unify section titles across hubs (Acoes, Projetos, Conformidade, Retorno, Cockpit) */
.app-section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}
.app-section-title .material-icons {
  color: var(--brand-primary, #00bf9a);
}

/* Smooth transitions on interactive chips/cards */
.conf-std-chip,
.cockpit-alert,
.uc-badge,
.app-btn {
  transition: all 0.15s ease;
}

/* Consistent empty state hint spacing on wave G */
.empty-state-hint {
  border-radius: 14px;
}

/* Print-friendly (for cockpit presentation → PDF export) */
@media print {
  .cockpit--presentation {
    position: static;
    background: #fff;
    color: #1e293b;
  }
  .cockpit--presentation .cockpit-gauges,
  .cockpit--presentation .cockpit-alerts,
  .cockpit--presentation .cockpit-impact {
    background: #fff;
    color: #1e293b;
    border-color: #e2e8f0;
  }
  .app-btn,
  .cockpit-header-bar button {
    display: none !important;
  }
}

/* Accessibility: focus rings on new interactive elements */
.conf-std-chip:focus-visible,
.conf-chapter-head:focus-visible,
.cockpit-alert:focus-visible {
  outline: 3px solid
    color-mix(in srgb, var(--brand-primary, #00bf9a) 40%, transparent);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Wave H — Layout & Spacing System (2026-04-17)

   Goal: a single, shared page layout that every screen uses, with
   standardized spacing tokens so new screens automatically feel like
   they belong to the rest of the app.

   Tokens (use these, avoid inline paddings/margins/max-widths):
   - --ds-space-1..10     modular spacing scale (0.25rem step)
   - --ds-page-pad-x / y  fluid page padding (clamp based on viewport)
   - --ds-page-max        default: full width of main column (`none`)
   - --ds-page-max-narrow reading/form pages (max ~1024px)

   Classes (applied on the page's outermost wrapper, inside AppChrome):
   - .app-page                page wrapper — uses full main column width by default
   - .app-page.app-page--fluid   alias of default (wide dashboards / legacy)
   - .app-page.app-page--narrow  narrow (detail / form pages)
   - .app-page-title-icon     consistent leading icon on page titles
   - .app-toolbar             standardized filters + CTA bar
   - .app-toolbar__spacer     push subsequent items to the right
   - .app-section             vertical stack with standard gap
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Spacing scale — 4px step. Reach for these instead of ad-hoc rems. */
  --ds-space-0: 0;
  --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;
  --ds-space-9: 3rem;
  --ds-space-10: 4rem;

  /* Page layout — fluid: padding grows with viewport, never feels tight or sparse. */
  --ds-page-pad-x: clamp(1rem, 2.2vw, 2rem);
  --ds-page-pad-y: clamp(1rem, 1.8vw, 1.75rem);
  --ds-page-max: none; /* full width of .app-main-wrap — opt into .app-page--narrow when needed */
  --ds-page-max-narrow: 64rem; /* 1024px — reading-friendly line length */
}

/* Canonical page wrapper.
   Wins over legacy `.app-page` blocks above (no max-width cap).
   Screens use the full main column; add `app-page--narrow` for constrained forms. */
.app-page {
  width: 100%;
  max-width: var(--ds-page-max);
  margin: 0 auto;
  padding: var(--ds-page-pad-y) var(--ds-page-pad-x)
    calc(var(--ds-page-pad-y) * 1.4);
  box-sizing: border-box;
}

.app-page--fluid {
  max-width: none;
}

.app-page--narrow {
  max-width: var(--ds-page-max-narrow);
}

/* Unified leading icon on page titles. Replaces inline styles that drifted
   across routes (`font-size:1.5rem;margin-right:0.375rem;…`). */
.app-page-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.app-page-title-icon {
  font-size: 1.5rem;
  color: var(--brand-primary, #00bf9a);
  flex-shrink: 0;
}

/* Connected apps — integration management screen */
.connected-apps-page {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-5);
  max-width: 70rem;
}

.connected-apps-context {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: fit-content;
  min-width: min(100%, 19rem);
  padding: 0.75rem 1rem;
  color: var(--brand-dark, #002b49);
  background: linear-gradient(135deg, #f0fdfa, #f8fbff);
  border: 1px solid rgb(0 191 154 / 0.18);
  border-radius: var(--ds-radius-lg, 12px);
}

.connected-apps-context > .material-icons {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 0.625rem;
  background: #fff;
  color: var(--brand-primary, #00bf9a);
  box-shadow: 0 1px 3px rgb(0 43 73 / 0.08);
}

.connected-apps-context div {
  display: grid;
  gap: 0.1rem;
}

.connected-apps-context-label,
.connected-app-eyebrow {
  color: var(--text-secondary, #64748b);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.connected-apps-context strong {
  font-size: 0.875rem;
  line-height: 1.3;
}

.connected-apps-list {
  display: grid;
  gap: var(--ds-space-4);
}

.connected-app-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--ds-radius-xl, 16px);
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.connected-app-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.25rem;
  background: var(--border-color, #e2e8f0);
  content: "";
}

.connected-app-card--active {
  border-color: rgb(0 191 154 / 0.3);
  box-shadow: 0 8px 24px rgb(0 43 73 / 0.07);
}

.connected-app-card--active::before {
  background: var(--brand-primary, #00bf9a);
}

.connected-app-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
}

.connected-app-icon {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border-radius: 1rem;
  color: var(--brand-dark, #002b49);
  background: linear-gradient(145deg, #dffaf2, #eaf7ff);
}

.connected-app-icon .material-icons {
  font-size: 1.75rem;
}

.connected-app-card-copy {
  min-width: 0;
}

.connected-app-card-title-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.connected-app-card h2 {
  margin: 0.2rem 0 0;
  color: var(--brand-dark, #002b49);
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.connected-app-status {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #64748b;
  background: #f8fafc;
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.connected-app-status--active {
  border-color: #a7f3d0;
  color: #047857;
  background: #ecfdf5;
}

.connected-app-status-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #94a3b8;
}

.connected-app-status--active .connected-app-status-dot {
  background: #10b981;
  box-shadow: 0 0 0 3px rgb(16 185 129 / 0.12);
}

.connected-app-description {
  max-width: 52rem;
  margin: 0.75rem 0 1rem;
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
  line-height: 1.6;
}

.connected-app-capabilities {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #475569;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.connected-app-capabilities li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.connected-app-capabilities .material-icons {
  flex-shrink: 0;
  margin-top: 0.05rem;
  color: var(--brand-primary, #00bf9a);
  font-size: 1rem;
}

.connected-app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2f6;
}

.connected-app-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #4338ca;
  font-size: 0.8125rem;
  font-weight: 650;
  text-decoration: none;
}

.connected-app-link:hover {
  color: #312e81;
  text-decoration: underline;
}

.connected-app-link .material-icons {
  font-size: 1rem;
}

.connected-app-toggle {
  display: flex;
  min-width: 6.5rem;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  cursor: pointer;
}

.connected-app-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.connected-app-toggle-track {
  display: flex;
  width: 3rem;
  height: 1.75rem;
  align-items: center;
  padding: 0.1875rem;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.connected-app-toggle-thumb {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.22);
  transition: transform 0.15s ease;
}

.connected-app-toggle input:checked + .connected-app-toggle-track {
  background: var(--brand-primary, #00bf9a);
  box-shadow: 0 0 0 4px rgb(0 191 154 / 0.12);
}

.connected-app-toggle
  input:checked
  + .connected-app-toggle-track
  .connected-app-toggle-thumb {
  transform: translateX(1.25rem);
}

.connected-app-toggle input:focus-visible + .connected-app-toggle-track {
  outline: 3px solid rgb(0 182 214 / 0.35);
  outline-offset: 2px;
}

.connected-app-toggle input:disabled + .connected-app-toggle-track {
  opacity: 0.6;
}

.connected-app-toggle-label {
  color: var(--brand-dark, #002b49);
  font-size: 0.75rem;
  font-weight: 700;
}

.connected-app-saved {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0.75rem 0 0;
  color: #047857;
  font-size: 0.8125rem;
  font-weight: 600;
}

.connected-app-saved .material-icons {
  font-size: 1rem;
}

.connected-apps-error {
  margin: 0;
}

.connected-apps-footnote {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.5;
}

.connected-apps-footnote .material-icons {
  color: #94a3b8;
  font-size: 1rem;
}

@media (max-width: 700px) {
  .connected-app-card-main {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    padding: 1.25rem 1rem 1.25rem 1.25rem;
  }

  .connected-app-card-title-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .connected-app-toggle {
    grid-column: 2;
    align-items: flex-start;
    flex-direction: row;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .connected-app-icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .connected-app-card h2 {
    font-size: 1rem;
  }
}

/* MCP agent admin — API key management */
.mcp-admin-page {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-5);
  max-width: 70rem;
}

.mcp-admin-card {
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--ds-radius-xl, 16px);
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.04);
}

.mcp-admin-card-header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.mcp-admin-card-header .material-icons {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, #eef2ff, #f0fdfa);
  color: var(--brand-primary, #00bf9a);
}

.mcp-admin-card-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.0625rem;
}

.mcp-admin-card-header p {
  margin: 0;
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
  line-height: 1.45;
}

.mcp-admin-form {
  display: grid;
  gap: 1rem;
}

.mcp-admin-field {
  display: grid;
  gap: 0.35rem;
}

.mcp-admin-field span {
  font-size: 0.8125rem;
  font-weight: 600;
}

.mcp-admin-field input {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.mcp-admin-projects {
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--border-color, #e2e8f0);
  border-radius: 0.75rem;
}

.mcp-admin-projects legend {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0 0.25rem;
}

.mcp-admin-hint {
  margin: 0 0 0.75rem;
  color: var(--text-secondary, #64748b);
  font-size: 0.8125rem;
}

.mcp-admin-project-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mcp-admin-project-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: #f8fafc;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 999px;
  font-size: 0.8125rem;
  cursor: pointer;
}

.mcp-admin-created {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 0.75rem;
}

.mcp-admin-created-warn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  color: #166534;
  font-size: 0.8125rem;
  font-weight: 600;
}

.mcp-admin-key-display {
  display: block;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #bbf7d0;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  word-break: break-all;
}

.mcp-admin-copy-row {
  margin-top: 0.75rem;
}

.mcp-admin-config-details {
  margin-top: 0.75rem;
}

.mcp-admin-config-details summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
}

.mcp-admin-config-pre {
  margin: 0.5rem 0;
  padding: 0.75rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  overflow-x: auto;
}

.mcp-admin-key-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mcp-admin-key-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.75rem;
}

.mcp-admin-key-prefix {
  margin-left: 0.5rem;
  color: var(--text-secondary, #64748b);
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}

.mcp-admin-key-meta,
.mcp-admin-key-scope {
  margin: 0.25rem 0 0;
  color: var(--text-secondary, #64748b);
  font-size: 0.75rem;
}

.mcp-admin-tools .connected-app-capabilities {
  margin: 0;
}

.mcp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mcp-tab {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 999px;
  background: #fff;
  color: var(--text-secondary, #64748b);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.mcp-tab--active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.mcp-admin-field select {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: #fff;
}

.mcp-admin-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.mcp-admin-subtitle {
  margin: 1.5rem 0 0.75rem;
  font-size: 0.9375rem;
}

.mcp-key-pill {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.6875rem;
  font-weight: 600;
  vertical-align: middle;
}

.mcp-key-pill--personal {
  background: #e0f2fe;
  color: #075985;
}

.mcp-key-pill--warn {
  background: #fef3c7;
  color: #92400e;
}

.mcp-audit-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.mcp-audit-table-wrap {
  overflow-x: auto;
}

.mcp-audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.mcp-audit-table th,
.mcp-audit-table td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.mcp-audit-row {
  cursor: pointer;
}

.mcp-audit-row:hover {
  background: #f8fafc;
}

.mcp-tool-guide {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.mcp-tool-guide li p {
  margin: 0.35rem 0 0;
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
  line-height: 1.45;
}

.mcp-tool-guide-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---- Standard toolbar (filters row + primary action) ----
   Use this wherever a screen has a row of filters/segmented controls with an
   optional CTA on the right. Produces consistent spacing, wrapping, and
   prevents buttons from overflowing on narrow viewports. */
.app-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-3);
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--ds-radius-lg, 12px);
  box-shadow: var(--ds-shadow-xs, 0 1px 2px rgb(0 0 0 / 0.06));
}

.app-toolbar__grow {
  flex: 1 1 180px;
  min-width: 0;
}

.app-toolbar__divider {
  height: 1.5rem;
  width: 1px;
  background: var(--border-color, #e2e8f0);
  margin: 0 var(--ds-space-1);
}

.app-toolbar__spacer {
  margin-left: auto;
}

.app-toolbar--flat {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.approval-form-card {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
}

.approval-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--ds-space-2);
}

.approval-members-card {
  border: 1px solid #c7d2fe;
  background: #eef2ff;
}

/* ---- Vertical stack block ---- */
.app-section {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
}

.app-section--tight {
  gap: var(--ds-space-2);
}

.app-section--loose {
  gap: var(--ds-space-6);
}

/* Keep app-btn from overflowing narrow containers (user reported buttons
   escaping bounds on small/filtered rows). */
.app-btn {
  max-width: 100%;
}
.app-btn > span:not(.material-icons) {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Make the responsive override for .app-page cap the page padding to our token
   (the earlier breakpoint hard-coded 1rem which is fine, but tie it to the scale). */
@media (max-width: 640px) {
  .app-page {
    padding-left: var(--ds-space-4);
    padding-right: var(--ds-space-4);
  }
  .app-toolbar {
    padding: var(--ds-space-2);
  }
}

/* ============================================================
   AI-first framework — empty states, fill panel, audio, toast
   ============================================================ */

/* Pulse no FAB quando há contexto vazio registrado */
.nexo-float-btn--pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--brand-primary, #00bf9a);
  opacity: 0.7;
  animation: nexo-empty-pulse 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes nexo-empty-pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.25);
    opacity: 0;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}
.nexo-float-btn {
  position: fixed;
}

/* Toast proativo que convida para preencher com IA */
.nexo-toast {
  position: fixed;
  right: 5.5rem;
  bottom: 1.75rem;
  z-index: 59;
  max-width: 22rem;
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.14), 0 2px 6px rgb(0 0 0 / 0.06);
  padding: 0.75rem 0.875rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: nexo-toast-in 0.22s ease;
}
@keyframes nexo-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.nexo-toast__body {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.nexo-toast__icon {
  color: var(--brand-primary, #00bf9a);
  font-size: 1.25rem;
}
.nexo-toast__text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--brand-dark, #002b49);
}
.nexo-toast__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.375rem;
}
@media (max-width: 640px) {
  .nexo-toast {
    right: 0.75rem;
    left: 0.75rem;
    bottom: 5.25rem;
    max-width: none;
  }
}

/* Wrap do AiFillPanel quando embutido no chat do Nexo */
.nexo-fill-wrap {
  padding: 0.25rem 0 0.25rem;
}
.nexo-skill-chip--on {
  background: color-mix(in srgb, var(--brand-primary, #00bf9a) 15%, #fff);
  border-color: var(--brand-primary, #00bf9a);
  color: var(--brand-dark, #002b49);
}

.ai-fill--embedded {
  border: none;
  padding: 0;
  background: transparent;
  gap: 0.85rem;
}

.ai-fill--embedded .ai-fill__chips,
.ai-fill--embedded .ai-fill__tabs {
  margin-top: 0.15rem;
}

/* AiEmptyState — card introdutório sobre o fill panel */
.ai-empty-state {
  padding: 0;
}
.ai-empty-state__intro {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.ai-empty-state__icon {
  font-size: 2rem;
  color: var(--brand-primary, #00bf9a);
  background: color-mix(in srgb, var(--brand-primary, #00bf9a) 14%, #fff);
  border-radius: 10px;
  padding: 0.5rem;
}
.ai-empty-state__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
}
.ai-empty-state__desc {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
  line-height: 1.45;
}
.ai-empty-state__error {
  color: #b91c1c;
  margin: 0;
}

/* AiFillPanel */
.ai-fill {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 60%);
}
.ai-fill--nexo {
  padding: 0.75rem;
  background: #fff;
}
.ai-fill__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.ai-fill__title-row {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
}
.ai-fill__icon {
  color: var(--brand-primary, #00bf9a);
  font-size: 1.5rem;
}
.ai-fill__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
}
.ai-fill__lead {
  margin: 0.125rem 0 0;
  color: var(--text-muted, #64748b);
  font-size: 0.85rem;
  line-height: 1.4;
}
.ai-fill__tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  padding-bottom: 0.25rem;
}
.ai-fill__tab {
  background: transparent;
  border: none;
  padding: 0.375rem 0.625rem;
  border-radius: 8px;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
}
.ai-fill__tab--on {
  background: color-mix(in srgb, var(--brand-primary, #00bf9a) 14%, #fff);
  color: var(--brand-dark, #002b49);
  font-weight: 600;
}
.ai-fill__textarea {
  width: 100%;
  min-height: 5rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  background: #fff;
}
.ai-fill__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  margin: 0.5rem 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.ai-fill__samples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.ai-fill__samples-label {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}
.ai-fill__sample-chip {
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 999px;
  padding: 0.2rem 0.625rem;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--brand-dark, #002b49);
}
.ai-fill__sample-chip:hover {
  border-color: var(--brand-primary, #00bf9a);
}
.ai-fill__picker {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.75rem 0 0.25rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--brand-primary, #00bf9a);
  background: color-mix(in srgb, var(--brand-primary, #00bf9a) 8%, #ffffff);
  border-radius: 0.5rem;
}
.ai-fill__picker-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--brand-dark, #002b49);
}
.ai-fill__picker-select {
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.375rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.875rem;
  color: var(--text-primary, #0f172a);
}
.ai-fill__picker-select:focus {
  outline: none;
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--brand-primary, #00bf9a) 25%, transparent);
}
.ai-fill__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.25rem;
}
.ai-fill__actions--preview {
  margin-top: 0.5rem;
}
.ai-fill__applying,
.ai-fill__done {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.25rem;
  font-size: 0.85rem;
  color: var(--brand-dark, #002b49);
}
.ai-fill__done {
  flex-wrap: wrap;
}
.ai-fill__error {
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 8px;
  padding: 0.5rem 0.625rem;
  margin: 0;
  font-size: 0.8125rem;
}
.ai-fill__warnings {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.75rem;
  list-style: disc inside;
  background: #fef9c3;
  color: #713f12;
  border-radius: 8px;
  font-size: 0.8rem;
}

/* Preview: indicators */
.ai-fill__preview {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ai-fill__preview-hint {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.8rem;
}
.ai-fill__indicators-table-wrap {
  overflow-x: auto;
}
.ai-fill__indicators-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.ai-fill__indicators-table th,
.ai-fill__indicators-table td {
  padding: 0.375rem 0.375rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  text-align: left;
  vertical-align: top;
}
.ai-fill__indicators-table th {
  font-weight: 600;
  color: var(--text-muted, #64748b);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ai-fill__indicator-desc {
  margin-top: 0.25rem;
}
.ai-fill__raw {
  font-size: 0.75rem;
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.75rem;
  border-radius: 8px;
  overflow: auto;
  max-height: 16rem;
}

/* Preview: strategic cycle */
.ai-fill__strategic {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ai-fill__mvv {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ai-fill__swot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.ai-fill__swot-card {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 0.625rem;
  background: #fff;
}
.ai-fill__swot-title {
  margin: 0 0 0.375rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-dark, #002b49);
}
.ai-fill__objectives {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.ai-fill__objective {
  display: grid;
  grid-template-columns: 10rem 1fr 10rem auto;
  gap: 0.375rem;
  align-items: center;
}
@media (max-width: 640px) {
  .ai-fill__swot-grid {
    grid-template-columns: 1fr;
  }
  .ai-fill__objective {
    grid-template-columns: 1fr;
  }
}

/* Audio recorder */
.ai-recorder {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.ai-recorder__controls {
  display: flex;
  gap: 0.5rem;
}
.ai-recorder__hint {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
}
.ai-recorder__error {
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 6px;
  padding: 0.375rem 0.5rem;
  font-size: 0.78rem;
  margin: 0;
}
.app-btn--danger {
  background: #dc2626;
  color: #fff;
  border: none;
}
.app-btn--danger:hover {
  background: #b91c1c;
}

/* AI fill — generic list preview (improvements, actions, tickets, etc.) */
.ai-fill__generic {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ai-fill__generic-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ai-fill__generic-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
}
.ai-fill__generic-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}
.ai-fill__generic-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  min-width: 0;
}
.ai-fill__generic-field .ai-fill__label {
  font-weight: 600;
  color: var(--text-muted, #64748b);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ai-fill__generic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  flex-shrink: 0;
}
.ai-fill__generic-actions-spacer {
  flex: 1;
}

/* Stack fields above actions when the container gets narrow
   (Nexo panel on desktop + every layout on mobile). */
@media (max-width: 48rem) {
  .ai-fill__generic-item {
    flex-direction: column;
    align-items: stretch;
  }
  .ai-fill__generic-actions {
    justify-content: flex-end;
    padding-top: 0.25rem;
    border-top: 1px dashed #e2e8f0;
  }
}

/* Nexo-embedded fill panel — always compact regardless of screen size */
.ai-fill--nexo {
  padding: 0.5rem;
  border-radius: 10px;
}
.ai-fill--nexo .ai-fill__generic-item {
  flex-direction: column;
  align-items: stretch;
  padding: 0.5rem 0.625rem;
}
.ai-fill--nexo .ai-fill__generic-fields {
  grid-template-columns: 1fr;
  gap: 0.4rem;
}
.ai-fill--nexo .ai-fill__generic-actions {
  justify-content: flex-end;
  padding-top: 0.25rem;
  border-top: 1px dashed #e2e8f0;
}
.ai-fill--nexo .ai-fill__title {
  font-size: 0.9rem;
}
.ai-fill--nexo .ai-fill__lead {
  font-size: 0.8rem;
}
.ai-fill--nexo .ai-fill__tabs {
  overflow-x: auto;
  scrollbar-width: none;
}
.ai-fill--nexo .ai-fill__tabs::-webkit-scrollbar {
  display: none;
}
.ai-fill--nexo .ai-fill__tab {
  white-space: nowrap;
}
.ai-fill--nexo .ai-fill__samples {
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════
   Organização — Biblioteca compacta de modelos (acelerador)
   ═══════════════════════════════════════════════════════════════════════ */
.org-templates {}

.org-templates-strip {
  background: var(--surface-base, #fff);
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.org-templates-strip__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.org-templates-strip__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: none;
  padding: 0.1rem 0;
  cursor: pointer;
  color: var(--text-primary, #1e293b);
  font-size: 0.9rem;
}
.org-templates-strip__toggle:hover {
  color: var(--brand-primary, #00bf9a);
}
.org-templates-strip__title {
  font-weight: 700;
  font-size: 0.92rem;
}
.org-templates-strip__count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: #f1f5f9;
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
}
.org-templates-strip__chev {
  color: var(--text-secondary, #64748b);
}
.org-templates-strip__tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 220px;
  justify-content: flex-end;
}
.org-templates-strip__search {
  min-width: 160px;
  max-width: 240px;
  height: 34px;
  font-size: 0.82rem;
}
.org-templates-strip__filter {
  height: 34px;
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  max-width: 170px;
}
.org-templates-strip__body {}
.org-templates-strip__empty {
  margin: 0.25rem 0 0.4rem;
  font-size: 0.82rem;
}
.org-templates-strip__list {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0 0.25rem;
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.org-templates-strip__list::-webkit-scrollbar {
  height: 8px;
}
.org-templates-strip__list::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}

.org-templates-chip {
  flex: 0 0 230px;
  scroll-snap-align: start;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: #fafcff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.org-templates-chip:hover {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 4px 14px -8px rgba(15, 23, 42, 0.2);
}
.org-templates-chip__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.org-templates-chip__icon {
  color: var(--brand-primary, #00bf9a);
}
.org-templates-chip__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.org-templates-chip__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 0.68rem;
}
.org-templates-chip__tag {
  background: #ede9fe;
  color: #6d28d9;
  padding: 0.08rem 0.45rem;
  border-radius: 99px;
  font-weight: 600;
  text-transform: capitalize;
}
.org-templates-chip__stat {
  color: var(--text-secondary, #64748b);
  background: #f1f5f9;
  padding: 0.08rem 0.45rem;
  border-radius: 99px;
}
.org-templates-chip__actions {
  display: flex;
  gap: 0.25rem;
  margin-top: auto;
  align-items: center;
  flex-wrap: wrap;
}
.org-templates-chip__actions .app-btn {
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
}

/* Editor estruturado (sem JSON) */
.org-template-form__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.6rem 0.75rem;
}
.org-template-form__grid > label:nth-child(3),
.org-template-form__grid > label:nth-child(4) {
  /* slug + versão compartilham a 2ª linha */
}
@media (max-width: 640px) {
  .org-template-form__grid {
    grid-template-columns: 1fr;
  }
}

.org-template-form__block {
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 10px;
  padding: 0.75rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.org-template-form__block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.org-template-form__block-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}
.org-template-form__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.org-template-form__area {
  background: #fff;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.org-template-form__area-head {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.org-template-form__area-head .app-input {
  flex: 1;
}
.org-template-form__functions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-left: 0.6rem;
  border-left: 2px solid #e2e8f0;
}
.org-template-form__fn {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}
.org-template-form__fn .app-input {
  flex: 1;
}
.org-template-form__add-fn {
  align-self: flex-start;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}
.org-template-form__mp {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 0.4rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
}
@media (max-width: 640px) {
  .org-template-form__mp {
    grid-template-columns: 1fr;
  }
}
.app-input--sm {
  height: 32px;
  font-size: 0.82rem;
  padding: 0.25rem 0.5rem;
}

/* ── Time tracking (header bar + page) ───────────────────────────────────── */
.app-text-success {
  color: #15803d;
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.app-text-danger {
  color: #b91c1c;
  font-size: 0.875rem;
  margin: 0.25rem 0;
}

.app-kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  vertical-align: baseline;
}

.app-time-bar {
  position: relative;
  flex-shrink: 0;
  z-index: 50;
}

.app-time-bar-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: var(--liberty-radius-sm, 8px);
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
}

/* Timer control lives in the navy header — match other header tools */
.app-top-header .app-time-bar-trigger {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.45rem;
  border-radius: 9999px;
  border: 1px solid rgb(255 255 255 / 0.1);
  background: rgb(255 255 255 / 0.08);
  color: rgb(241 245 249);
}

.app-top-header .app-time-bar-elapsed {
  color: inherit;
  font-size: 0.72rem;
}

@media (max-width: 767px) {
  .app-top-header .app-time-bar-elapsed {
    display: none;
  }

  .app-top-header .app-time-bar-trigger {
    position: relative;
    min-width: 1.875rem;
    width: 1.875rem;
    height: 1.875rem;
    padding: 0;
  }

  .app-top-header .app-time-bar-trigger--on::after {
    content: "";
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 9999px;
    background: #60a5fa;
    border: 1.5px solid var(--brand-dark);
  }
}

.app-time-bar-trigger:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.app-time-bar-trigger--on {
  border-color: rgb(37 99 235 / 0.45);
  background: rgb(239 246 255 / 0.9);
  color: #1e40af;
}

.app-top-header .app-time-bar-trigger:hover {
  background: rgb(255 255 255 / 0.14);
  border-color: rgb(255 255 255 / 0.18);
  color: #fff;
}

.app-top-header .app-time-bar-trigger--on {
  border-color: rgb(96 165 250 / 0.55);
  background: rgb(37 99 235 / 0.38);
  color: #fff;
}

.app-time-bar-trigger .material-icons {
  font-size: 1.25rem;
}

.app-time-bar-elapsed {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  font-weight: 600;
}

.app-time-bar-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(22rem, calc(100vw - 2rem));
  padding: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgb(15 23 42 / 0.12);
}

.app-time-bar-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.app-time-bar-popover-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.app-time-bar-popover-link {
  font-size: 0.82rem;
  color: #2563eb;
  text-decoration: none;
}

.app-time-bar-popover-link:hover {
  text-decoration: underline;
}

.app-time-bar-msg {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
}

.app-time-bar-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.app-time-bar-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #475569;
}

.app-time-bar-textarea {
  resize: vertical;
  min-height: 2.5rem;
}

.app-time-bar-hint {
  margin: 0;
  font-size: 0.75rem;
}

.app-time-bar-actions {
  display: flex;
  justify-content: flex-end;
}

.app-time-bar-desc-preview {
  margin: 0;
  font-size: 0.85rem;
  max-height: 6rem;
  overflow: auto;
  white-space: pre-wrap;
}

.app-time-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.app-time-page-intro {
  padding: 1rem 1.25rem;
}

.app-time-page-h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.app-time-page-h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.app-time-page-h3-icon {
  font-size: 1.25rem;
  color: #64748b;
}

.app-time-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.app-time-page-timer {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

.app-time-page-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 520px) {
  .app-time-page-two-col {
    grid-template-columns: 1fr;
  }
}

.app-time-page-history .app-table {
  font-size: 0.85rem;
}

.app-time-page-desc-cell {
  max-width: 28rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════
   Time Tracking Page — full redesign (tt-* namespace)
   ═══════════════════════════════════════════════════════════ */

.tt-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: none;
  position: relative;
}

/* ── Toast ───────────────────────────────────────────────── */
.tt-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  background: #22c55e;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  animation: tt-slide-in 0.25s ease;
}
.tt-toast .material-icons {
  font-size: 1.1rem;
}
@keyframes tt-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Pulse dot ───────────────────────────────────────────── */
.tt-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: tt-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes tt-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.75);
  }
}

/* ── Hero card ───────────────────────────────────────────── */
.tt-hero {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.tt-hero--running {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12), 0 4px 20px rgba(0, 0, 0, 0.07);
}
.tt-hero-inner {
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Running header row */
.tt-hero-running-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Idle header */
.tt-hero-idle-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.tt-hero-idle-icon {
  font-size: 2rem;
  color: var(--primary-color, #3b82f6);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.tt-hero-idle-title {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}
.tt-hero-idle-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.5;
}

/* Big clock */
.tt-hero-clock {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #22c55e;
  line-height: 1;
  font-family: "Courier New", Courier, monospace;
}

/* Description shown while running */
.tt-hero-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary, #64748b);
  font-style: italic;
}

/* Stop row: textarea + button side-by-side */
.tt-hero-stop-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.tt-stop-input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  font-size: 0.875rem;
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-color, #fff);
  color: var(--text-primary, #1e293b);
  resize: vertical;
  min-height: 2.5rem;
  outline: none;
  transition: border-color 0.15s;
  line-height: 1.5;
}
.tt-stop-input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
.tt-stop-input--err {
  border-color: #ef4444;
}

/* Start row */
.tt-start-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.tt-start-input {
  flex: 1;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  background: var(--surface-color, #fff);
  color: var(--text-primary, #1e293b);
  outline: none;
  transition: border-color 0.15s;
}
.tt-start-input:focus {
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.tt-start-input--err {
  border-color: #ef4444;
}
.tt-hero-shortcut {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary, #94a3b8);
}

/* ── Shared button ───────────────────────────────────────── */
.tt-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.tt-btn:active:not(:disabled) {
  transform: scale(0.97);
}
.tt-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.tt-btn .material-icons {
  font-size: 1.1rem;
}
.tt-btn--start {
  background: var(--primary-color, #3b82f6);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}
.tt-btn--start:hover:not(:disabled) {
  background: var(--primary-hover, #2563eb);
}
.tt-btn--stop {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.tt-btn--stop:hover:not(:disabled) {
  background: #dc2626;
}
.tt-btn--secondary {
  background: var(--surface-secondary, #f1f5f9);
  color: var(--text-primary, #1e293b);
  border: 1px solid var(--border-color, #e2e8f0);
}
.tt-btn--secondary:hover:not(:disabled) {
  background: var(--border-color, #e2e8f0);
}

/* ── Pill / badges ───────────────────────────────────────── */
.tt-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
}

.tt-kbd {
  font-size: 0.72rem;
  font-family: monospace;
  background: var(--surface-secondary, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  color: var(--text-secondary, #64748b);
}

/* ── Stats bar ───────────────────────────────────────────── */
.tt-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.tt-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tt-stat-icon {
  font-size: 1.2rem;
  color: var(--primary-color, #3b82f6);
}
.tt-stat-value {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #1e293b);
  display: block;
  line-height: 1.1;
}
.tt-stat-label {
  font-size: 0.72rem;
  color: var(--text-secondary, #94a3b8);
  display: block;
}
.tt-stat-sep {
  width: 1px;
  height: 2rem;
  background: var(--border-color, #e2e8f0);
  flex-shrink: 0;
}
.tt-stat-gap {
  flex: 1;
}
.tt-manual-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: transparent;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.tt-manual-toggle:hover {
  background: var(--surface-secondary, #f1f5f9);
  color: var(--text-primary, #1e293b);
}
.tt-manual-toggle--open {
  background: var(--primary-color, #3b82f6);
  color: #fff;
  border-color: var(--primary-color, #3b82f6);
}
.tt-manual-toggle .material-icons {
  font-size: 0.95rem;
}

/* ── Manual entry ─────────────────────────────────────────  */
.tt-manual {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-top-color: var(--primary-color, #3b82f6);
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  animation: tt-slide-in 0.2s ease;
}
.tt-manual-form {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.tt-manual-times {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.tt-manual-arrow {
  color: var(--text-secondary, #94a3b8);
  font-size: 1.1rem;
  padding-bottom: 0.6rem;
}
.tt-manual-dur {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-color, #3b82f6);
  background: rgba(59, 130, 246, 0.08);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  align-self: flex-end;
  margin-bottom: 0.1rem;
}
.tt-manual-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
}

/* ── Shared form fields ──────────────────────────────────── */
.tt-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 0;
}
.tt-field-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  letter-spacing: 0.02em;
}
.tt-input {
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-color, #fff);
  color: var(--text-primary, #1e293b);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}
.tt-input:focus {
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.tt-input--textarea {
  resize: vertical;
  min-height: 3.5rem;
  line-height: 1.5;
}

/* ── Error message ───────────────────────────────────────── */
.tt-err {
  margin: 0;
  font-size: 0.8rem;
  color: #ef4444;
}

/* ── History ─────────────────────────────────────────────── */
.tt-history {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.tt-history-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.tt-history-head .material-icons {
  font-size: 1.1rem;
  color: var(--text-secondary, #64748b);
}
.tt-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 1.5rem;
  color: var(--text-secondary, #94a3b8);
  text-align: center;
}
.tt-history-empty .material-icons {
  font-size: 2.5rem;
}
.tt-history-empty p {
  margin: 0;
  font-size: 0.875rem;
}

.tt-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: var(--surface-secondary, #f8fafc);
  border-top: 1px solid var(--border-color, #e2e8f0);
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
}
.tt-pagination-range strong {
  color: var(--text-primary, #1e293b);
  font-weight: 600;
}
.tt-pagination-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tt-pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-color, #fff);
  color: var(--text-primary, #334155);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tt-pagination-btn:hover:not(:disabled) {
  border-color: var(--primary-color, #3b82f6);
  color: var(--primary-color, #3b82f6);
}
.tt-pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.tt-pagination-btn .material-icons {
  font-size: 1.1rem !important;
}
.tt-pagination-page {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  padding: 0 0.35rem;
  min-width: 4.5rem;
  text-align: center;
}

@media (max-width: 520px) {
  .tt-pagination {
    flex-direction: column;
    align-items: stretch;
  }
  .tt-pagination-btns {
    justify-content: center;
  }
}

/* ── Day groups ──────────────────────────────────────────── */
.tt-groups {
  display: flex;
  flex-direction: column;
}
.tt-group {
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.tt-group:last-child {
  border-bottom: none;
}
.tt-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem 0.5rem;
  background: var(--surface-secondary, #f8fafc);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.tt-group-day {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary, #64748b);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.tt-group-total {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-color, #3b82f6);
  background: rgba(59, 130, 246, 0.08);
  border-radius: 6px;
  padding: 0.15rem 0.55rem;
}
.tt-group-body {
  display: flex;
  flex-direction: column;
}

/* ── Session row ─────────────────────────────────────────── */
.tt-row {
  display: grid;
  grid-template-columns: 4rem 5rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid var(--border-color, #f1f5f9);
  transition: background 0.12s;
}
.tt-row:last-child {
  border-bottom: none;
}
.tt-row:hover {
  background: var(--surface-secondary, #f8fafc);
}
.tt-row--active {
  background: rgba(34, 197, 94, 0.04);
  grid-template-columns: 6rem 1fr auto;
}
.tt-row--active:hover {
  background: rgba(34, 197, 94, 0.07);
}
.tt-row-time {
  font-size: 0.78rem;
  color: var(--text-secondary, #94a3b8);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tt-row-dur {
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #1e293b);
  white-space: nowrap;
}
.tt-row-dur--live {
  color: #22c55e;
  font-size: 0.95rem;
  font-family: "Courier New", Courier, monospace;
}
.tt-row-desc {
  font-size: 0.855rem;
  color: var(--text-primary, #1e293b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Source badges ───────────────────────────────────────── */
.tt-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  white-space: nowrap;
}
.tt-badge--timer {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color, #3b82f6);
}
.tt-badge--manual {
  background: rgba(168, 85, 247, 0.1);
  color: #9333ea;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .tt-hero-inner {
    padding: 1.25rem 1rem;
  }
  .tt-hero-stop-row,
  .tt-start-row {
    flex-direction: column;
    align-items: stretch;
  }
  .tt-btn--stop,
  .tt-btn--start {
    width: 100%;
    justify-content: center;
  }
  .tt-stats {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .tt-stat-gap {
    display: none;
  }
  .tt-manual-times {
    flex-direction: column;
    align-items: stretch;
  }
  .tt-manual-arrow {
    display: none;
  }
  .tt-row {
    grid-template-columns: 3.5rem 4.5rem 1fr;
    gap: 0.5rem;
  }
  .tt-badge {
    display: none;
  }
}

/* ============================================================
   MOBILE SAFETY NET — data tables without a card transform
   Any plain .app-table (the card-transformed .uc-entity-table is
   excluded) becomes horizontally scrollable on small screens so a
   wide table scrolls inside its own box instead of forcing the whole
   page wider. Columns stay aligned via the anonymous-table box.
   ============================================================ */
@media (max-width: 720px) {
  .app-table:not(.uc-entity-table) {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* --- Action attachments (plan + execution) --- */
.acoes-attach {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 0.85rem 0.95rem 0.95rem;
  margin: 0.35rem 0 0.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.acoes-attach--compact {
  padding: 0.65rem 0.75rem 0.75rem;
}

.acoes-attach-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f766e;
}

.acoes-attach-legend-hint {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #64748b;
  font-size: 0.72rem;
}

.acoes-attach-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.acoes-attach-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: #0369a1;
}

/* --- Activity timeline (action modal) --- */
.acoes-timeline {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.acoes-timeline__day {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.acoes-timeline__day::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color, #e2e8f0);
}

.acoes-timeline__day-label {
  flex-shrink: 0;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.acoes-timeline__list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* vertical connector behind the nodes */
.acoes-timeline__list::before {
  content: "";
  position: absolute;
  top: 0.85rem;
  bottom: 0.85rem;
  left: 0.9375rem;
  width: 2px;
  border-radius: 1px;
  background: var(--border-color, #e2e8f0);
}

.acoes-timeline__item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.acoes-timeline__node {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  background: #64748b;
  color: #fff;
  box-shadow: 0 0 0 3px #fff, 0 1px 3px rgb(15 23 42 / 0.18);
}

.acoes-timeline__node .material-icons {
  font-size: 1rem;
}

.acoes-timeline__node--created {
  background: #10b981;
}

.acoes-timeline__node--status {
  background: #3b82f6;
}

.acoes-timeline__node--priority {
  background: #f59e0b;
}

.acoes-timeline__node--assignee {
  background: #8b5cf6;
}

.acoes-timeline__node--date {
  background: #06b6d4;
}

.acoes-timeline__node--edit {
  background: #64748b;
}

.acoes-timeline__card {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.75rem 0.6rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.acoes-timeline__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.acoes-timeline__avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.acoes-timeline__text {
  flex: 1;
  min-width: 0;
  font-size: 0.8438rem;
  line-height: 1.4;
  color: var(--text-primary, #1e293b);
}

.acoes-timeline__when {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
}

.acoes-timeline__diff {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
  padding-left: 2rem;
}

.acoes-timeline__arrow {
  font-size: 0.85rem;
  color: #94a3b8;
}

.acoes-timeline__chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.acoes-timeline__chip--old {
  background: #f1f5f9;
  color: #64748b;
  text-decoration: line-through;
  text-decoration-color: rgb(100 116 139 / 0.5);
}

.acoes-timeline__chip--new {
  background: #ecfdf5;
  color: #047857;
}

.acoes-timeline__chip--status {
  background: #eff6ff;
  color: #1d4ed8;
}

.acoes-timeline__chip--priority {
  background: #fffbeb;
  color: #b45309;
}

.acoes-timeline__chip--assignee {
  background: #f5f3ff;
  color: #6d28d9;
}

.acoes-timeline__chip--date {
  background: #ecfeff;
  color: #0e7490;
}

@media (max-width: 640px) {
  .acoes-timeline__when {
    display: none;
  }

  .acoes-timeline__diff {
    padding-left: 0;
  }
}

.acoes-attach-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1.1rem 0.85rem;
  border: 1.5px dashed #94a3b8;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.acoes-attach-drop:hover,
.acoes-attach-drop--over {
  border-color: #0f766e;
  background: #ecfdf5;
  box-shadow: 0 0 0 3px #0f766e14;
}

.acoes-attach-drop--busy {
  opacity: 0.75;
  pointer-events: none;
}

.acoes-attach-drop--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.acoes-attach-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.acoes-attach-drop-icon {
  font-size: 1.75rem !important;
  color: #0f766e;
}

.acoes-attach-drop-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  text-align: center;
}

.acoes-attach-drop-meta {
  margin: 0;
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
}

.acoes-attach-loading {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.acoes-attach-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.acoes-attach-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.acoes-attach-item-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0f766e;
  font-size: 1.1rem !important;
}

.acoes-attach-item-body {
  min-width: 0;
}

.acoes-attach-item-name {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acoes-attach-item-meta {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}

.acoes-attach-item-label {
  display: inline-block;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
}

.acoes-attach-item-label--ticket {
  background: rgba(14, 116, 144, 0.12);
  color: #0e7490;
}

.acoes-attach-pending-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.acoes-attach-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.acoes-attach-item-open,
.acoes-attach-item-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.acoes-attach-item-open:hover {
  background: #ecfdf5;
  color: #0f766e;
}

.acoes-attach-item-del:hover {
  background: #fef2f2;
  color: #dc2626;
}

.acoes-attach-error {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: #b91c1c;
}

.acoes-kb-attach {
  position: relative;
  margin: 0.35rem 0 0.15rem;
}

.acoes-kb-attach-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.acoes-kb-attach-toggle:hover,
.acoes-kb-attach--open .acoes-kb-attach-toggle {
  border-color: #0f766e;
  background: #ecfdf5;
}

.acoes-kb-attach-count {
  min-width: 1rem;
  text-align: center;
}

.acoes-kb-attach-chevron {
  font-size: 1rem !important;
  color: #64748b;
}

.acoes-kb-attach-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 20;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 30px #0f172a1a;
  overflow: hidden;
}

.acoes-kb-attach-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.acoes-kb-attach-panel-edit {
  border: none;
  background: transparent;
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.acoes-kb-attach-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  max-height: 11rem;
  overflow: auto;
}

.acoes-kb-attach-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.acoes-kb-attach-link:hover {
  background: #f8fafc;
}

.acoes-kb-attach-link .material-icons:first-child {
  font-size: 1.1rem !important;
  color: #0f766e;
}

.acoes-kb-attach-link-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.acoes-kb-attach-link-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acoes-kb-attach-link-meta {
  font-size: 0.68rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
}

.acoes-kb-attach-link-label {
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
}

.acoes-kb-attach-link-label--ticket {
  background: rgba(14, 116, 144, 0.12);
  color: #0e7490;
}

.acoes-kb-attach-link-go {
  font-size: 0.95rem !important;
  color: #94a3b8;
}

.tt-modal-attach {
  margin: 0 1rem 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.tt-modal-attach-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.tt-modal-attach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tt-modal-attach-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.35rem 0.4rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.tt-modal-attach-link:hover {
  background: #ecfdf5;
}

.tt-modal-attach-link .material-icons:first-child {
  font-size: 1rem !important;
  color: #0f766e;
}

.tt-modal-attach-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tt-modal-attach-go {
  font-size: 0.9rem !important;
  color: #94a3b8;
}

.tt-modal-attach-more {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}

.tt-modal-attach--project {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.tt-modal-attach--project .tt-modal-attach-label a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

.tt-modal-proj-desc {
  margin: 0 0 0.45rem;
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Project attachments (upload on project) --- */
.proj-attach {
  border: 1px dashed #93c5fd;
  border-radius: 12px;
  padding: 0.85rem 0.95rem 0.95rem;
  margin: 0.35rem 0 0.5rem;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.proj-attach-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1d4ed8;
}

.proj-attach-legend-hint {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #64748b;
  font-size: 0.72rem;
}

.proj-attach-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.proj-attach-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: #0369a1;
}

.proj-attach-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1.1rem 0.85rem;
  border: 1.5px dashed #93c5fd;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.proj-attach-drop:hover,
.proj-attach-drop--over {
  border-color: #1d4ed8;
  background: #eff6ff;
  box-shadow: 0 0 0 3px #1d4ed814;
}

.proj-attach-drop--busy {
  opacity: 0.75;
  pointer-events: none;
}
.proj-attach-drop--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.proj-attach-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.proj-attach-drop-icon {
  font-size: 1.75rem !important;
  color: #1d4ed8;
}

.proj-attach-drop-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  text-align: center;
}

.proj-attach-drop-meta {
  margin: 0;
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
}

.proj-attach-loading {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.proj-attach-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.proj-attach-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
}

.proj-attach-item-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 1.1rem !important;
}

.proj-attach-item-body {
  min-width: 0;
}

.proj-attach-item-name {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-attach-item-meta {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}

.proj-attach-pending-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.proj-attach-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.proj-attach-item-open,
.proj-attach-item-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.proj-attach-item-open:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.proj-attach-item-del:hover {
  background: #fef2f2;
  color: #dc2626;
}

.proj-attach-error {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: #b91c1c;
}

/* --- Project docs preview on action tasks --- */
.proj-docs-panel {
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  margin: 0.5rem 0;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 55%, #ffffff 100%);
  box-shadow: 0 1px 0 #dbeafe inset;
}

.proj-docs-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.proj-docs-panel-head-main {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

.proj-docs-panel-icon {
  font-size: 1.5rem !important;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 10px;
  padding: 0.35rem;
}

.proj-docs-panel-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.proj-docs-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0.1rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e3a8a;
  text-decoration: none;
}

.proj-docs-panel-title:hover {
  color: #1d4ed8;
}

.proj-docs-panel-client {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: #64748b;
}

.proj-docs-panel-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.proj-docs-panel-desc {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.5;
}

.proj-docs-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.45rem;
}

.proj-docs-panel-empty {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  font-style: italic;
}

.proj-docs-file {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.proj-docs-file:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 14px #1d4ed812;
}

.proj-docs-file--compact {
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
}

.proj-docs-file-icon {
  font-size: 1.25rem !important;
  color: #1d4ed8;
}

.proj-docs-file-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.proj-docs-file-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-docs-file-meta {
  font-size: 0.68rem;
  color: #64748b;
}

.proj-docs-file-go {
  font-size: 0.95rem !important;
  color: #94a3b8;
}

.proj-docs-thumb {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.proj-docs-thumb--loading {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
}

.proj-docs-card {
  position: relative;
  margin: 0.35rem 0 0.15rem;
}

.proj-docs-card-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.2rem 0.45rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.proj-docs-card-toggle:hover,
.proj-docs-card--open .proj-docs-card-toggle {
  border-color: #1d4ed8;
  background: #dbeafe;
}

.proj-docs-card-label {
  opacity: 0.85;
}

.proj-docs-card-name {
  max-width: 8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-docs-card-count {
  min-width: 1rem;
  text-align: center;
}

.proj-docs-card-chevron {
  font-size: 1rem !important;
  color: #64748b;
}

.proj-docs-card-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 20;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 30px #1e3a8a1a;
  overflow: hidden;
  padding: 0.45rem;
}

.proj-docs-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1d4ed8;
  text-decoration: none;
  margin-bottom: 0.35rem;
}

.proj-docs-card-desc {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.proj-docs-card-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 11rem;
  overflow: auto;
}

/* Personal work dashboard (`/painel` for externo and module-focused users) */
.personal-painel-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.personal-painel-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--liberty-text-muted, #64748b);
}

.personal-painel-role-badge {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: #f8fafc;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #475569;
}

.personal-painel-stats {
  margin-top: 0.25rem;
}

.personal-painel-stat--late {
  border-color: rgb(239 68 68 / 0.35);
}

.personal-painel-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.personal-painel-section {
  padding: 1rem 1.125rem;
}

.personal-painel-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.personal-painel-section-head h2 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.personal-painel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.personal-painel-item-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.personal-painel-item-link:hover {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.05);
}

.personal-painel-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--liberty-text, #0f172a);
}

.personal-painel-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.75rem;
  color: var(--liberty-text-muted, #64748b);
}

.personal-painel-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: #f1f5f9;
  font-weight: 600;
  color: var(--chip-color, #475569);
}

.personal-painel-due {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.personal-painel-due .material-icons {
  font-size: 0.9rem !important;
}

.personal-painel-due--late {
  color: var(--error-color, #ef4444);
  font-weight: 600;
}

.personal-painel-empty {
  margin: 0;
  padding: 0.5rem 0;
}

/* ═══════════════════════════════════════════════════════════
   Time tracking reports (ttr-*)
   ═══════════════════════════════════════════════════════════ */

.ttr-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
}

.ttr-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 1.35rem 1.5rem;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(0, 191, 154, 0.1) 0%,
    rgba(59, 130, 246, 0.06) 55%,
    rgba(255, 255, 255, 0.9) 100%
  );
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: var(--liberty-shadow, 0 1px 3px rgba(15, 23, 42, 0.06));
}

.ttr-hero-main {
  flex: 1 1 16rem;
  min-width: 0;
}

.ttr-hero-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-primary, #00bf9a);
  margin-bottom: 0.35rem;
}

.ttr-hero-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  line-height: 1.25;
}

.ttr-hero-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary, #64748b);
}

.ttr-hero-stat {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.ttr-hero-stat-value {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--brand-primary, #00bf9a);
  line-height: 1;
}

.ttr-hero-stat-unit {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  margin-top: 0.15rem;
}

.ttr-hero-stat-meta {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 0.35rem;
}

.ttr-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1.25rem 1.35rem;
}

@media (min-width: 900px) {
  .ttr-controls {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
    align-items: start;
  }
}

.ttr-controls-block {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.ttr-controls-block--actions {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
}

.ttr-export {
  position: relative;
}

.ttr-export-trigger {
  gap: 0.25rem;
}

.ttr-export-chevron {
  font-size: 1.125rem !important;
  margin-left: 0.1rem;
  transition: transform 0.15s ease;
}

.ttr-export--open .ttr-export-chevron {
  transform: rotate(180deg);
}

.ttr-export-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 30;
  min-width: 11.5rem;
  padding: 0.35rem;
  border-radius: var(--liberty-radius, 8px);
  border: 1px solid var(--border-color, #e2e8f0);
  background: var(--surface-color, #fff);
  box-shadow: var(--liberty-shadow-md);
}

.ttr-export-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: var(--liberty-radius-sm, 6px);
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  color: var(--text-primary, #1e293b);
  text-align: left;
}

.ttr-export-option:hover {
  background: rgba(0, 191, 154, 0.08);
  color: #047857;
}

.ttr-export-option .material-icons {
  font-size: 1.125rem;
  color: var(--text-secondary, #64748b);
}

@media (min-width: 900px) {
  .ttr-controls-block--actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
  }

  .ttr-controls-block--actions .app-btn {
    width: 100%;
    justify-content: center;
  }

  .ttr-export {
    width: 100%;
  }

  .ttr-export-trigger {
    width: 100%;
    justify-content: center;
  }
}

.ttr-controls-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary, #64748b);
}

.ttr-controls-block--filters {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

@media (min-width: 900px) {
  .ttr-controls-block--filters {
    padding-top: 0;
    border-top: none;
    padding-left: 1.25rem;
    border-left: 1px solid var(--border-color, #e2e8f0);
  }
}

.ttr-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ttr-preset {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: var(--surface-color, #fff);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary, #64748b);
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s,
    box-shadow 0.15s;
}

.ttr-preset:hover {
  border-color: rgba(0, 191, 154, 0.35);
  background: rgba(0, 191, 154, 0.04);
  color: var(--text-primary, #0f172a);
}

.ttr-preset--active {
  border-color: var(--brand-primary, #00bf9a);
  background: rgba(0, 191, 154, 0.12);
  color: #047857;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(0, 191, 154, 0.15);
}

.ttr-custom-range,
.ttr-filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .ttr-custom-range,
  .ttr-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ttr-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  min-width: 0;
}

.ttr-field .app-input {
  width: 100%;
  min-width: 0;
}

.ttr-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  margin-top: 0.15rem;
}

.ttr-toggle input {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--brand-primary, #00bf9a);
}

.ttr-tabs-scroll {
  margin: 0 -0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.ttr-tabs {
  margin: 0 0 0.25rem;
  padding: 0 0.25rem;
  min-width: min-content;
  border-bottom: 2px solid var(--border-color, #e2e8f0);
}

.ttr-tab {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  flex-shrink: 0;
}

.ttr-tab-icon {
  font-size: 1.05rem !important;
}

.ttr-tab-label {
  white-space: nowrap;
}

.ttr-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.ttr-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0;
  padding: 2.5rem 1rem;
  color: var(--text-secondary, #64748b);
  font-size: 0.9rem;
}

.ttr-loading-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #e2e8f0;
  border-top-color: var(--brand-primary, #00bf9a);
  border-radius: 50%;
  animation: ttr-spin 0.7s linear infinite;
}

@keyframes ttr-spin {
  to {
    transform: rotate(360deg);
  }
}

.ttr-empty {
  margin: 0;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-secondary, #64748b);
  font-size: 0.9rem;
  background: var(--surface-muted, #f8fafc);
  border-radius: 10px;
  border: 1px dashed var(--border-color, #e2e8f0);
}

.ttr-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.85rem;
}

.ttr-kpi {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem;
  border-left: 4px solid var(--border-color, #e2e8f0);
  transition: box-shadow 0.15s, transform 0.15s;
}

.ttr-kpi:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.ttr-kpi--hours {
  border-left-color: var(--brand-primary, #00bf9a);
}
.ttr-kpi--people {
  border-left-color: #3b82f6;
}
.ttr-kpi--projects {
  border-left-color: #8b5cf6;
}
.ttr-kpi--warn {
  border-left-color: #f59e0b;
}
.ttr-kpi--plan {
  border-left-color: #10b981;
}

.ttr-kpi-icon {
  font-size: 1.65rem;
  opacity: 0.9;
  flex-shrink: 0;
}

.ttr-kpi--hours .ttr-kpi-icon {
  color: var(--brand-primary, #00bf9a);
}
.ttr-kpi--people .ttr-kpi-icon {
  color: #3b82f6;
}
.ttr-kpi--projects .ttr-kpi-icon {
  color: #8b5cf6;
}
.ttr-kpi--warn .ttr-kpi-icon {
  color: #f59e0b;
}
.ttr-kpi--plan .ttr-kpi-icon {
  color: #10b981;
}

.ttr-kpi-body {
  min-width: 0;
}

.ttr-kpi-value {
  display: block;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #0f172a);
  line-height: 1.2;
}

.ttr-kpi-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-secondary, #64748b);
}

.ttr-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@container ttr-resumo (min-width: 52rem) {
  .ttr-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ttr-panel {
  padding: 1.15rem 1.25rem;
  min-width: 0;
  overflow-x: auto;
}

.ttr-split .ttr-table {
  min-width: 0;
}

.ttr-panel-head {
  margin-bottom: 0.85rem;
}

.ttr-panel-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

.ttr-panel-lead {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-secondary, #64748b);
}

.ttr-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

.ttr-table {
  width: 100%;
  min-width: 36rem;
  font-size: 0.85rem;
}

.ttr-table .ttr-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ttr-total-row td {
  border-top: 2px solid var(--border-color, #e2e8f0);
  padding-top: 0.75rem;
  background: var(--surface-muted, #f8fafc);
}

.ttr-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary, #64748b);
  background: rgba(0, 191, 154, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(0, 191, 154, 0.18);
}

.ttr-hint .material-icons {
  font-size: 1.15rem;
  color: var(--brand-primary, #00bf9a);
  flex-shrink: 0;
}

.ttr-projeto-picker {
  margin-bottom: 0.15rem;
}

.ttr-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--surface-muted, #f1f5f9);
  color: var(--text-secondary, #475569);
}

.ttr-badge--main {
  background: rgba(0, 191, 154, 0.12);
  color: #047857;
}

.ttr-subtask-indent {
  margin-right: 0.25rem;
  color: var(--text-muted, #94a3b8);
}

.ttr-nowrap {
  white-space: nowrap;
}

.ttr-time-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 400;
  margin-top: 0.1rem;
}

.ttr-desc {
  max-width: 22rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.ttr-table--entries td {
  vertical-align: top;
}

.ttr-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand-primary, #00bf9a);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}

.ttr-link-btn:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ttr-projeto,
.ttr-resumo {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

/* Split on the report card width, not the viewport (sidebar steals ~16rem). */
.ttr-resumo {
  container-type: inline-size;
  container-name: ttr-resumo;
}

.ttr-consultant-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ttr-consultant-card {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-color, #fff);
}

.ttr-consultant-head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "chevron meta"
    "stats stats";
  gap: 0.5rem 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--surface-muted, #f8fafc);
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background 0.15s;
}

@media (min-width: 640px) {
  .ttr-consultant-head {
    grid-template-columns: auto 1fr repeat(3, auto);
    grid-template-areas: "chevron meta stat1 stat2 stat3";
  }
}

.ttr-consultant-head:hover {
  background: var(--surface-hover, #f1f5f9);
}

.ttr-consultant-chevron {
  grid-area: chevron;
  font-size: 1.25rem !important;
  color: var(--text-muted, #64748b);
}

.ttr-consultant-meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.ttr-consultant-stat {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text-secondary, #64748b);
  font-size: 0.8125rem;
  font-weight: 600;
}

@media (max-width: 639px) {
  .ttr-consultant-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
  }

  .ttr-consultant-meta {
    flex: 1 1 calc(100% - 2rem);
  }

  .ttr-consultant-stat {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.75rem;
  }
}

.ttr-table--nested {
  margin: 0;
  min-width: 28rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.ttr-table--nested th,
.ttr-table--nested td {
  padding-left: 1.25rem;
}

/* ── Multi-select consultants + templates ── */
.ttr-multi {
  position: relative;
}

.ttr-multi-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.ttr-multi-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ttr-multi-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  min-width: 16rem;
  max-height: 20rem;
  overflow: auto;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: var(--surface-color, #fff);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.ttr-multi-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.ttr-multi-mode,
.ttr-multi-clear {
  border: 1px solid var(--border-color, #e2e8f0);
  background: var(--surface-muted, #f8fafc);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary, #475569);
}

.ttr-multi-mode--active {
  background: rgba(0, 191, 154, 0.14);
  border-color: rgba(0, 191, 154, 0.45);
  color: #047857;
}

.ttr-multi-hint {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
}

.ttr-multi-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ttr-multi-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
}

.ttr-multi-item:hover {
  background: var(--surface-muted, #f8fafc);
}

.ttr-multi-tag {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
}

.ttr-multi-empty {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  padding: 0.5rem;
}

.ttr-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0;
}

.ttr-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.ttr-chip--in {
  background: rgba(0, 191, 154, 0.12);
  color: #047857;
}

.ttr-chip--out {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.ttr-templates {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  margin-top: 0.75rem;
}

.ttr-templates-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ttr-templates-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
}

.ttr-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.5rem;
}

.ttr-template-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: var(--surface-muted, #f8fafc);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.ttr-template-card .material-icons {
  font-size: 1.25rem;
  color: var(--text-muted, #64748b);
}

.ttr-template-card strong {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

.ttr-template-card:hover {
  border-color: rgba(0, 191, 154, 0.4);
}

.ttr-template-card--active {
  background: rgba(0, 191, 154, 0.1);
  border-color: rgba(0, 191, 154, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 191, 154, 0.2);
}

.ttr-template-card--active .material-icons {
  color: #047857;
}

.ttr-preset-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.ttr-preset-name {
  flex: 1 1 14rem;
  min-width: 0;
}

.ttr-preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
}

.ttr-preset-pill {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  border: 1px solid var(--border-color, #e2e8f0);
  overflow: hidden;
  background: #fff;
}

.ttr-preset-pill-apply,
.ttr-preset-pill-x {
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
}

.ttr-preset-pill-apply:hover {
  background: rgba(0, 191, 154, 0.1);
  color: #047857;
}

.ttr-preset-pill-x {
  border-left: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-muted, #94a3b8);
  padding-inline: 0.45rem;
}

.ttr-invoice {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-color, #e2e8f0);
}

.ttr-invoice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem;
}

.ttr-rpa-block {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ttr-rpa-row {
  display: grid;
  grid-template-columns: 1fr 7rem auto;
  gap: 0.45rem;
  align-items: center;
}

.ttr-invoice-summary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: var(--surface-muted, #f8fafc);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.ttr-matrix-wrap {
  overflow-x: auto;
}

.ttr-matrix {
  min-width: 40rem;
}

.ttr-matrix-day {
  font-size: 0.72rem;
  white-space: nowrap;
}

.ttr-var--over {
  color: #b45309;
  font-weight: 700;
}

.ttr-var--under {
  color: #047857;
  font-weight: 700;
}

@media (max-width: 640px) {
  .ttr-rpa-row {
    grid-template-columns: 1fr;
  }
}

/* ── Drilldown: clickable rows ── */
.ttr-row--drill {
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.ttr-row--drill:hover {
  background: rgba(0, 191, 154, 0.06);
}

.ttr-row--drill:focus-visible {
  outline: 2px solid var(--brand-primary, #00bf9a);
  outline-offset: -2px;
}

.ttr-drill-th {
  width: 2.25rem;
}

.ttr-drill-cta {
  width: 2.25rem;
  text-align: right;
  color: var(--text-muted, #94a3b8);
}

.ttr-drill-cta .material-icons {
  font-size: 1.125rem;
  vertical-align: middle;
  opacity: 0.5;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ttr-row--drill:hover .ttr-drill-cta .material-icons,
.ttr-row--drill:focus-visible .ttr-drill-cta .material-icons {
  opacity: 1;
  transform: translateX(2px);
  color: var(--brand-primary, #00bf9a);
}

/* ── Drilldown: modal body ── */
.app-modal.uc-entity-modal--form[data-testid="time-drilldown-modal"] {
  width: min(100%, 58rem);
  max-height: min(90vh, 46rem);
  overflow: hidden;
  padding: 1.35rem;
  border-color: rgba(0, 191, 154, 0.24);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.ttr-drill {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  overflow: hidden;
}

.ttr-drill-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
}

.ttr-drill-crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.ttr-drill-crumb-sep {
  font-size: 0.95rem;
  color: var(--text-muted, #94a3b8);
}

.ttr-drill-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 0.5rem;
}

.ttr-drill-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: var(--background-color, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
}

.ttr-drill-stat--hero {
  background: linear-gradient(
    135deg,
    rgba(0, 191, 154, 0.12) 0%,
    rgba(59, 130, 246, 0.06) 100%
  );
  border-color: rgba(0, 191, 154, 0.28);
}

.ttr-drill-stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #0f172a);
  line-height: 1.1;
}

.ttr-drill-stat--hero .ttr-drill-stat-value {
  font-size: 1.35rem;
  color: var(--brand-primary, #00bf9a);
}

.ttr-drill-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
}

.ttr-drill-period {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
}

.ttr-drill-period .material-icons {
  font-size: 1rem;
  color: var(--text-muted, #94a3b8);
}

.ttr-drill-tasks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  min-height: 0;
  padding-right: 0.25rem;
}

.ttr-drill-task {
  /* Never shrink: these cards clip their own overflow, so a squeezed card
     would silently hide the entries that prove the total. */
  flex: 0 0 auto;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  background: var(--surface-color, #fff);
  overflow: hidden;
}

.ttr-drill-task-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ttr-drill-task-head:hover {
  background: rgba(0, 191, 154, 0.05);
}

.ttr-drill-task-chevron {
  font-size: 1.25rem;
  color: var(--text-muted, #94a3b8);
}

.ttr-drill-task-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.ttr-drill-task-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
}

.ttr-drill-task-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ttr-drill-task-stat strong {
  font-size: 0.95rem;
  color: var(--brand-primary, #00bf9a);
}

.ttr-drill-task-bar {
  height: 3px;
  background: var(--liberty-surface-warm, #f1f5f9);
}

.ttr-drill-task-bar > span {
  display: block;
  height: 100%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(
    90deg,
    var(--brand-primary, #00bf9a),
    rgba(59, 130, 246, 0.7)
  );
}

.ttr-drill-entries {
  overflow-x: auto;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.ttr-drill-desc {
  max-width: 22rem;
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
}

.ttr-drill-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.ttr-drill-foot-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  max-width: 30rem;
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
}

.ttr-drill-foot-hint .material-icons {
  font-size: 1rem;
  color: var(--brand-primary, #00bf9a);
}

.ttr-drill-foot-actions {
  display: flex;
  gap: 0.4rem;
}

@media (max-width: 640px) {
  /* Too little height to give the task list its own scroller — let the whole
     drilldown body scroll instead. */
  .ttr-drill {
    overflow-y: auto;
  }

  /* Natural height + no shrinking, otherwise the list overflows visibly and
     paints over the footer instead of scrolling. */
  .ttr-drill-tasks {
    flex: 0 0 auto;
    overflow-y: visible;
  }

  .ttr-drill-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .ttr-drill-foot-actions .app-btn {
    flex: 1 1 auto;
  }

  .ttr-hero {
    padding: 1rem 1.1rem;
  }

  .ttr-hero-stat {
    width: 100%;
    align-items: flex-start;
  }

  .ttr-controls {
    padding: 1rem;
  }

  .ttr-controls-block--actions {
    width: 100%;
  }

  .ttr-controls-block--actions .app-btn {
    flex: 1 1 auto;
    min-width: calc(50% - 0.25rem);
  }

  .ttr-panel {
    padding: 1rem;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Ações · Dependências (aba do modal, chips e mapa de dependências)
   ════════════════════════════════════════════════════════════════════════ */

/* Chip "aguardando dependências" no cartão do Kanban e na lista */
.acoes-kb-card-v2__deps {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.acoes-kb-card-v2__deps .material-icons {
  font-size: 0.85rem;
}

.acoes-lista-dep-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  vertical-align: middle;
}

.acoes-lista-dep-chip .material-icons {
  font-size: 0.8rem;
}

/* Toast informativo (variação do toast de erro de escrita) */
.acoes-write-toast--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.acoes-write-toast--info .material-icons {
  color: #2563eb;
}

/* ── Aba "Dependências" do modal ─────────────────────────────────────── */
.acoes-dep-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.acoes-dep-error {
  margin: 0;
  font-size: 0.85rem;
}

.acoes-dep-blocked-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.6rem 0.8rem;
  border-radius: var(--liberty-radius);
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.85rem;
}

.acoes-dep-blocked-banner .material-icons {
  font-size: 1.1rem;
}

.acoes-dep-section {
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--surface-color);
}

.acoes-dep-section__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.acoes-dep-section__title .material-icons {
  font-size: 1rem;
  color: var(--brand-primary);
}

.acoes-dep-section__hint {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.acoes-dep-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.acoes-dep-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius-sm);
  background: var(--background-color);
}

.acoes-dep-item__status {
  display: inline-flex;
}

.acoes-dep-item__status .material-icons {
  font-size: 1.05rem;
}

.acoes-dep-item__title {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acoes-dep-item__title:hover:not(:disabled) {
  color: var(--brand-primary);
  text-decoration: underline;
}

.acoes-dep-item__title:disabled {
  cursor: default;
  color: var(--text-secondary);
  font-style: italic;
}

.acoes-dep-item__chip {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.acoes-dep-item__remove {
  display: inline-flex;
  border: 0;
  background: none;
  padding: 0.15rem;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
}

.acoes-dep-item__remove:hover:not(:disabled) {
  color: var(--error-color);
  background: #fee2e2;
}

.acoes-dep-item__remove .material-icons {
  font-size: 1.05rem;
}

.acoes-dep-empty {
  margin: 0;
  font-size: 0.8rem;
}

.acoes-dep-picker {
  position: relative;
  display: flex;
  align-items: center;
}

.acoes-dep-picker__icon {
  position: absolute;
  left: 0.55rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
  pointer-events: none;
}

.acoes-dep-picker__input {
  padding-left: 2.1rem;
  width: 100%;
}

.acoes-dep-picker__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius);
  box-shadow: var(--liberty-shadow-md);
  max-height: 240px;
  overflow: auto;
}

.acoes-dep-picker__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  background: none;
  padding: 0.45rem 0.5rem;
  border-radius: var(--liberty-radius-sm);
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary);
}

.acoes-dep-picker__option:hover:not(:disabled) {
  background: var(--liberty-nav-active);
}

.acoes-dep-picker__option:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.acoes-dep-picker__option .material-icons {
  font-size: 1rem;
}

.acoes-dep-picker__option-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acoes-dep-picker__option-warn {
  font-size: 0.7rem;
  color: var(--warning-color);
  white-space: nowrap;
}

.acoes-dep-picker__empty {
  padding: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.acoes-dep-hint,
.acoes-dep-map-hint,
.acoes-dep-create-hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.8rem;
}

.acoes-dep-create-hint {
  margin-bottom: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.acoes-dep-create-hint .material-icons {
  font-size: 1rem;
}

.acoes-dep-item__pending {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
}

.acoes-dep-map-hint .material-icons {
  font-size: 1rem;
  color: var(--brand-primary);
}

/* ── Mapa de dependências (canvas com pan/zoom) ──────────────────────── */
.acoes-depmap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.acoes-depmap-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.acoes-depmap-toolbar__primary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  min-width: 0;
}

.acoes-depmap-toolbar__tools {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.acoes-depmap-toolbar__secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  flex-wrap: wrap;
  padding-top: 0.6rem;
  border-top: 1px solid #eef2f7;
}

.acoes-depmap-toolbar__filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  min-width: 0;
}

.acoes-depmap-toolbar__toggles {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  padding: 0.3rem 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  min-height: 2.35rem;
}

.acoes-depmap-toolbar__group {
  display: inline-flex;
  gap: 0.15rem;
  background: #f8fafc;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 0.2rem;
}

.acoes-depmap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  background: none;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 2.35rem;
  min-width: 2.35rem;
}

.acoes-depmap-btn:hover {
  background: var(--liberty-nav-active, rgb(0 191 154 / 0.1));
}

.acoes-depmap-btn .material-icons {
  font-size: 1.15rem;
}

.acoes-depmap-btn--connect {
  border: 1px solid var(--border-color, #e2e8f0);
  background: #fff;
  padding-inline: 0.7rem;
}

.acoes-depmap-btn--active {
  background: var(--brand-primary, #00bf9a);
  border-color: var(--brand-primary, #00bf9a);
  color: #fff;
}

.acoes-depmap-btn--active:hover {
  background: var(--primary-hover, #00a887);
}

.acoes-depmap-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  min-height: 2rem;
}

.acoes-depmap-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--brand-primary, #00bf9a);
}

.acoes-depmap-stats {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}

.acoes-depmap-stats__chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.acoes-depmap-stats__chip strong {
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--brand-dark, #002b49);
}

.acoes-depmap-stats__chip--muted {
  background: #f8fafc;
  color: #94a3b8;
}

.acoes-depmap-stats__chip--muted strong {
  color: #64748b;
}

/* ── Toolbar: search (locate on canvas) ─────────────────────────────────── */

.acoes-depmap-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f8fafc;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 0 0.65rem;
  min-height: 2.35rem;
  min-width: 0;
  flex: 1 1 16rem;
  max-width: 28rem;
}

.acoes-depmap-search:focus-within {
  border-color: var(--brand-primary, #00bf9a);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(0 191 154 / 0.12);
}

.acoes-depmap-search > .material-icons {
  font-size: 1.05rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.acoes-depmap-search input {
  border: 0;
  background: none;
  outline: none;
  font: inherit;
  font-size: 0.84rem;
  color: var(--text-primary);
  width: 100%;
  min-width: 0;
}

.acoes-depmap-search__pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius);
  box-shadow: var(--liberty-shadow-md);
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}

.acoes-depmap-search__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  background: none;
  padding: 0.5rem 0.6rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}

.acoes-depmap-search__row:hover {
  background: var(--liberty-nav-active);
}

.acoes-depmap-search__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.acoes-depmap-search__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acoes-depmap-search__off {
  flex: none;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  background: var(--liberty-surface-warm);
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
}

.acoes-depmap-search__empty {
  margin: 0;
  padding: 0.55rem 0.6rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ── Toolbar: labelled selects (Agrupar / Lente) ────────────────────────── */

.acoes-depmap-field {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 0 0.25rem 0 0.65rem;
  min-height: 2.35rem;
  cursor: pointer;
  min-width: 0;
}

.acoes-depmap-field__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.acoes-depmap-field__select {
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.3rem 0.35rem 0.3rem 0.1rem;
  cursor: pointer;
  outline: none;
  max-width: 10.5rem;
  min-width: 0;
}

/* ── Groups bar (expanded cluster chips) ────────────────────────────────── */

.acoes-depmap-groupsbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.78rem;
  padding: 0.55rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.acoes-depmap-groupsbar__label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.acoes-depmap-groupsbar__label .material-icons {
  font-size: 1rem;
}

.acoes-depmap-groupsbar__hint {
  color: var(--text-secondary);
  font-style: italic;
}

.acoes-depmap-groupchip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--brand-light);
  background: var(--liberty-teal-mist);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acoes-depmap-groupchip:hover {
  background: var(--brand-light);
  color: #fff;
}

.acoes-depmap-groupchip .material-icons {
  font-size: 0.9rem;
}

.acoes-depmap-groupsbar__all {
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-primary);
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  border-radius: var(--liberty-radius-sm);
}

.acoes-depmap-groupsbar__all:hover {
  background: var(--liberty-nav-active);
}

/* ── Focus bar (ego-network mode) ───────────────────────────────────────── */

.acoes-depmap-focusbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: var(--liberty-radius);
  font-size: 0.82rem;
  background: var(--liberty-teal-mist);
  border: 1px solid var(--brand-light);
  color: var(--brand-dark);
}

.acoes-depmap-focusbar > .material-icons {
  font-size: 1.1rem;
}

.acoes-depmap-focusbar__msg {
  flex: 1;
  min-width: 160px;
}

.acoes-depmap-focusbar__msg strong {
  font-weight: 700;
}

.acoes-depmap-focusbar__depth {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  white-space: nowrap;
}

.acoes-depmap-focusbar__depth button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--brand-light);
  border-radius: 6px;
  background: var(--surface-color);
  color: var(--brand-dark);
  cursor: pointer;
}

.acoes-depmap-focusbar__depth button:disabled {
  opacity: 0.4;
  cursor: default;
}

.acoes-depmap-focusbar__depth .material-icons {
  font-size: 1rem;
}

.acoes-depmap-focusbar__exit {
  border: 0;
  background: var(--brand-primary);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
}

.acoes-depmap-focusbar__exit:hover {
  background: var(--primary-hover);
}

/* ── Lens explanation strip ─────────────────────────────────────────────── */

.acoes-depmap-lensbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: var(--liberty-radius);
  font-size: 0.82rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.acoes-depmap-lensbar .material-icons {
  font-size: 1.1rem;
}

.acoes-depmap-connect-hint,
.acoes-depmap-notice,
.acoes-depmap-onboarding {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: var(--liberty-radius);
  font-size: 0.82rem;
}

.acoes-depmap-connect-hint {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0e7490;
}

.acoes-depmap-notice {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.acoes-depmap-notice--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.acoes-depmap-onboarding {
  background: var(--liberty-teal-mist);
  border: 1px dashed var(--brand-light);
  color: var(--brand-dark);
}

.acoes-depmap-connect-hint .material-icons,
.acoes-depmap-notice .material-icons,
.acoes-depmap-onboarding .material-icons {
  font-size: 1.1rem;
}

.acoes-depmap-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius);
  background:
    radial-gradient(circle, rgb(148 163 184 / 0.22) 1px, transparent 1px) 0 0 /
    22px 22px,
    var(--background-color);
  height: clamp(420px, 64vh, 760px);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.acoes-depmap-stage:active {
  cursor: grabbing;
}

.acoes-depmap-stage--connect {
  cursor: crosshair;
  outline: 2px solid var(--brand-light);
  outline-offset: -2px;
}

.acoes-depmap-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  transform-origin: 0 0;
}

.acoes-depmap-edges {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 2px;
  overflow: visible;
  pointer-events: none;
}

.acoes-depmap-edge--dim {
  opacity: 0.18;
}

.acoes-depmap-edge__hit {
  pointer-events: stroke;
  cursor: pointer;
}

.acoes-depmap-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.6rem 0.7rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--node-accent, var(--border-color));
  border-radius: 10px;
  box-shadow: var(--liberty-shadow);
  cursor: grab;
  transition: box-shadow 0.12s ease, opacity 0.15s ease;
}

.acoes-depmap-node:hover {
  box-shadow: var(--liberty-shadow-md);
}

.acoes-depmap-node--dim {
  opacity: 0.25;
}

.acoes-depmap-node--selected {
  outline: 2px solid var(--brand-primary);
  outline-offset: 1px;
}

.acoes-depmap-node--source {
  outline: 2px dashed var(--brand-light);
  outline-offset: 1px;
}

.acoes-depmap-node__head {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.acoes-depmap-node__prio {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 0.3rem;
}

.acoes-depmap-node__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.acoes-depmap-node__avatar {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--liberty-teal-mist);
  color: var(--brand-dark);
}

.acoes-depmap-node__foot {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.acoes-depmap-node__status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  white-space: nowrap;
}

.acoes-depmap-node__status .material-icons {
  font-size: 0.85rem;
}

.acoes-depmap-node__due {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.acoes-depmap-node__blocked {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
}

.acoes-depmap-node__blocked .material-icons {
  font-size: 0.8rem;
}

.acoes-depmap-node__done-deps {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
}

.acoes-depmap-node__done-deps .material-icons {
  font-size: 0.8rem;
}

.acoes-depmap-node__unblocks {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6d28d9;
  background: #ede9fe;
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
}

.acoes-depmap-node__unblocks .material-icons {
  font-size: 0.8rem;
}

.acoes-depmap-node__group {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--liberty-surface-warm);
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Critical-path position badge (Lente: caminho crítico) */
.acoes-depmap-node__critical {
  position: absolute;
  top: -10px;
  left: -10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #b45309;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: var(--liberty-shadow);
}

/* ── Cluster node (Agrupar por projeto/processo) ────────────────────────── */

.acoes-depmap-cluster {
  border-left-width: 1px;
  border-style: dashed;
  border-color: var(--brand-light);
  background: var(--liberty-teal-mist);
}

.acoes-depmap-cluster:hover {
  border-style: solid;
}

.acoes-depmap-cluster__icon {
  flex: none;
  font-size: 1.15rem;
  color: var(--brand-dark);
}

.acoes-depmap-cluster__total {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0 0.35rem;
}

.acoes-depmap-cluster__stat {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.acoes-depmap-cluster__expand {
  margin-left: auto;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ── Semantic zoom: compact node skin below COMPACT_SCALE ───────────────── */

.acoes-depmap-world--compact .acoes-depmap-node {
  border-left-width: 8px;
  background: color-mix(
    in srgb,
    var(--node-accent, #94a3b8) 10%,
    var(--surface-color)
  );
  justify-content: center;
}

.acoes-depmap-world--compact .acoes-depmap-node__title {
  font-size: 1.15rem;
  font-weight: 700;
  -webkit-line-clamp: 3;
}

.acoes-depmap-world--compact .acoes-depmap-node__prio {
  width: 13px;
  height: 13px;
  margin-top: 0.45rem;
}

.acoes-depmap-world--compact .acoes-depmap-node__avatar,
.acoes-depmap-world--compact .acoes-depmap-node__foot {
  display: none;
}

.acoes-depmap-world--compact .acoes-depmap-cluster .acoes-depmap-node__foot {
  display: flex;
}

.acoes-depmap-world--compact .acoes-depmap-cluster .acoes-depmap-node__title {
  font-size: 1.05rem;
}

.acoes-depmap-world--compact .acoes-depmap-edge__line {
  stroke-width: 4;
}

.acoes-depmap-world--compact .acoes-depmap-node__critical {
  width: 34px;
  height: 34px;
  font-size: 1rem;
  top: -14px;
  left: -14px;
}

/* ── Edge aggregation count bubble ──────────────────────────────────────── */

.acoes-depmap-edge__count text {
  fill: #fff;
  font-size: 11px;
  font-weight: 800;
}

/* ── Minimap ────────────────────────────────────────────────────────────── */

.acoes-depmap-minimap {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 15;
  width: 176px;
  height: 112px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--liberty-shadow);
  cursor: crosshair;
  touch-action: none;
}

.acoes-depmap-minimap__bg {
  fill: var(--surface-color);
  opacity: 0.92;
}

.acoes-depmap-minimap__view {
  fill: rgb(14 165 233 / 0.12);
  stroke: #0ea5e9;
  stroke-width: 1.5;
  pointer-events: none;
}

.acoes-depmap-detail {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 20;
  width: min(320px, calc(100% - 1.5rem));
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius);
  box-shadow: var(--liberty-shadow-md);
  padding: 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.acoes-depmap-detail__head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.acoes-depmap-detail__title {
  flex: 1;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.acoes-depmap-detail__close {
  border: 0;
  background: none;
  padding: 0.1rem;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
}

.acoes-depmap-detail__close:hover {
  background: var(--liberty-surface-warm);
  color: var(--text-primary);
}

.acoes-depmap-detail__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.75rem;
  margin: 0;
}

.acoes-depmap-detail__meta dt {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.acoes-depmap-detail__meta dd {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.acoes-depmap-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.acoes-depmap-edgebar {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: calc(100% - 1.5rem);
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--liberty-radius);
  box-shadow: var(--liberty-shadow-md);
  padding: 0.55rem 0.8rem;
}

.acoes-depmap-edgebar__msg {
  font-size: 0.8rem;
  color: var(--text-primary);
}

.acoes-depmap-edgebar__msg strong {
  font-weight: 700;
}

.acoes-depmap-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin: 0;
  font-size: 0.72rem;
}

.acoes-depmap-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.acoes-depmap-legend__item .material-icons {
  font-size: 0.9rem;
  color: #b45309;
}

.acoes-depmap-legend__item .acoes-depmap-legend__bolt {
  color: #6d28d9;
}

.acoes-depmap-legend__swatch {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}

.acoes-depmap-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  text-align: center;
}

.acoes-depmap-empty .material-icons {
  font-size: 2.2rem;
  opacity: 0.6;
}

@media (max-width: 1100px) {
  .acoes-depmap-search {
    max-width: none;
  }

  .acoes-depmap-stats {
    margin-left: 0;
  }
}

@media (max-width: 820px) {
  .acoes-depmap-toolbar {
    padding: 0.7rem;
    gap: 0.7rem;
  }

  .acoes-depmap-toolbar__primary {
    flex-direction: column;
    align-items: stretch;
  }

  .acoes-depmap-search {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }

  .acoes-depmap-toolbar__tools {
    justify-content: space-between;
  }

  .acoes-depmap-toolbar__secondary {
    flex-direction: column;
    align-items: stretch;
  }

  .acoes-depmap-toolbar__filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .acoes-depmap-field {
    width: 100%;
  }

  .acoes-depmap-field__select {
    flex: 1 1 auto;
    max-width: none;
  }

  .acoes-depmap-toolbar__toggles {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .acoes-depmap-stats {
    width: 100%;
    justify-content: flex-start;
  }

  .acoes-depmap-stage {
    height: clamp(340px, 58vh, 560px);
  }

  .acoes-depmap-minimap {
    display: none;
  }
}

@media (max-width: 560px) {
  .acoes-depmap-toolbar__filters {
    grid-template-columns: 1fr;
  }

  .acoes-depmap-toolbar__toggles {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.7rem;
  }

  .acoes-depmap-check {
    width: 100%;
    min-height: 2.5rem;
  }

  .acoes-depmap-btn__label {
    display: none;
  }

  .acoes-depmap-btn--connect {
    min-width: 2.5rem;
    padding: 0.45rem;
  }

  .acoes-depmap-btn {
    min-height: 2.5rem;
    min-width: 2.5rem;
  }

  .acoes-depmap-search {
    min-height: 2.6rem;
  }

  .acoes-depmap-field {
    min-height: 2.6rem;
  }

  .acoes-depmap-stage {
    height: clamp(300px, 55vh, 480px);
    border-radius: 10px;
  }

  .acoes-depmap-detail {
    top: auto;
    right: 0.5rem;
    left: 0.5rem;
    bottom: 0.5rem;
    width: auto;
  }

  .acoes-depmap-groupsbar {
    padding: 0.5rem 0.65rem;
  }

  .acoes-depmap-stats__chip {
    font-size: 0.7rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMUNICAÇÃO — operational communication hub (ChatPanel.tsx)
   EXO / Minha Área · Chat da Empresa
   ═══════════════════════════════════════════════════════════════════════════ */

.comm-hub {
  gap: var(--ds-space-5, 1.25rem);
}

.comm-hub__context {
  padding: var(--ds-space-4, 1rem) var(--ds-space-5, 1.25rem);
  border-radius: var(--ds-radius-lg, 12px);
  border: 1px solid var(--border-color);
  background: linear-gradient(
    135deg,
    rgb(0 191 154 / 0.06) 0%,
    rgb(0 43 73 / 0.04) 100%
  );
  box-shadow: var(--liberty-shadow);
}

.comm-hub__context-lead {
  margin: 0 0 var(--ds-space-4, 1rem);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 52rem;
}

.comm-hub__context-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--ds-space-3, 0.75rem);
}

.comm-hub__context-link {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3, 0.75rem);
  padding: var(--ds-space-3, 0.75rem) var(--ds-space-4, 1rem);
  border-radius: var(--ds-radius-md, 10px);
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.comm-hub__context-link:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--liberty-shadow-md);
  transform: translateY(-1px);
}

.comm-hub__context-link-icon {
  font-size: 1.35rem !important;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.comm-hub__context-link-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.comm-hub__context-link-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.comm-hub__context-link-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.comm-hub__context-link-arrow {
  font-size: 1.1rem !important;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.comm-hub__workspace {
  display: grid;
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: var(--ds-space-4, 1rem);
  height: min(72vh, 42rem);
  min-height: 28rem;
  align-items: stretch;
}

.comm-hub__sidebar,
.comm-hub__main {
  border-radius: var(--ds-radius-lg, 12px);
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  box-shadow: var(--liberty-shadow);
  overflow: hidden;
  min-height: 0;
}

.comm-hub__sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.comm-hub__sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-3, 0.75rem);
  padding: var(--ds-space-4, 1rem);
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(180deg, #fff 0%, var(--background-color) 100%);
}

.comm-hub__sidebar-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.comm-hub__sidebar-meta {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--brand-primary);
  font-weight: 600;
}

.comm-hub__new-btn {
  flex-shrink: 0;
}

.comm-hub__search {
  flex: none;
  width: 100%;
  min-width: 0;
  padding: var(--ds-space-3, 0.75rem) var(--ds-space-4, 1rem);
  margin: 0;
  border-bottom: 1px solid var(--border-color);
}

.comm-hub__search .app-field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.comm-hub__search-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.comm-hub__search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem !important;
  color: var(--text-secondary);
  pointer-events: none;
}

.comm-hub__search-input {
  width: 100%;
  padding-left: 2.25rem !important;
  background-image: none;
}

.comm-hub__channel-list {
  list-style: none;
  margin: 0;
  padding: 0 var(--ds-space-2, 0.5rem) var(--ds-space-3, 0.75rem);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.comm-hub__channel {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-3, 0.75rem);
  width: 100%;
  padding: var(--ds-space-3, 0.75rem);
  margin-bottom: 0.25rem;
  border: 1px solid transparent;
  border-radius: var(--ds-radius-md, 10px);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.comm-hub__channel:hover {
  background: rgb(0 191 154 / 0.06);
}

.comm-hub__channel--active {
  background: rgb(0 191 154 / 0.1);
  border-color: rgb(0 191 154 / 0.35);
}

.comm-hub__channel-icon {
  font-size: 1.15rem !important;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--background-color);
}

.comm-hub__channel-icon--general {
  color: var(--brand-primary);
  background: rgb(0 191 154 / 0.12);
}

.comm-hub__channel-icon--announcements {
  color: #0369a1;
  background: rgb(3 105 161 / 0.1);
}

.comm-hub__channel-icon--team {
  color: #7c3aed;
  background: rgb(124 58 237 / 0.1);
}

.comm-hub__channel-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.comm-hub__channel-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.comm-hub__channel-desc {
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comm-hub__unread {
  flex-shrink: 0;
  min-width: 1.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--error-color);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.comm-hub__channel-skeleton {
  height: 3.5rem;
  margin: 0.25rem 0.5rem;
  border-radius: var(--ds-radius-md, 10px);
  background: linear-gradient(
    90deg,
    var(--background-color) 25%,
    #eef2f7 50%,
    var(--background-color) 75%
  );
  background-size: 200% 100%;
  animation: comm-hub-shimmer 1.2s infinite;
}

.comm-hub__channel-empty {
  padding: var(--ds-space-4, 1rem);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
}

@keyframes comm-hub-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.comm-hub__main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.comm-hub__empty-main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: var(--ds-space-6, 1.5rem);
}

.comm-hub__thread-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-3, 0.75rem);
  padding: var(--ds-space-4, 1rem) var(--ds-space-5, 1.25rem);
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(180deg, #fff 0%, var(--background-color) 100%);
}

.comm-hub__thread-head-main {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-3, 0.75rem);
  min-width: 0;
}

.comm-hub__thread-icon {
  font-size: 1.35rem !important;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comm-hub__thread-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: -0.01em;
}

.comm-hub__thread-desc {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
  max-width: 36rem;
}

.comm-hub__thread-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.comm-hub__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--background-color);
  border: 1px solid var(--border-color);
}

.comm-hub__badge--accent {
  color: #0369a1;
  background: rgb(3 105 161 / 0.08);
  border-color: rgb(3 105 161 / 0.2);
}

.comm-hub__messages {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--ds-space-4, 1rem) var(--ds-space-5, 1.25rem);
  background: linear-gradient(
    180deg,
    var(--background-color) 0%,
    #fff 12%,
    #fff 100%
  );
}

.comm-hub__messages .empty-state-hint {
  flex: 1;
  justify-content: center;
  min-height: 12rem;
}

.comm-hub__messages-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.comm-hub__spin {
  animation: comm-hub-spin 0.9s linear infinite;
}

@keyframes comm-hub-spin {
  to {
    transform: rotate(360deg);
  }
}

.comm-hub__day-group {
  margin-bottom: var(--ds-space-4, 1rem);
}

.comm-hub__day-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--ds-space-4, 1rem) 0;
}

.comm-hub__day-sep span {
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  text-transform: capitalize;
}

.comm-hub__msg {
  display: flex;
  align-items: flex-end;
  gap: var(--ds-space-2, 0.5rem);
  margin-bottom: var(--ds-space-3, 0.75rem);
  max-width: 85%;
}

.comm-hub__msg--mine {
  margin-left: auto;
  flex-direction: row-reverse;
  max-width: 78%;
}

.comm-hub__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
}

.comm-hub__bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.comm-hub__msg-meta {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.comm-hub__msg-meta strong {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.comm-hub__msg-meta--mine {
  justify-content: flex-end;
}

.comm-hub__bubble {
  padding: 0.65rem 0.85rem;
  border-radius: 1rem 1rem 1rem 0.35rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  box-shadow: var(--liberty-shadow);
}

.comm-hub__msg--mine .comm-hub__bubble {
  border-radius: 1rem 1rem 0.35rem 1rem;
  background: rgb(0 191 154 / 0.12);
  border-color: rgb(0 191 154 / 0.28);
}

.comm-hub__bubble p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-primary);
}

.comm-hub__scroll-anchor {
  height: 1px;
}

.comm-hub__composer {
  flex-shrink: 0;
  margin-top: auto;
  padding: var(--ds-space-4, 1rem) var(--ds-space-5, 1.25rem);
  border-top: 1px solid var(--border-color);
  background: var(--surface-color);
}

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

.comm-hub__composer-row {
  display: flex;
  align-items: flex-end;
  gap: var(--ds-space-3, 0.75rem);
}

.comm-hub__composer-input {
  flex: 1;
  min-height: 2.75rem;
  resize: vertical;
  max-height: 8rem;
  line-height: 1.45;
}

.comm-hub__send-btn {
  flex-shrink: 0;
  min-height: var(--ds-btn-h, 2.5rem);
}

.comm-hub__composer-hint {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.comm-hub__kind-picker {
  margin: 0;
  padding: 0;
  border: none;
}

.comm-hub__kind-options {
  display: flex;
  gap: var(--ds-space-3, 0.75rem);
  margin-top: 0.35rem;
}

.comm-hub__kind-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  padding: 0.75rem;
  border-radius: var(--ds-radius-md, 10px);
  border: 1px solid var(--border-color);
  background: var(--background-color);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.comm-hub__kind-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.comm-hub__kind-option--selected {
  border-color: var(--brand-primary);
  background: rgb(0 191 154 / 0.08);
}

.comm-hub__kind-option-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .comm-hub__workspace {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 28rem;
  }

  .comm-hub__sidebar {
    max-height: 16rem;
    height: auto;
  }

  .comm-hub__main {
    height: min(60vh, 36rem);
  }

  .comm-hub__msg,
  .comm-hub__msg--mine {
    max-width: 95%;
  }

  .comm-hub__composer-row {
    flex-direction: column;
    align-items: stretch;
  }

  .comm-hub__send-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   Monday import wizard (/admin/importar-monday)
   ───────────────────────────────────────────────────────────────────────── */

.monday-import {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.monday-steps {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.monday-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: #fff;
  font-size: 0.85rem;
  color: var(--text-secondary, #64748b);
}

.monday-step .material-icons {
  font-size: 1.05rem;
}

.monday-step--active {
  border-color: var(--brand-primary, #00bf9a);
  color: var(--brand-dark, #002b49);
  font-weight: 600;
  box-shadow: 0 0 0 3px rgb(0 191 154 / 0.12);
}

.monday-step--done {
  color: var(--brand-primary, #00bf9a);
}

.monday-import-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fff;
}

.monday-import-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.monday-import-toolbar .app-input {
  min-width: min(100%, 20rem);
}

.monday-ws-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.monday-ws-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.monday-ws-item:hover {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 1px 6px rgb(0 43 73 / 0.08);
}

.monday-ws-icon {
  color: var(--brand-primary, #00bf9a);
}

.monday-ws-name {
  flex: 1 1 8rem;
  min-width: 0;
  font-weight: 600;
  color: var(--brand-dark, #002b49);
}

.monday-ws-desc {
  flex: 1 1 100%;
  min-width: 0;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
}

.monday-ws-item > .material-icons:last-child {
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--text-secondary, #94a3b8);
}

.monday-empty {
  padding: 1rem;
}

.monday-board-table {
  display: grid;
  gap: 0.5rem;
}

.monday-board-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  max-width: 100%;
  min-width: 0;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
}

.monday-board-row--on {
  border-color: var(--brand-primary, #00bf9a);
  background: rgb(0 191 154 / 0.04);
}

.monday-board-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.monday-board-name {
  font-weight: 600;
  color: var(--brand-dark, #002b49);
}

.monday-board-entity {
  max-width: 12rem;
}

.monday-import-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--liberty-border, #e2e8f0);
  padding-top: 1rem;
}

.monday-import-footer-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.monday-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0.5rem;
}

.monday-spinner {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 2px solid var(--liberty-border, #e2e8f0);
  border-top-color: var(--brand-primary, #00bf9a);
  animation: monday-spin 0.8s linear infinite;
}

@keyframes monday-spin {
  to {
    transform: rotate(360deg);
  }
}

.monday-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.monday-progress-title {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  color: var(--brand-dark, #002b49);
}

.monday-progress-bar {
  position: relative;
  height: 1.5rem;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.monday-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--brand-primary, #00bf9a),
    #00b6d6
  );
  transition: width 300ms ease;
  min-width: 0.5rem;
}

.monday-progress-fill--live {
  background-size: 200% 100%;
  animation: monday-progress-sheen 1.6s linear infinite;
}

@keyframes monday-progress-sheen {
  from {
    background-position: 0% 0;
  }
  to {
    background-position: 200% 0;
  }
}

.monday-progress-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
}

.monday-board-status {
  display: grid;
  gap: 0.4rem;
}

.monday-board-status-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 0.9rem;
}

.monday-board-status-row .material-icons {
  font-size: 1.05rem;
  color: var(--brand-primary, #00bf9a);
}

.monday-log summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-dark, #002b49);
}

.monday-log ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 6px;
  max-height: 16rem;
  overflow: auto;
  font-size: 0.82rem;
  display: grid;
  gap: 0.25rem;
}

.monday-log-error {
  color: #b91c1c;
}

.monday-log-warn {
  color: #b45309;
}

/* Nova organização — escolha de ponto de partida (IA vs Monday) */

.bootstrap-start-mode {
  border: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.bootstrap-start-mode-legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-dark, #002b49);
  margin-bottom: 0.35rem;
  padding: 0;
}

.bootstrap-start-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.bootstrap-start-option input[type="radio"] {
  margin-top: 0.2rem;
}

.bootstrap-start-option .material-icons {
  color: var(--brand-primary, #00bf9a);
  font-size: 1.2rem;
  margin-top: 0.05rem;
}

.bootstrap-start-option--on {
  border-color: var(--brand-primary, #00bf9a);
  background: rgb(0 191 154 / 0.05);
  box-shadow: 0 0 0 3px rgb(0 191 154 / 0.1);
}

.bootstrap-start-option-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.85rem;
}

.bootstrap-start-option-text strong {
  color: var(--brand-dark, #002b49);
}

.bootstrap-start-option-text span {
  color: var(--text-secondary, #64748b);
}

.bootstrap-start-mode + .app-btn {
  margin-top: 0.9rem;
}

/* Import wizard — banner pós-criação de workspace */

.monday-fresh-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgb(0 191 154 / 0.4);
  border-radius: 8px;
  background: rgb(0 191 154 / 0.07);
  color: var(--brand-dark, #002b49);
  font-size: 0.92rem;
}

.monday-fresh-banner .material-icons {
  color: var(--brand-primary, #00bf9a);
}

/* ============================================================================
   AÇÕES HUB — MOBILE EXPERIENCE (≤767px)
   Audit-driven overhaul (UniConecta_Mobile_Usability_Audit_Execucao.docx):
   · 44px touch targets everywhere
   · view switcher = one-row scrollable segmented control with labels
   · kanban = one column per swipe (scroll-snap) + column pager chips +
     compact cards + bottom-sheet "mover" (HTML5 DnD never fires on touch)
   · lista = stacked cards instead of a 10-column table
   Desktop is untouched: everything below is scoped to media queries, and the
   mobile-only elements (colnav, move button, sheet, lista cards) are hidden
   at ≥768px right here.
   ========================================================================= */

/* --- Bottom sheet (any viewport — harmless on desktop, opened via mobile
       button only) --- */
.acoes-kb-movesheet__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgb(15 23 42 / 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: acoes-sheet-fade 0.18s ease-out;
}

.acoes-kb-movesheet {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 0.5rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgb(15 23 42 / 0.25);
  animation: acoes-sheet-up 0.22s cubic-bezier(0.25, 0.8, 0.35, 1);
}

@keyframes acoes-sheet-fade {
  from {
    opacity: 0;
  }
}

@keyframes acoes-sheet-up {
  from {
    transform: translateY(24%);
    opacity: 0.6;
  }
}

.acoes-kb-movesheet__grip {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 0.25rem auto 0.75rem;
}

.acoes-kb-movesheet__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.acoes-kb-movesheet__lead {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #64748b);
}

.acoes-kb-movesheet__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.acoes-kb-movesheet__opt {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  cursor: pointer;
  text-align: left;
}

.acoes-kb-movesheet__opt .material-icons {
  color: var(--opt-color, #64748b);
  font-size: 1.25rem;
}

.acoes-kb-movesheet__opt:active {
  background: #f1f5f9;
}

.acoes-kb-movesheet__opt--active {
  border-color: var(--opt-color, #64748b);
  background: color-mix(in srgb, var(--opt-color, #64748b) 7%, #fff);
}

.acoes-kb-movesheet__opt-label {
  flex: 1;
}

.acoes-kb-movesheet__opt-check {
  color: var(--opt-color, #64748b);
}

.acoes-kb-movesheet__cancel {
  width: 100%;
  min-height: 48px;
  margin-top: 0.6rem;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary, #475569);
  cursor: pointer;
}

/* --- Column pager chips (mobile only; desktop hides above) --- */
.acoes-kb-colnav {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.2rem 0.1rem 0.5rem;
  flex-shrink: 0;
}

.acoes-kb-colnav::-webkit-scrollbar {
  display: none;
}

.acoes-kb-colnav__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
  cursor: pointer;
  white-space: nowrap;
}

.acoes-kb-colnav__chip--active {
  border-color: var(--chip-color, #64748b);
  background: color-mix(in srgb, var(--chip-color, #64748b) 9%, #fff);
  color: color-mix(in srgb, var(--chip-color, #64748b) 80%, #1e293b);
}

.acoes-kb-colnav__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--chip-color, #64748b);
}

.acoes-kb-colnav__count {
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  min-width: 1.5rem;
  text-align: center;
}

.acoes-kb-colnav__chip--active .acoes-kb-colnav__count {
  background: color-mix(in srgb, var(--chip-color, #64748b) 18%, #fff);
}

/* --- Mobile status/move button on kanban cards --- */
.acoes-kb-card-v2__move {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 44px;
  padding: 0.45rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--move-color, #64748b) 35%, #e2e8f0);
  border-radius: 8px;
  background: color-mix(in srgb, var(--move-color, #64748b) 6%, #fff);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  cursor: pointer;
  text-align: left;
}

.acoes-kb-card-v2__move .material-icons {
  font-size: 1.1rem;
  color: var(--move-color, #64748b);
}

.acoes-kb-card-v2__move-label {
  flex: 1;
}

.acoes-kb-card-v2__move-swap {
  color: var(--text-secondary, #94a3b8) !important;
}

/* --- Lista mobile cards (desktop hides above) --- */
.acoes-lista-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.acoes-lista-card {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.acoes-lista-card__main {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.acoes-lista-card__title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary, #1e293b);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.acoes-lista-card__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.acoes-lista-card__due {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
}

.acoes-lista-card__due .material-icons {
  font-size: 0.95rem;
}

.acoes-lista-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.4rem;
}

.acoes-lista-card__delete {
  min-width: 44px;
  min-height: 44px;
}

.acoes-lista-card__time {
  flex-basis: 100%;
  border-top: 1px dashed #e2e8f0;
  padding-top: 0.5rem;
}

/* ---------------------------------------------------------------------------
   ≤767px — the phone experience
   ------------------------------------------------------------------------ */
@media (max-width: 767px) {
  /* ····· App shell ····· */

  /* Desktop hover-reveal rail renders as a dead 24px strip on phones —
     the header hamburger already opens the nav here. Reclaim the width. */
  .app-sidebar-edge-reveal {
    display: none;
  }

  .app-page--acoes-board {
    padding-inline: 8px;
  }

  /* ····· Hub chrome ····· */

  /* View switcher: one-row scrollable segmented control WITH labels
     (overrides the icon-only sr-hidden labels from the ≤1100px rule) */
  .acoes-lay-v2__views .acoes-hub-views {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    grid-template-columns: none;
    padding: 0.25rem;
    gap: 0.25rem;
  }

  .acoes-lay-v2__views .acoes-hub-views::-webkit-scrollbar {
    display: none;
  }

  .acoes-lay-v2__views .acoes-hub-view {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.5rem 0.8rem;
    white-space: nowrap;
  }

  .acoes-lay-v2__views .acoes-hub-view__label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    overflow: visible;
    font-size: 0.8rem;
    display: inline;
    white-space: nowrap;
    -webkit-line-clamp: none;
  }

  /* Toolbar: search + filter + create on ONE 44px row */
  .acoes-lay-v2__masthead-toolbar {
    gap: 0.4rem;
    flex-wrap: nowrap;
  }

  .acoes-hub-search__input {
    min-width: 0;
    width: 100%;
  }

  /* Undo the legacy ≤480px full-width actions row — with nowrap the
     buttons share the search row */
  .acoes-lay-v2__masthead-actions {
    width: auto;
  }

  .acoes-hub-search__input,
  .acoes-lay-v2__masthead-search .app-toolbar-search {
    min-height: 44px;
    font-size: 16px; /* prevents iOS zoom-on-focus */
  }

  .acoes-filter-trigger,
  .acoes-hub-create {
    min-height: 44px;
    min-width: 44px;
  }

  .acoes-lay-v2__kpi-toggle {
    min-height: 44px;
  }

  /* Filter drawer: every control reaches the 44px touch minimum */
  .acoes-filter-drawer select,
  .acoes-filter-drawer input:not([type="checkbox"]),
  .acoes-filter-drawer button {
    min-height: 44px;
  }

  .acoes-filter-drawer .acoes-hub-check {
    min-height: 44px;
    align-items: center;
  }

  /* ····· Kanban ····· */

  /* Hide the desktop hint bar; the pager chips are the affordance */
  .acoes-kb-variant-toolbar--v2 {
    display: none;
  }

  /* One column per swipe */
  .acoes-hub--kanban-v2 .acoes-kb-board--v2 {
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0.5rem;
    gap: 0.6rem;
    padding: 0.1rem 0.5rem 1rem;
  }

  /* Container-relative width (not vw): the board is narrower than the
     viewport, and a ~1.5rem sliver of the next column stays visible as a
     scroll affordance */
  .acoes-hub--kanban-v2 .acoes-kb-col--v2 {
    flex: 0 0 min(calc(100% - 1.5rem), 340px);
    min-width: min(calc(100% - 1.5rem), 340px);
    width: min(calc(100% - 1.5rem), 340px);
    scroll-snap-align: start;
  }

  /* Compact cards: subtask manager + timer + desktop select live in the
     edit modal on phones */
  .acoes-hub--kanban-v2 .acoes-kb-card--v2 .acoes-kb-sub,
  .acoes-hub--kanban-v2 .acoes-kb-card--v2 .acoes-kb-card-v2__status-field {
    display: none;
  }

  .acoes-hub--kanban-v2 .acoes-kb-card--v2 {
    padding: 0.7rem 0.75rem;
    gap: 0.5rem;
  }

  .acoes-hub--kanban-v2 .acoes-kb-title {
    font-size: 0.9rem;
  }

  /* Timer stripe stays (field time-tracking) but tightened */
  .acoes-hub--kanban-v2 .acoes-kb-card--v2 .acoes-kb-foot {
    padding-top: 0.35rem;
  }

  /* Timer stripe buttons (kanban cards + lista cards): 40px touch area */
  .acoes-kb-time-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .acoes-kb-time-total {
    min-height: 40px;
  }

  /* ····· Matriz ····· */

  /* Keep the plot legible: real width + horizontal pan instead of a
     375px thumbnail of an 880px chart */
  .acoes-matriz {
    grid-template-rows: auto auto;
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .acoes-matriz-plot {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
  }

  .acoes-matriz-plot svg {
    min-width: 640px;
    min-height: 380px;
  }

  .acoes-matriz-item {
    flex-wrap: wrap;
    row-gap: 0.25rem;
    border-bottom: 1px solid #f1f5f9;
    padding-block: 0.4rem;
  }

  .acoes-matriz-item-title {
    flex: 1 1 100%;
    white-space: normal;
    min-height: 44px;
    align-items: center;
  }

  .acoes-matriz-item-prio {
    min-height: 44px;
    flex: 1;
    max-width: 100%;
    padding-inline: 0.5rem;
    font-size: 0.8rem;
  }

  .acoes-matriz-item-labels {
    flex-basis: 100%;
  }

  /* ····· Relatório ····· */

  .acoes-rel-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acoes-rel-chart {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .acoes-rel-chart svg {
    min-width: 560px;
  }

  .acoes-rel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .acoes-rel-head .app-btn {
    min-height: 44px;
    justify-content: center;
  }

  .acoes-rel-list-item {
    grid-template-columns: 96px 1fr 34px;
  }

  /* ····· Mapa (dependency map) ····· */

  .acoes-depmap-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .acoes-depmap-toolbar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  /* ····· Cronograma ····· */

  .acoes-crono-zoom-btn {
    min-height: 44px;
  }

  .acoes-crono-nav .app-btn {
    min-width: 44px;
    min-height: 44px;
  }

  /* ····· Lista ····· */

  .acoes-lista-tablewrap {
    display: none;
  }

  .acoes-lista-select-toggle,
  .acoes-lista-batchbar__actions .app-btn {
    min-height: 44px;
  }

  .acoes-lista-cards ~ .tt-pagination {
    margin-top: 0.75rem;
  }

  .tt-pagination-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

/* --- Mobile-only elements: hidden on desktop (kept last: must win the
       cascade against the base display rules above) --- */
@media (min-width: 768px) {
  .acoes-kb-colnav,
  .acoes-kb-card-v2__move,
  .acoes-lista-cards {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ProjetoActionsPanel — project-scoped actions hub
   ═══════════════════════════════════════════════════════════════════════════ */

.proj-ap-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(15 23 42 / 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.proj-ap-panel {
  width: min(100%, 1100px);
  max-height: min(92vh, 860px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgb(15 23 42 / 0.28), 0 0 0 1px #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Header — uses uc-entity-modal__hdr as base, extended here ── */
.proj-ap-header {
  /* override modal header defaults for this wider panel */
  margin-bottom: 0 !important;
  padding-bottom: 0.75rem !important;
  padding: 0.875rem 1.25rem 0.75rem !important;
  flex-shrink: 0;
}
.proj-ap-header__left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.proj-ap-header__badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e8f5f1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.proj-ap-header__badge .material-icons {
  color: var(--brand-primary, #00bf9a);
  font-size: 1.15rem;
}
.proj-ap-header__sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.3;
}
.proj-ap-header__right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

/* ── KPI strip ── */
.proj-ap-kpi-strip {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  overflow-x: auto;
}
.proj-ap-kpi-tile {
  flex: 1;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.75rem 0.5rem;
  border: none;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s;
  border-right: 1px solid #f1f5f9;
  position: relative;
}
.proj-ap-kpi-tile:last-child {
  border-right: none;
}
.proj-ap-kpi-tile:hover {
  background: #f8fafc;
}
.proj-ap-kpi-tile--active {
  background: var(--kpi-bg, #eff6ff);
}
.proj-ap-kpi-tile--active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--kpi-color, #3b82f6);
  border-radius: 3px 3px 0 0;
}
.proj-ap-kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proj-ap-kpi-icon .material-icons {
  font-size: 1rem;
}
.proj-ap-kpi-count {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}
.proj-ap-kpi-label {
  font-size: 0.68rem;
  color: #64748b;
  text-align: center;
  line-height: 1.2;
}

/* ── Toolbar ── */
.proj-ap-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.proj-ap-toolbar__left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.proj-ap-toolbar__right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.proj-ap-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.proj-ap-search-icon {
  position: absolute;
  left: 0.5rem;
  font-size: 1rem;
  color: #94a3b8;
  pointer-events: none;
}
.proj-ap-search {
  padding-left: 2rem !important;
  width: 200px;
}
/* Suppress any browser-native icons on the search/text input */
.proj-ap-search::-webkit-search-decoration,
.proj-ap-search::-webkit-search-cancel-button,
.proj-ap-search::-webkit-search-results-button,
.proj-ap-search::-webkit-search-results-decoration {
  display: none;
}

.proj-ap-search-clear {
  position: absolute;
  right: 0.35rem;
  border: none;
  background: none;
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  padding: 0;
}
.proj-ap-search-clear:hover {
  color: #475569;
}

/* View toggle — wraps acoes-hub-views; keep compact inside toolbar */
.proj-ap-view-toggle {
  flex-shrink: 0;
}
.proj-ap-view-toggle.acoes-hub-views {
  width: auto;
  padding: 0.2rem;
  border-radius: 8px;
}
.proj-ap-view-toggle .acoes-hub-view {
  padding: 0.3rem 0.65rem;
  font-size: 0.79rem;
}

/* ── Filter summary ── */
.proj-ap-filter-summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 1rem;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
  font-size: 0.78rem;
  color: #1e40af;
  flex-shrink: 0;
}

/* ── Create form ── */
.proj-ap-create-wrap {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}
.proj-ap-create-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.proj-ap-create-form__row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.proj-ap-create-form__title {
  flex: 1;
  min-width: 220px;
}

/* ── AI wrap ── */
.proj-ap-ai-wrap {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fafafa;
  flex-shrink: 0;
  max-height: 40vh;
  overflow-y: auto;
}

/* ── Body ── */
.proj-ap-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Empty states */
.proj-ap-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  text-align: center;
  color: #64748b;
}
.proj-ap-empty p {
  margin: 0;
}

/* ── List table ── */
.proj-ap-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.proj-ap-list__head th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.proj-ap-list-row {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s;
}
.proj-ap-list-row:hover {
  background: #f8fafc;
}
.proj-ap-list-row__accent {
  width: 4px;
  background: var(--row-accent, #e2e8f0);
  border-radius: 2px 0 0 2px;
  padding: 0 !important;
}
.proj-ap-list-row__title {
  padding: 0.6rem 0.75rem;
  min-width: 0;
}
.proj-ap-list-row__name {
  display: block;
  font-weight: 500;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}
.proj-ap-list-row__why {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}
.proj-ap-list-row__status {
  padding: 0.5rem 0.5rem;
}
.proj-ap-list-row__priority {
  padding: 0.5rem 0.5rem;
}
.proj-ap-list-row__due {
  padding: 0.5rem 0.75rem;
}

/* Status select in list */
.proj-ap-status-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.proj-ap-status-select {
  appearance: none;
  padding: 0.25rem 1.75rem 0.25rem 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--ss-bg, #f1f5f9);
  color: var(--ss-color, #64748b);
  cursor: pointer;
  transition: border-color 0.15s;
  white-space: nowrap;
}
.proj-ap-status-select:hover {
  border-color: var(--ss-color, #94a3b8);
}
.proj-ap-status-icon {
  position: absolute;
  left: 0.3rem;
  font-size: 0.8rem !important;
  pointer-events: none;
}
.proj-ap-list-row__priority-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
}
.proj-ap-list-row__due-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 12px;
  white-space: nowrap;
}

/* ── Pagination ── */
.proj-ap-pagination {
  padding: 0.5rem 1rem;
  border-top: 1px solid #f1f5f9;
}

/* ── Kanban ── */
.proj-ap-kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  height: 100%;
  min-height: 300px;
}
.proj-ap-kanban-col {
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.proj-ap-kanban-col:last-child {
  border-right: none;
}
.proj-ap-kanban-col__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--col-color, #e2e8f0);
  background: var(--col-bg, #f8fafc);
  position: sticky;
  top: 0;
  z-index: 1;
}
.proj-ap-kanban-col__head .material-icons {
  font-size: 1rem;
  color: var(--col-color, #64748b);
}
.proj-ap-kanban-col__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--col-color, #475569);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-ap-kanban-col__badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  flex-shrink: 0;
}
.proj-ap-kanban-col__body {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow-y: auto;
  flex: 1;
}
.proj-ap-kanban-col__empty {
  font-size: 0.75rem;
  color: #cbd5e1;
  text-align: center;
  padding: 1.5rem 0.5rem;
  margin: 0;
}

/* ── Kanban card ── */
.proj-ap-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--card-accent, #e2e8f0);
  border-radius: 8px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.04);
  transition: box-shadow 0.15s;
}
.proj-ap-card:hover {
  box-shadow: 0 3px 8px rgb(0 0 0 / 0.1);
}
.proj-ap-card__title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}
.proj-ap-card__why {
  margin: 0;
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj-ap-card__meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.proj-ap-card__due {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.67rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
}
.proj-ap-card__priority {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.67rem;
  font-weight: 600;
}
.proj-ap-card__status-select {
  appearance: none;
  width: 100%;
  padding: 0.25rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--card-ss-bg, #f1f5f9);
  color: var(--card-ss-color, #64748b);
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 0.1rem;
  text-align: center;
}

/* ── Footer shortcuts ── */
.proj-ap-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}
.proj-ap-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: #94a3b8;
}
.proj-ap-shortcut kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-size: 0.65rem;
  font-family: ui-monospace, SFMono-Regular, monospace;
  background: #e2e8f0;
  color: #475569;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  font-weight: 600;
}

/* ── ProjetoCardsGrid: clickable stat + count badge ── */
.proj-card-stat--link {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  border-radius: 6px;
  padding: 0.2rem 0.3rem;
  margin: -0.2rem -0.3rem;
  transition: background 0.12s;
}
.proj-card-stat--link:hover {
  background: #f1f5f9;
}
.proj-card-foot-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0 0.3rem;
  background: rgba(255 255 255 / 0.3);
  color: inherit;
  margin-left: 0.2rem;
}
.app-btn--primary .proj-card-foot-count {
  background: rgba(255 255 255 / 0.25);
}
.app-btn--secondary .proj-card-foot-count {
  background: rgba(0 43 73 / 0.15);
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .proj-ap-panel {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  .proj-ap-backdrop {
    padding: 0;
  }
  .proj-ap-kanban {
    grid-template-columns: 1fr;
  }
  .proj-ap-kanban-col {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .proj-ap-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .proj-ap-toolbar__left,
  .proj-ap-toolbar__right {
    flex-wrap: wrap;
  }
  .proj-ap-search {
    width: 100%;
  }
  .proj-ap-kpi-strip {
    overflow-x: auto;
  }
  .proj-ap-kpi-tile {
    min-width: 90px;
  }
  .proj-ap-footer {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ContextPeek — drill-down chips + hover cards (Ações hub)
   ═══════════════════════════════════════════════════════════════════════════ */

.ctx-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  border: 1px solid var(--border-color, #e2e8f0);
  background: #fff;
  color: var(--text-secondary, #64748b);
  border-radius: 999px;
  padding: 0.16rem 0.55rem 0.16rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.ctx-chip .material-icons {
  font-size: 0.85rem;
  color: var(--brand-primary, #00bf9a);
}
.ctx-chip:hover,
.ctx-chip[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--brand-primary) 45%, white);
  background: color-mix(in srgb, var(--brand-primary) 6%, white);
  color: var(--brand-dark, #002b49);
}
.ctx-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 15rem;
}
.ctx-chip--improvement .material-icons {
  color: #f59e0b;
}
.ctx-chip--project .material-icons {
  color: #16a34a;
}

/* Lista cells: keep chips compact so Título keeps room */
.acoes-lista-origin-cell .ctx-chip__label,
.acoes-lista-process-cell .ctx-chip__label {
  max-width: 12.5rem;
}
.acoes-lista-origin-cell .ctx-chip--improvement .ctx-chip__label {
  max-width: 14rem;
}
.acoes-lista-origin-cell,
.acoes-lista-process-cell {
  white-space: nowrap;
}

/* Inline variant: plain muted text with underline affordance (dense rows) */
.ctx-chip--inline {
  border: none;
  background: transparent;
  border-radius: 6px;
  padding: 0.1rem 0.25rem;
  font-weight: 500;
}
.ctx-chip--inline:hover,
.ctx-chip--inline[aria-expanded="true"] {
  background: color-mix(in srgb, var(--brand-primary) 8%, white);
}
.ctx-chip--inline .ctx-chip__label {
  text-decoration: underline dotted rgba(100 116 139 / 0.55);
  text-underline-offset: 2px;
}

.ctx-peek-card {
  position: fixed;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  box-shadow:
    0 12px 40px rgba(15, 23, 42, 0.16),
    0 4px 12px rgba(15, 23, 42, 0.08);
  padding: 0.85rem 0.95rem;
  animation: ctx-peek-in 0.14s ease-out;
}
@keyframes ctx-peek-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.ctx-peek-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.ctx-peek-card__kind {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-primary, #00bf9a);
}
.ctx-peek-card__kind .material-icons {
  font-size: 0.95rem;
}
.ctx-peek-card__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--brand-dark, #002b49);
}
.ctx-peek-card__meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
}
.ctx-peek-card__excerpt {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary, #64748b);
  border-left: 3px solid color-mix(in srgb, var(--brand-primary) 35%, white);
  padding-left: 0.55rem;
}
.ctx-peek-card__summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-dark, #002b49);
}
.ctx-peek-card__summary .material-icons {
  font-size: 0.95rem;
  color: var(--brand-primary, #00bf9a);
}
.ctx-peek-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}
.ctx-peek-card__btn {
  font-size: 0.72rem;
  padding: 0.28rem 0.6rem;
  gap: 0.28rem;
}
.ctx-peek-card__btn .material-icons {
  font-size: 0.85rem;
}

/* ── Active context chip strip (hub masthead) ── */
.acoes-ctx-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0;
}
.acoes-ctx-strip__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary, #64748b);
}
.acoes-ctx-strip__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 22rem;
  background: color-mix(in srgb, var(--brand-primary) 10%, white);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 32%, white);
  color: var(--brand-dark, #002b49);
  border-radius: 999px;
  padding: 0.2rem 0.35rem 0.2rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
}
.acoes-ctx-strip__chip > .material-icons {
  font-size: 0.85rem;
  color: var(--brand-primary, #00bf9a);
}
.acoes-ctx-strip__chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acoes-ctx-strip__chip-kind {
  font-weight: 500;
  opacity: 0.75;
}
.acoes-ctx-strip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--brand-dark, #002b49);
  cursor: pointer;
  padding: 0;
}
.acoes-ctx-strip__remove:hover {
  background: color-mix(in srgb, var(--brand-primary) 25%, white);
}
.acoes-ctx-strip__remove .material-icons {
  font-size: 0.8rem;
}

/* ── Lista: Agrupar por ── */
.acoes-lista-groupbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.15rem 0.55rem;
}
.acoes-lista-groupbar__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
}
.acoes-lista-groupbar__seg {
  display: inline-flex;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 999px;
  background: #fff;
  padding: 0.14rem;
  gap: 0.1rem;
}
.acoes-lista-groupbar__opt {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: none;
  background: transparent;
  color: var(--text-secondary, #64748b);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.24rem 0.65rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.acoes-lista-groupbar__opt .material-icons {
  font-size: 0.85rem;
}
.acoes-lista-groupbar__opt:hover {
  color: var(--brand-dark, #002b49);
}
.acoes-lista-groupbar__opt[aria-pressed="true"] {
  background: var(--brand-dark, #002b49);
  color: #fff;
}

.acoes-lista-select-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-left: auto;
  border: 1px solid var(--border-color, #e2e8f0);
  background: #fff;
  color: var(--brand-dark, #002b49);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  cursor: pointer;
}
.acoes-lista-select-toggle .material-icons {
  font-size: 0.95rem;
}
.acoes-lista-select-toggle:hover {
  border-color: var(--brand-dark, #002b49);
}
.acoes-lista-select-toggle[aria-pressed="true"] {
  background: var(--brand-dark, #002b49);
  border-color: var(--brand-dark, #002b49);
  color: #fff;
}

.acoes-lista-batchbar {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand-primary, #00bf9a) 8%, white);
  border: 1px solid
    color-mix(in srgb, var(--brand-primary, #00bf9a) 35%, white);
}
.acoes-lista-batchbar__count {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
}
.acoes-lista-batchbar__hint {
  font-weight: 500;
  color: var(--text-secondary, #64748b);
}
.acoes-lista-batchbar__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.acoes-lista-batchbar__warn {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.75rem;
  color: #b45309;
}

.acoes-lista-checkcell {
  width: 2.4rem;
  text-align: center;
  vertical-align: middle;
}
.acoes-lista-check {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--brand-dark, #002b49);
  cursor: pointer;
}
.acoes-lista-card__check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}
.acoes-lista-move-field {
  margin-top: 0.15rem;
}

.acoes-lista-grouphead td {
  background: color-mix(in srgb, var(--brand-primary) 5%, white);
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding: 0.45rem 0.75rem;
}
.acoes-lista-grouphead__row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.acoes-lista-grouphead__name {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-dark, #002b49);
}
.acoes-lista-grouphead__name .material-icons {
  font-size: 0.95rem;
  color: var(--brand-primary, #00bf9a);
}
.acoes-lista-grouphead__stats {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
}
.acoes-lista-grouphead__open {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand-primary, #00bf9a);
  text-decoration: none;
  margin-left: auto;
}
.acoes-lista-grouphead__open:hover {
  text-decoration: underline;
}
.acoes-lista-grouphead__open .material-icons {
  font-size: 0.8rem;
}

/* Group header in the mobile stacked-cards layout */
.acoes-lista-cards .acoes-lista-groupcard {
  background: color-mix(in srgb, var(--brand-primary) 5%, white);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
}

/* ── Matriz: side-list context line (own row under the title) ── */
.acoes-matriz-item {
  flex-wrap: wrap;
}
.acoes-matriz-item-ctx {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  flex: 1 1 100%;
  order: 10;
  padding-left: 1.1rem;
  margin-top: -0.1rem;
}
.acoes-matriz-item-ctx .ctx-chip {
  max-width: 100%;
}
.acoes-matriz-item-ctx .ctx-chip__label {
  max-width: 13rem;
}

/* ── Cronograma: context chip next to row label ── */
.acoes-crono-label .ctx-chip--inline {
  flex-shrink: 1;
  min-width: 0;
  max-width: 40%;
}

/* ── Mapa: contexto block in detail panel ── */
.acoes-depmap-ctx {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
}
.acoes-depmap-ctx .ctx-chip {
  max-width: 100%;
}

/* ── Relatório: por melhoria / por processo breakdown ── */
.acoes-rel-ctx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.acoes-rel-ctx-table th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary, #64748b);
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.acoes-rel-ctx-table td {
  padding: 0.42rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.acoes-rel-ctx-table td.num,
.acoes-rel-ctx-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.acoes-rel-ctx-name {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--brand-dark, #002b49);
  font-weight: 600;
  text-decoration: none;
}
.acoes-rel-ctx-name:hover {
  text-decoration: underline;
}
.acoes-rel-ctx-name .material-icons {
  font-size: 0.9rem;
  color: var(--brand-primary, #00bf9a);
}
.acoes-rel-ctx-bar {
  position: relative;
  width: 84px;
  height: 7px;
  border-radius: 4px;
  background: #e2e8f0;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.4rem;
  overflow: hidden;
}
.acoes-rel-ctx-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  background: var(--brand-primary, #00bf9a);
}
.acoes-rel-ctx-late {
  color: #dc2626;
  font-weight: 700;
}
.acoes-rel-ctx-filterlink {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand-primary, #00bf9a);
  text-decoration: none;
  white-space: nowrap;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.acoes-rel-ctx-filterlink:hover {
  text-decoration: underline;
}
.acoes-rel-ctx-filterlink .material-icons {
  font-size: 0.8rem;
}

@media print {
  .acoes-rel-ctx-filterlink {
    display: none;
  }
}

@media (max-width: 640px) {
  .ctx-chip__label {
    max-width: 9rem;
  }
  .acoes-rel-ctx-table {
    font-size: 0.74rem;
  }
  .acoes-rel-ctx-bar {
    width: 48px;
  }
}

/* Cronograma row label restructured: title button + meta line (labels + context chip) */
.acoes-crono-row-titlebtn {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  max-width: 100%;
  text-align: left;
}
.acoes-crono-row-titlebtn:hover .acoes-crono-row-title {
  text-decoration: underline;
}
.acoes-crono-row-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  min-width: 0;
}
.acoes-crono-row-meta .ctx-chip--inline {
  padding: 0.05rem 0.15rem;
}

.acoes-depmap-detail__ctx {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.5rem 0 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}
.acoes-depmap-detail__ctx-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary, #64748b);
}

/* Personal time report — project-aware layout */
.tt-page {
  width: 100%;
  max-width: none;
  gap: 1.15rem;
}

.tt-section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #2563eb;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.tt-start-grid {
  display: grid;
  grid-template-columns: minmax(13rem, 0.9fr) minmax(16rem, 1.5fr) auto;
  align-items: end;
  gap: 0.75rem;
}

.tt-start-grid .tt-start-input {
  width: 100%;
  box-sizing: border-box;
}

.tt-field--context,
.tt-field--description {
  min-width: 0;
}

.tt-selected-context {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: -0.15rem 0 0;
  color: #475569;
  font-size: 0.75rem;
}

.tt-selected-context .material-icons {
  color: #2563eb;
  font-size: 1rem;
}

.tt-running-context {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.75rem;
}

.tt-running-context > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #dcfce7;
  border-radius: 9px;
  background: #f0fdf4;
}

.tt-running-context strong {
  overflow: hidden;
  color: #14532d;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-running-context span:not(.tt-context-label) {
  overflow: hidden;
  color: #4b5563;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-context-label {
  color: #15803d;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tt-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 0.75rem;
}

.tt-summary-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  background: var(--surface-color, #fff);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.tt-summary-card > .material-icons {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  place-items: center;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 1.15rem;
}

.tt-summary-card > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.tt-summary-card strong {
  color: var(--text-primary, #0f172a);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.tt-summary-card span:last-child {
  color: var(--text-secondary, #64748b);
  font-size: 0.72rem;
}

.tt-summary-grid .tt-manual-toggle {
  justify-content: center;
  padding-inline: 1rem;
  background: var(--surface-color, #fff);
}

.tt-summary-grid .tt-manual-toggle--open {
  background: #2563eb;
}

.tt-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.tt-section-heading h2,
.tt-history-head h2 {
  margin: 0.12rem 0 0;
  color: var(--text-primary, #0f172a);
  font-size: 0.98rem;
  line-height: 1.3;
}

.tt-manual > .tt-section-heading {
  padding: 1rem 1.5rem 0;
}

.tt-manual-grid {
  display: grid;
  grid-template-columns:
    minmax(10rem, 0.75fr) minmax(10rem, 0.75fr) minmax(16rem, 1.5fr);
  gap: 0.75rem;
}

.tt-manual-dur {
  align-self: flex-start;
  margin: -0.25rem 0 0;
}

.tt-insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(15rem, 0.8fr);
  gap: 1rem;
}

.tt-allocation-card,
.tt-quality-card {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  background: var(--surface-color, #fff);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.tt-allocation-card {
  padding: 1.1rem 1.2rem;
}

.tt-allocation-card > .tt-section-heading > strong {
  color: #1d4ed8;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.tt-allocation-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.tt-allocation-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.tt-allocation-meta > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.tt-allocation-meta strong {
  color: var(--text-primary, #1e293b);
  font-size: 0.78rem;
}

.tt-allocation-meta span {
  overflow: hidden;
  color: var(--text-secondary, #64748b);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-allocation-track {
  height: 0.42rem;
  margin-top: 0.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.tt-allocation-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.tt-allocation-fill--unlinked {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.tt-allocation-empty {
  margin-top: 0.8rem;
  padding: 1rem;
  border-radius: 9px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.78rem;
  text-align: center;
}

.tt-quality-card {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1.1rem;
  background: linear-gradient(145deg, #f8fafc, #fff);
}

.tt-quality-card > .material-icons {
  color: #2563eb;
  font-size: 1.6rem;
}

.tt-quality-card > div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tt-quality-card strong {
  color: var(--text-primary, #1e293b);
  font-size: 0.9rem;
}

.tt-quality-card p {
  margin: 0;
  color: var(--text-secondary, #64748b);
  font-size: 0.75rem;
  line-height: 1.5;
}

.tt-history-head {
  justify-content: space-between;
  padding-block: 1rem;
}

.tt-history-head > div {
  display: flex;
  flex-direction: column;
}

.tt-history-count {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
}

.tt-report-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background: #f8fafc;
}

.tt-period-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.tt-period-bar > .tt-field-label {
  flex: 0 0 auto;
  margin: 0;
}

.tt-period-chips {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.tt-period-chip {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.tt-period-chip:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.tt-period-chip--active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.tt-period-select {
  flex: 0 0 11rem;
  min-width: 9rem;
}

.tt-period-select .tt-field-label {
  display: none;
}

@media (min-width: 1100px) {
  .tt-period-select {
    display: none;
  }
}

@media (max-width: 1099px) {
  .tt-period-chips {
    display: none;
  }
}

.tt-filter-grid {
  display: grid;
  grid-template-columns:
    minmax(8rem, 0.75fr) minmax(11rem, 1.1fr) minmax(12rem, 1.35fr)
    minmax(8rem, 0.7fr);
  gap: 0.75rem;
}

.tt-filter-search {
  grid-column: span 3;
}

.tt-search-wrap {
  position: relative;
  display: block;
}

.tt-search-wrap > .material-icons {
  position: absolute;
  top: 50%;
  left: 0.65rem;
  z-index: 1;
  color: #94a3b8;
  font-size: 1rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.tt-search-wrap .tt-input {
  padding-left: 2rem;
}

.tt-clear-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
}

.tt-clear-filters:hover {
  text-decoration: underline;
}

.tt-clear-filters .material-icons {
  font-size: 0.95rem;
}

.tt-row,
.tt-row--active {
  grid-template-columns: 4rem 5rem minmax(0, 1fr) auto;
  padding-block: 0.8rem;
}

.tt-row-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.18rem;
}

.tt-row-main > strong {
  overflow: hidden;
  color: var(--text-primary, #1e293b);
  font-size: 0.82rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-row-main > span {
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--text-secondary, #64748b);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-project-dot {
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.35rem;
  flex: 0 0 0.42rem;
  border-radius: 50%;
  background: #3b82f6;
}

.tt-project-dot--empty {
  background: #f59e0b;
}

@media (max-width: 900px) {
  .tt-start-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tt-start-grid .tt-btn {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .tt-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tt-summary-grid .tt-manual-toggle {
    grid-column: 1 / -1;
  }

  .tt-manual-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tt-manual-grid .tt-field--context {
    grid-column: 1 / -1;
  }

  .tt-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tt-filter-search {
    grid-column: span 1;
  }
}

@media (max-width: 680px) {
  .tt-start-grid,
  .tt-running-context,
  .tt-manual-grid,
  .tt-insights-grid {
    grid-template-columns: 1fr;
  }

  .tt-manual-grid .tt-field--context {
    grid-column: auto;
  }

  .tt-summary-grid {
    grid-template-columns: 1fr;
  }

  .tt-summary-grid .tt-manual-toggle {
    grid-column: auto;
  }

  .tt-row,
  .tt-row--active {
    grid-template-columns: 3.5rem 4.2rem minmax(0, 1fr);
  }

  .tt-row .tt-badge {
    display: none;
  }

  .tt-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------------------
   Integrations screen (IntegrationsPanel) — key mgmt + API explorer.
   Builds on .mcp-admin-* card styles.
--------------------------------------------------------------------------- */
.int-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.int-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted, #64748b);
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.int-tab .material-icons {
  font-size: 1.1rem;
}
.int-tab--active {
  color: var(--brand-primary, #00bf9a);
  border-bottom-color: var(--brand-primary, #00bf9a);
}
.int-scope-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.int-scope-item {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.625rem;
  cursor: pointer;
}
.int-scope-item input {
  margin-top: 0.2rem;
}
.int-scope-item > span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.int-scope-code {
  font-size: 0.72rem;
  color: var(--brand-primary, #00bf9a);
  background: #f0fdfa;
  padding: 0.05rem 0.35rem;
  border-radius: 0.35rem;
  width: fit-content;
}
.int-scope-desc {
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
}
.int-testkey {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.int-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.int-link-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--text-strong, #1e293b);
  text-decoration: none;
  border: 1px solid var(--border-color, #e2e8f0);
}
.int-link-list a:hover {
  background: #f8fafc;
}
.int-op-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
}
.int-op-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--text-strong, #1e293b);
}
.int-op-summary {
  color: var(--text-muted, #64748b);
  font-size: 0.85rem;
  flex: 1;
}
.int-op-chevron {
  color: var(--text-muted, #94a3b8);
}
.int-method {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  color: #fff;
  min-width: 3rem;
  text-align: center;
}
.int-method--get {
  background: #0284c7;
}
.int-method--post {
  background: #059669;
}
.int-method--put {
  background: #d97706;
}
.int-method--delete {
  background: #dc2626;
}
.int-op-body {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.int-op-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}
.int-op-hint {
  font-size: 0.8rem;
  color: #dc2626;
  margin-left: 0.5rem;
}
.int-op-result {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.int-op-status {
  font-weight: 700;
  font-size: 0.8rem;
  width: fit-content;
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
}
.int-op-status--ok {
  background: #dcfce7;
  color: #166534;
}
.int-op-status--err {
  background: #fee2e2;
  color: #991b1b;
}

/* Indicator wizard — data source (origem) selector. */
.ind-source-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.ind-source-option {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
  text-align: left;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.625rem;
  background: #fff;
  cursor: pointer;
}
.ind-source-option .material-icons {
  color: var(--text-muted, #94a3b8);
  font-size: 1.25rem;
}
.ind-source-option strong {
  font-size: 0.9rem;
}
.ind-source-option-desc {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  line-height: 1.3;
}
.ind-source-option--active {
  border-color: var(--brand-primary, #00bf9a);
  background: #f0fdfa;
}
.ind-source-option--active .material-icons {
  color: var(--brand-primary, #00bf9a);
}
.ind-source-hint {
  margin-top: 0.5rem;
}
@media (max-width: 640px) {
  .ind-source-options {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================================
   Indicator Map (IndicatorMindmap) — infinite Cytoscape canvas + drilldown.
=========================================================================== */
.ind-map-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ind-map-wrap:fullscreen {
  background: #fff;
  padding: 1rem 1.25rem;
  overflow: auto;
}
.ind-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.ind-map-seg {
  display: inline-flex;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.6rem;
  overflow: hidden;
  background: #fff;
}
.ind-map-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.7rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  border-right: 1px solid var(--border-color, #e2e8f0);
}
.ind-map-seg-btn:last-child {
  border-right: none;
}
.ind-map-seg-btn--active {
  background: var(--brand-primary, #00bf9a);
  color: #fff;
}
.ind-map-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.ind-map-group-label {
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
  font-weight: 600;
}
.ind-map-select {
  width: auto;
  min-width: 11rem;
  padding: 0.4rem 0.6rem;
}
.ind-map-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.6rem;
  padding: 0.2rem 0.35rem;
}
.ind-map-tool {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: none;
  border-radius: 0.4rem;
  cursor: pointer;
  color: var(--text-strong, #334155);
}
.ind-map-tool:hover {
  background: #f1f5f9;
}
.ind-map-tool:disabled {
  opacity: 0.5;
  cursor: default;
}
.ind-map-tool--active {
  background: var(--brand-primary, #00bf9a);
  color: #fff;
}
.ind-map-tool--active:hover {
  background: var(--brand-primary, #00bf9a);
}
.ind-map-zoom {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #64748b);
  min-width: 2.6rem;
  text-align: center;
}
.ind-map-divider {
  width: 1px;
  height: 1.3rem;
  background: var(--border-color, #e2e8f0);
  margin: 0 0.15rem;
}
.ind-map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.76rem;
  color: var(--text-muted, #64748b);
}
.ind-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.ind-map-legend-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  display: inline-block;
}
.ind-map-hint {
  margin-left: auto;
  font-style: italic;
}
.ind-map-saved {
  margin: 0;
  padding: 0.5rem 0.8rem;
  background: #ecfdf5;
  color: #065f46;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.ind-map-stage {
  position: relative;
  height: min(72vh, 680px);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.9rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, #e2e8f0 1px, transparent 0) 0 0 / 22px
    22px,
    #f8fafc;
}
.ind-map-wrap:fullscreen .ind-map-stage {
  height: calc(100vh - 150px);
}
.ind-map-canvas {
  position: absolute;
  inset: 0;
}
.ind-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted, #64748b);
  background: rgba(248, 250, 252, 0.7);
}

/* Drilldown side panel */
.ind-drill {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 92%);
  background: #fff;
  border-left: 1px solid var(--border-color, #e2e8f0);
  box-shadow: -12px 0 30px rgb(15 23 42 / 0.08);
  padding: 1rem 1.15rem 1.25rem;
  overflow-y: auto;
  animation: ind-drill-in 0.22s ease;
}
@keyframes ind-drill-in {
  from {
    transform: translateX(20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.ind-drill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid;
  padding-bottom: 0.6rem;
  margin-bottom: 0.75rem;
}
.ind-drill-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.ind-drill-close {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted, #94a3b8);
  display: grid;
  place-items: center;
}
.ind-drill-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}
.ind-drill-desc {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
}
.ind-drill-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.ind-drill-metrics > div {
  background: #f8fafc;
  border-radius: 0.55rem;
  padding: 0.55rem 0.5rem;
  text-align: center;
}
.ind-drill-metric-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 0.2rem;
}
.ind-drill-metrics strong {
  font-size: 0.95rem;
  color: #0f172a;
}
.ind-drill-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 54px;
  padding: 0.4rem 0.1rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}
.ind-drill-spark-bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  min-height: 6px;
  opacity: 0.85;
}
.ind-drill-section {
  margin-bottom: 0.85rem;
}
.ind-drill-section-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #64748b);
  margin-bottom: 0.4rem;
}
.ind-drill-alerts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.ind-drill-alerts li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 0.5rem;
  padding: 0.45rem 0.6rem;
}
.ind-drill-alerts .material-icons {
  color: #ea580c;
}
.ind-drill-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.ind-drill-links li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.5rem;
}
.ind-drill-links .material-icons {
  color: var(--brand-primary, #00bf9a);
}
.ind-drill-link-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ind-drill-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  background: #f1f5f9;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
}
.ind-drill-empty,
.ind-drill-loading {
  font-size: 0.8rem;
  margin: 0;
}
.ind-drill-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.76rem;
  color: var(--text-muted, #64748b);
  margin-bottom: 0.85rem;
}
.ind-drill-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.ind-drill-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.ind-drill-btn {
  justify-content: center;
  font-size: 0.8rem;
  padding: 0.5rem 0.6rem;
}
.ind-drill-btn:first-child {
  grid-column: 1 / -1;
}
@media (max-width: 640px) {
  .ind-map-hint {
    display: none;
  }
  .ind-drill {
    width: 100%;
  }
}

/* —— Brainstorm Studio (Ideias AI-first) —— */
.brainstorm-studio {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.brainstorm-studio__tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.brainstorm-studio__tabs-spacer {
  flex: 1;
}

.brainstorm-studio__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: #fff;
  color: var(--liberty-text, #0f172a);
  font-size: 0.875rem;
  cursor: pointer;
}

.brainstorm-studio__tab .material-icons {
  font-size: 1.1rem;
}

.brainstorm-studio__tab--active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.brainstorm-studio__controls {
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.brainstorm-studio__lenses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.65rem;
}

.brainstorm-studio__lens {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: #f8fafc;
  cursor: pointer;
}

.brainstorm-studio__lens .material-icons {
  color: #0f766e;
}

.brainstorm-studio__lens strong {
  display: block;
  font-size: 0.9rem;
}

.brainstorm-studio__lens small {
  display: block;
  color: var(--liberty-text-muted, #64748b);
  font-size: 0.75rem;
  line-height: 1.35;
  margin-top: 0.15rem;
}

.brainstorm-studio__lens--active {
  border-color: #0f766e;
  background: #ecfdf5;
  box-shadow: 0 0 0 1px #0f766e33;
}

.brainstorm-studio__scope {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
}

.brainstorm-studio__seeds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.brainstorm-studio__seed {
  border: 1px dashed #99f6e4;
  background: #f0fdfa;
  color: #115e59;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.brainstorm-studio__seed:hover:not(:disabled) {
  background: #ccfbf1;
}

.brainstorm-studio__seed:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.brainstorm-studio__banner {
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  background: #ecfdf5;
  color: #115e59;
  border: 1px solid #99f6e4;
  font-size: 0.875rem;
}

.brainstorm-studio__banner--error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.brainstorm-studio__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

@media (max-width: 960px) {
  .brainstorm-studio__grid {
    grid-template-columns: 1fr;
  }
}

.brainstorm-studio__chat,
.brainstorm-studio__board {
  display: flex;
  flex-direction: column;
  min-height: 28rem;
}

.brainstorm-studio__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--liberty-border, #e2e8f0);
}

.brainstorm-studio__panel-head h2 {
  margin: 0;
  font-size: 0.95rem;
}

.brainstorm-studio__pulse {
  font-size: 0.75rem;
  color: #0f766e;
  animation: brainstorm-pulse 1.2s ease-in-out infinite;
}

@keyframes brainstorm-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

.brainstorm-studio__activity {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--liberty-border, #e2e8f0);
  background: #f8fafc;
  max-height: 7rem;
  overflow: auto;
}

.brainstorm-studio__activity li {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.78rem;
  color: #475569;
  padding: 0.2rem 0;
}

.brainstorm-studio__activity .material-icons {
  font-size: 0.95rem;
  color: #0f766e;
}

.brainstorm-studio__messages {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 28rem;
}

.brainstorm-studio__empty {
  margin: 0;
  color: var(--liberty-text-muted, #64748b);
  font-size: 0.875rem;
  line-height: 1.45;
}

.brainstorm-studio__msg {
  max-width: 92%;
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  background: #f1f5f9;
}

.brainstorm-studio__msg--user {
  align-self: flex-end;
  background: #ecfdf5;
}

.brainstorm-studio__msg--assistant {
  align-self: flex-start;
}

.brainstorm-studio__msg-role {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.brainstorm-studio__msg-body {
  white-space: pre-wrap;
  font-size: 0.875rem;
  line-height: 1.45;
}

.brainstorm-studio__composer {
  display: flex;
  gap: 0.55rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--liberty-border, #e2e8f0);
  align-items: flex-end;
}

.brainstorm-studio__composer textarea {
  flex: 1;
  resize: vertical;
  min-height: 2.75rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
}

.brainstorm-studio__cards {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 36rem;
  overflow: auto;
}

.brainstorm-studio__card {
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 12px;
  padding: 0.85rem;
  background: #fff;
}

.brainstorm-studio__card--saved {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.brainstorm-studio__card--promoted {
  border-color: #6ee7b7;
  background: #ecfdf5;
}

.brainstorm-studio__card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.brainstorm-studio__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}

.brainstorm-studio__pill {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}

.brainstorm-studio__rationale {
  margin: 0 0 0.5rem;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #334155;
}

.brainstorm-studio__evidence {
  list-style: none;
  margin: 0 0 0.65rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brainstorm-studio__evidence li {
  font-size: 0.78rem;
  color: #475569;
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
}

.brainstorm-studio__ev-kind {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 0.1rem 0.3rem;
  color: #0f766e;
  flex-shrink: 0;
}

.brainstorm-studio__card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.brainstorm-studio__status-ok {
  font-size: 0.8rem;
  color: #047857;
  font-weight: 600;
}

.brainstorm-studio__count {
  font-size: 0.75rem;
  background: #ecfdf5;
  color: #0f766e;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

/* Approval policy — guided attribute-routing builder */
.uc-routing-card {
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcff 0%, #f6f8fd 100%);
  padding: 0.85rem 0.95rem;
  margin: 0.35rem 0 0.9rem;
}
.uc-cond-builder {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.65rem;
}
.uc-cond-builder .app-input {
  height: 2.35rem;
}
.uc-cond-value {
  min-width: 11rem;
  flex: 1 1 11rem;
}
.uc-cond-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 0.25rem 0.35rem 0.25rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 500;
}
.uc-cond-chip__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #6366f1;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.1rem;
  line-height: 1;
}
.uc-cond-chip__x:hover {
  background: #e0e7ff;
  color: #dc2626;
}
.uc-cond-multi {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1 1 12rem;
}
.uc-opt-chip {
  border: 1px solid var(--app-border, #cbd5e1);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.uc-opt-chip:hover {
  border-color: #a5b4fc;
  background: #f5f3ff;
}
.uc-opt-chip--on {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.uc-opt-chip--on:hover {
  background: #4338ca;
  border-color: #4338ca;
}

/* —— Admin: Organizations manager —— */
.orgs-admin {
  display: grid;
  gap: 1rem;
}

.orgs-admin-loading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 2.5rem 1rem;
  color: #64748b;
  font-size: 0.95rem;
}

.orgs-admin-loading .material-icons {
  animation: spin 0.8s linear infinite;
  color: var(--brand-primary, #00bf9a);
}

.orgs-admin-notice {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  color: #065f46;
  background: #ecfdf5;
  font-size: 0.875rem;
}

.orgs-admin-notice .material-icons {
  color: #059669;
}

.orgs-admin-notice-close {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #047857;
  cursor: pointer;
}

.orgs-admin-notice-close:hover {
  background: rgb(16 185 129 / 0.12);
}

.orgs-admin-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.orgs-admin-kpi {
  padding: 1rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.orgs-admin-kpi-label {
  display: block;
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.orgs-admin-kpi strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--brand-dark, #002b49);
  font-size: 1.5rem;
  font-weight: 780;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.orgs-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.orgs-admin-search {
  display: flex;
  flex: 1 1 16rem;
  align-items: center;
  gap: 0.45rem;
  min-width: 14rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  background: #fff;
}

.orgs-admin-search .material-icons {
  color: #94a3b8;
  font-size: 1.15rem;
}

.orgs-admin-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #0f172a;
  font-size: 0.9rem;
}

.orgs-admin-filters {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
}

.orgs-admin-filter {
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  background: transparent;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.orgs-admin-filter--on {
  background: #fff;
  color: var(--brand-dark, #002b49);
  box-shadow: 0 1px 4px rgb(15 23 42 / 0.08);
}

.orgs-admin-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.orgs-admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 64rem;
}

.orgs-admin-table th,
.orgs-admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.orgs-admin-table th {
  color: #64748b;
  background: #f8fafc;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.orgs-admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.orgs-admin-table tbody tr:hover {
  background: #f8fafc;
}

.orgs-admin-row--hidden {
  opacity: 0.72;
}

.orgs-admin-org-link {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  max-width: 22rem;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.orgs-admin-org-link:hover .orgs-admin-org-copy strong {
  color: #0f766e;
  text-decoration: underline;
}

.orgs-admin-avatar {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  color: var(--brand-dark, #002b49);
  background: linear-gradient(145deg, #dffaf2, #e8f4ff);
  font-size: 0.75rem;
  font-weight: 800;
}

.orgs-admin-avatar--lg {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 12px;
  font-size: 0.95rem;
}

.orgs-admin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.orgs-admin-org-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.orgs-admin-org-copy strong {
  overflow: hidden;
  color: var(--brand-dark, #002b49);
  font-size: 0.9rem;
  font-weight: 700;
  text-overflow: ellipsis;
}

.orgs-admin-org-copy span {
  overflow: hidden;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  text-overflow: ellipsis;
}

.orgs-admin-status-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.orgs-admin-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.orgs-admin-pill--demo {
  color: #1d4ed8;
  background: #dbeafe;
}

.orgs-admin-pill--hidden {
  color: #9a3412;
  background: #ffedd5;
}

.orgs-admin-pill--ok {
  color: #047857;
  background: #d1fae5;
}

.orgs-admin-row-actions {
  display: inline-flex;
  gap: 0.2rem;
  justify-content: flex-end;
}

.orgs-admin-icon-btn {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.orgs-admin-icon-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: var(--brand-dark, #002b49);
}

.orgs-admin-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.orgs-admin-icon-btn--danger:hover:not(:disabled) {
  background: #fef2f2;
  color: #b91c1c;
}

.orgs-admin-icon-btn .material-icons {
  font-size: 1.15rem;
}

.orgs-admin-empty {
  display: grid;
  place-items: center;
  gap: 0.5rem;
  padding: 3rem 1rem;
  color: #94a3b8;
  text-align: center;
}

.orgs-admin-empty .material-icons {
  font-size: 2rem;
  opacity: 0.7;
}

.orgs-admin-empty p {
  margin: 0;
  font-size: 0.9rem;
}

.orgs-admin-eyebrow {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: #0f766e;
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.orgs-admin-detail-modal,
.orgs-admin-delete-modal,
.orgs-admin-clone-modal,
.orgs-admin-edit-modal {
  width: min(44rem, calc(100vw - 2rem));
}

.orgs-admin-edit-modal {
  padding: 1.35rem 1.4rem 1.2rem;
}

.orgs-admin-edit-form {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.orgs-admin-edit-form label {
  display: grid;
  gap: 0.35rem;
}

.orgs-admin-edit-form-full {
  grid-column: 1 / -1;
}

.orgs-admin-edit-form span {
  color: #475569;
  font-size: 0.8rem;
  font-weight: 650;
}

.orgs-admin-edit-form input {
  padding: 0.65rem 0.8rem;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  font-size: 0.9rem;
}

.orgs-admin-edit-form input:disabled {
  color: #94a3b8;
  background: #f8fafc;
  cursor: not-allowed;
}

.orgs-admin-edit-form input:focus {
  outline: 2px solid rgb(0 191 154 / 0.35);
  border-color: var(--brand-primary, #00bf9a);
}

.orgs-admin-edit-preview {
  display: flex;
  grid-column: 1 / -1;
  gap: 0.75rem;
  align-items: center;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 650;
}

.orgs-admin-detail-modal {
  max-height: min(90vh, 52rem);
  overflow: auto;
  padding: 1.35rem 1.4rem 1.2rem;
}

.orgs-admin-detail-modal-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.orgs-admin-detail-identity {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
  min-width: 0;
}

.orgs-admin-detail-identity h3 {
  margin: 0;
  color: var(--brand-dark, #002b49);
  font-size: 1.25rem;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.orgs-admin-detail-identity p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0.3rem 0 0;
  color: #64748b;
  font-size: 0.85rem;
}

.orgs-admin-detail-identity code,
.orgs-admin-delete-confirm code,
.orgs-admin-guardrails code {
  padding: 0.05rem 0.35rem;
  border-radius: 6px;
  background: #f1f5f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8em;
}

.orgs-admin-dot {
  color: #cbd5e1;
}

.orgs-admin-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.orgs-admin-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.orgs-admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.orgs-admin-stat {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.8rem 0.85rem;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  background: #f8fafc;
}

.orgs-admin-stat .material-icons {
  color: var(--brand-primary, #00bf9a);
  font-size: 1.25rem;
}

.orgs-admin-stat strong {
  display: block;
  color: var(--brand-dark, #002b49);
  font-size: 1.1rem;
  font-weight: 780;
  line-height: 1.1;
}

.orgs-admin-stat span:last-child {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.25;
}

.orgs-admin-guardrails {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 0.95rem 1rem;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: #fffbeb;
  color: #78350f;
}

.orgs-admin-guardrails .material-icons {
  color: #d97706;
}

.orgs-admin-guardrails strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.85rem;
}

.orgs-admin-guardrails p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.orgs-admin-clone-modal {
  max-height: min(90vh, 52rem);
  overflow: auto;
  padding: 1.35rem 1.4rem 1.2rem;
}

.orgs-admin-clone-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.orgs-admin-clone-head h3 {
  margin: 0.15rem 0 0;
  color: var(--brand-dark, #002b49);
  font-size: 1.2rem;
  font-weight: 780;
}

.orgs-admin-clone-head p {
  margin: 0.4rem 0 0;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
}

.orgs-admin-clone-form {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.orgs-admin-clone-form label,
.orgs-admin-delete-confirm {
  display: grid;
  gap: 0.35rem;
}

.orgs-admin-clone-form span,
.orgs-admin-delete-confirm span {
  color: #475569;
  font-size: 0.8rem;
  font-weight: 650;
}

.orgs-admin-clone-form input,
.orgs-admin-delete-confirm input {
  padding: 0.65rem 0.8rem;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  font-size: 0.9rem;
}

.orgs-admin-clone-form input:focus,
.orgs-admin-delete-confirm input:focus {
  outline: 2px solid rgb(0 191 154 / 0.35);
  border-color: var(--brand-primary, #00bf9a);
}

.orgs-admin-delete-confirm {
  margin: 0.85rem 0 1rem;
}

.orgs-admin-clone-options-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.orgs-admin-clone-options-head strong {
  color: var(--brand-dark, #002b49);
  font-size: 0.9rem;
}

.orgs-admin-clone-options-head span {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 650;
}

.orgs-admin-clone-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

.orgs-admin-clone-opt {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  padding: 0.75rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.orgs-admin-clone-opt:hover {
  border-color: #cbd5e1;
}

.orgs-admin-clone-opt--on {
  border-color: rgb(0 191 154 / 0.45);
  background: #f3fbf8;
}

.orgs-admin-clone-opt input {
  margin-top: 0.2rem;
}

.orgs-admin-clone-opt > .material-icons {
  margin-top: 0.05rem;
  color: var(--brand-primary, #00bf9a);
  font-size: 1.2rem;
}

.orgs-admin-clone-opt-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.orgs-admin-clone-opt-copy strong {
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 700;
}

.orgs-admin-clone-opt-copy small {
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.35;
}

@media (max-width: 960px) {
  .orgs-admin-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orgs-admin-clone-form,
  .orgs-admin-clone-grid,
  .orgs-admin-edit-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .orgs-admin-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .orgs-admin-kpi:last-child {
    grid-column: 1 / -1;
  }
}

/* ── Personal history view switcher & calendars ───────────── */
.tt-page--wide {
  width: 100%;
  max-width: none;
}

.tt-history-views-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.75rem 1.25rem 0;
}

.tt-view-persist-hint {
  margin: 0;
  color: var(--text-secondary, #64748b);
  font-size: 0.72rem;
}

.tt-view-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  background: var(--surface-secondary, #f8fafc);
}

.tt-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary, #64748b);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.tt-view-tab .material-icons {
  font-size: 1.05rem;
}

.tt-view-tab:hover {
  color: var(--text-primary, #1e293b);
  background: rgba(255, 255, 255, 0.7);
}

.tt-view-tab--active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.tt-view-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.tt-view-total {
  color: var(--text-secondary, #64748b);
  font-size: 0.8rem;
}

.tt-view-total strong {
  color: var(--text-primary, #0f172a);
}

.tt-view-hint {
  margin: 0;
  color: var(--text-secondary, #64748b);
  font-size: 0.78rem;
}

.tt-cal-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tt-cal-nav-btn {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.tt-cal-nav-btn:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.tt-cal-nav-btn .material-icons {
  font-size: 1.2rem;
}

.tt-cal-nav-label {
  min-width: 10rem;
  padding: 0 0.35rem;
  color: #0f172a;
  font-size: 0.9rem;
  text-align: center;
  text-transform: capitalize;
}

.tt-cal-nav-today {
  margin-left: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.tt-cal-nav-today:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
}

/* Week */
.tt-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-color, #e2e8f0);
  border-top: 1px solid var(--border-color, #e2e8f0);
  min-height: 22rem;
}

.tt-week-day {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: #fff;
}

.tt-week-day--weekend {
  background: #fafafa;
}

.tt-week-day--today .tt-week-day-head {
  background: #eff6ff;
}

.tt-week-day-head {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.55rem 0.45rem;
  border-bottom: 1px solid #f1f5f9;
}

.tt-week-day-wd {
  color: #94a3b8;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tt-week-day-head strong {
  color: #0f172a;
  font-size: 0.8rem;
}

.tt-week-day-total {
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 700;
}

.tt-week-day-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem;
  overflow: auto;
  max-height: 28rem;
}

.tt-week-empty {
  margin: 0.5rem 0 0;
  color: #cbd5e1;
  font-size: 0.75rem;
  text-align: center;
}

.tt-view-chip {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.15rem 0.35rem;
  padding: 0.35rem 0.4rem;
  border-left: 3px solid var(--tt-chip-color, #94a3b8);
  border-radius: 6px;
  background: #f8fafc;
  font-size: 0.68rem;
  line-height: 1.25;
}

.tt-view-chip--compact {
  grid-template-columns: auto 1fr;
}

.tt-view-chip-time {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.tt-view-chip-dur {
  color: #0f172a;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tt-view-chip-desc {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #1e293b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-view-chip-project {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #64748b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-view-chip--compact .tt-view-chip-project {
  grid-column: 1 / -1;
}

/* Month */
.tt-month-grid {
  padding: 0.75rem 1.25rem 1rem;
}

.tt-month-weekdays,
.tt-month-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.tt-month-weekdays {
  margin-bottom: 0.35rem;
}

.tt-month-wd {
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.tt-month-week + .tt-month-week {
  margin-top: 0.35rem;
}

.tt-month-cell {
  display: flex;
  min-height: 4.4rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.4rem 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.tt-month-cell:hover:not(:disabled) {
  border-color: #93c5fd;
}

.tt-month-cell--out {
  opacity: 0.35;
  cursor: default;
  background: #f8fafc;
}

.tt-month-cell--today {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.tt-month-cell--selected {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.tt-month-cell--h1 {
  background: #eff6ff;
}
.tt-month-cell--h2 {
  background: #dbeafe;
}
.tt-month-cell--h3 {
  background: #bfdbfe;
}
.tt-month-cell--h4 {
  background: #93c5fd;
}

.tt-month-daynum {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
}

.tt-month-cell-dur {
  color: #1e3a8a;
  font-size: 0.68rem;
  font-weight: 700;
}

.tt-month-dots {
  margin-top: auto;
  color: #64748b;
  font-size: 0.65rem;
}

.tt-month-detail {
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding: 0.85rem 1.25rem 1.1rem;
}

.tt-month-detail header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.tt-month-detail header strong {
  color: #0f172a;
  font-size: 0.9rem;
  text-transform: capitalize;
}

.tt-month-detail header span {
  color: #64748b;
  font-size: 0.78rem;
}

.tt-month-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Timesheet */
.tt-timesheet-wrap {
  padding-bottom: 0.5rem;
}

.tt-timesheet-scroll {
  overflow: auto;
  max-height: 36rem;
  padding: 0 1.25rem 1rem;
}

.tt-timesheet {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.75rem;
}

.tt-timesheet th,
.tt-timesheet td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  text-align: center;
}

.tt-timesheet thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
}

.tt-timesheet-sticky {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 11rem;
  text-align: left !important;
  background: #fff;
  box-shadow: 1px 0 0 #e2e8f0;
}

.tt-timesheet thead .tt-timesheet-sticky {
  z-index: 4;
  background: #f8fafc;
}

.tt-timesheet-day {
  min-width: 3.2rem;
}

.tt-timesheet-day .tt-sheet-day-wd {
  display: block;
  color: #94a3b8;
  font-size: 0.62rem;
  text-transform: uppercase;
}

.tt-timesheet-proj {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding-left: 0.25rem;
}

.tt-timesheet-proj strong {
  color: #0f172a;
  font-size: 0.78rem;
}

.tt-timesheet-proj small {
  color: #94a3b8;
  font-size: 0.68rem;
}

.tt-timesheet th.tt-timesheet-sticky {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tt-timesheet-cell--filled {
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tt-timesheet-total-col {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tt-timesheet-empty {
  padding: 2rem !important;
  color: #94a3b8;
}

.tt-timesheet tfoot th,
.tt-timesheet tfoot td {
  background: #f1f5f9;
  font-weight: 700;
}

@media (max-width: 960px) {
  .tt-week-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .tt-week-day-body {
    max-height: 12rem;
  }

  .tt-view-tab-label {
    display: none;
  }

  .tt-month-cell {
    min-height: 3.2rem;
    padding: 0.3rem;
  }

  .tt-month-cell-dur,
  .tt-month-dots {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MÓDULO AUTOMAÇÕES
   Catálogo de robôs, telemetria, faixa de execução e vitrine.

   Mobile não é o desktop encolhido: a tabela vira cartão empilhado, a régua
   horizontal da faixa vira agenda vertical, os painéis laterais viram bottom
   sheets e os KPIs viram carrossel com snap. Cada quebra está comentada no
   ponto onde acontece.
   ═══════════════════════════════════════════════════════════════════════════ */

.auto-module {
  --auto-radius: var(--ds-radius-lg, 12px);
  --auto-line: var(--border-color, #e2e8f0);
  --auto-line-soft: #eef0f4;
  --auto-navy: var(--brand-dark, #002b49);
  --auto-ink: var(--text-primary, #1e293b);
  --auto-muted: var(--text-secondary, #64748b);
  --auto-muted-2: #94a3b8;
  --auto-surface: var(--surface-color, #fff);
  --auto-canvas: #fbfbfd;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: var(--auto-ink);
}

/* ── Abas principais ─────────────────────────────────────────────────────── */

.auto-tabs {
  display: flex;
  gap: 0.375rem;
  padding: 0.3125rem;
  background: #f1f5f9;
  border-radius: var(--ds-radius-pill, 100px);
  align-self: flex-start;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.auto-tabs::-webkit-scrollbar {
  display: none;
}

.auto-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  border-radius: var(--ds-radius-pill, 100px);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--auto-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.auto-tab .material-icons {
  font-size: 1.0625rem;
}
.auto-tab em {
  font-style: normal;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.0625rem 0.4375rem;
  border-radius: 100px;
  background: #e2e8f0;
  color: var(--auto-muted);
}
.auto-tab:hover {
  color: var(--auto-ink);
}
.auto-tab.is-active {
  background: var(--auto-surface);
  color: var(--auto-navy);
  box-shadow: var(--ds-shadow-sm, 0 1px 3px rgb(0 0 0 / 0.08));
}
.auto-tab.is-active em {
  background: var(--brand-primary, #00bf9a);
  color: #fff;
}
.auto-tab__alert {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--error-color, #ef4444);
  animation: auto-pulse-dot 1.6s ease-in-out infinite;
}
@keyframes auto-pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

/* ── Hero adaptativo ─────────────────────────────────────────────────────── */

.auto-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--ds-radius-xl, 16px);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(125deg, #002b49 0%, #06405f 55%, #00566b 100%);
}
.auto-hero--warning {
  background: linear-gradient(125deg, #7c3f00 0%, #a35c05 55%, #b8730a 100%);
}
.auto-hero--danger {
  background: linear-gradient(125deg, #7f1d1d 0%, #9f1239 55%, #b91c1c 100%);
}
.auto-hero__glow {
  position: absolute;
  inset: -50% -20% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 0.16), transparent 65%);
  pointer-events: none;
}
.auto-hero__content {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.auto-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.78);
  margin-bottom: 0.5rem;
}
.auto-hero__eyebrow .material-icons {
  font-size: 1rem;
}
.auto-hero h2 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.375rem;
  color: #fff;
}
.auto-hero p {
  font-size: 0.8125rem;
  color: rgb(255 255 255 / 0.82);
  margin: 0;
  max-width: 56ch;
}
.auto-hero__button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.875rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: var(--ds-radius-pill, 100px);
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.auto-hero__button:hover {
  background: rgb(255 255 255 / 0.22);
}
.auto-hero__button .material-icons {
  font-size: 1.0625rem;
}

.auto-hero__pulse {
  position: relative;
  z-index: 1;
  flex: none;
  width: 190px;
  height: 130px;
}
.auto-hero__ring {
  position: absolute;
  inset: 0 auto 0 0;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 3px solid rgb(255 255 255 / 0.28);
  display: grid;
  place-content: center;
  text-align: center;
  background: rgb(255 255 255 / 0.08);
}
.auto-hero__ring span {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.auto-hero__ring small {
  font-size: 0.5625rem;
  line-height: 1.25;
  color: rgb(255 255 255 / 0.75);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auto-hero__mini {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.3125rem 0.625rem;
  border-radius: var(--ds-radius-pill, 100px);
  background: rgb(255 255 255 / 0.14);
  backdrop-filter: blur(4px);
  font-size: 0.6875rem;
  white-space: nowrap;
}
.auto-hero__mini .material-icons {
  font-size: 0.875rem;
  opacity: 0.85;
}
.auto-hero__mini b {
  font-size: 0.8125rem;
}
.auto-hero__mini small {
  color: rgb(255 255 255 / 0.7);
}
.auto-hero__mini--top {
  top: 8px;
}
.auto-hero__mini--bottom {
  bottom: 8px;
}

.auto-hero__dismiss {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: var(--ds-radius-pill, 100px);
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.auto-hero__dismiss:hover {
  background: rgb(255 255 255 / 0.22);
}
.auto-hero__dismiss .material-icons {
  font-size: 1.125rem;
}

.auto-hero-restore {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid transparent;
  border-radius: var(--ds-radius-xl, 16px);
  color: #fff;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(125deg, #002b49 0%, #06405f 55%, #00566b 100%);
  transition: filter 0.15s;
}
.auto-hero-restore--warning {
  background: linear-gradient(125deg, #7c3f00 0%, #a35c05 55%, #b8730a 100%);
}
.auto-hero-restore--danger {
  background: linear-gradient(125deg, #7f1d1d 0%, #9f1239 55%, #b91c1c 100%);
}
.auto-hero-restore:hover {
  filter: brightness(1.06);
}
.auto-hero-restore > .material-icons {
  font-size: 1.125rem;
  flex: none;
}
.auto-hero-restore__text {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
  min-width: 0;
  flex: 1;
}
.auto-hero-restore__text b {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.78);
}
.auto-hero-restore__text span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
}

/* ── Cabeçalho de seção ──────────────────────────────────────────────────── */

.auto-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.25rem;
}
.auto-section-head__eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auto-muted-2);
}
.auto-section-head h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--auto-navy);
  margin: 0.125rem 0 0;
}
.auto-section-head__note {
  font-size: 0.75rem;
  color: var(--auto-muted);
}

/* ── Stat tiles ──────────────────────────────────────────────────────────── */

.auto-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
}
.auto-kpi-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.auto-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9375rem 1rem;
  background: var(--auto-surface);
  border: 1px solid var(--auto-line);
  border-radius: var(--auto-radius);
  text-align: left;
  width: 100%;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.auto-tile--interactive {
  cursor: pointer;
}
.auto-tile--interactive:hover {
  border-color: #cbd5e1;
  box-shadow: var(--ds-shadow-md, 0 4px 12px rgb(0 0 0 / 0.1));
  transform: translateY(-1px);
}
.auto-tile--interactive:focus-visible {
  outline: none;
  box-shadow: var(--ds-focus-ring, 0 0 0 3px rgb(0 191 154 / 0.2));
}
.auto-tile__icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: var(--auto-muted);
}
.auto-tile__icon .material-icons {
  font-size: 1.125rem;
}
.auto-tile__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.auto-tile__label {
  font-size: 0.75rem;
  color: var(--auto-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}
.auto-tile__badge {
  font-style: normal;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.0625rem 0.375rem;
  border-radius: 100px;
  background: #f3f1fd;
  color: #5b4bc4;
}
.auto-tile__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--auto-navy);
  line-height: 1.15;
  margin-top: 0.125rem;
  font-variant-numeric: tabular-nums;
}
.auto-tile__hint {
  font-size: 0.6875rem;
  color: var(--auto-muted-2);
  margin-top: 0.125rem;
}
.auto-tile__drill {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 1rem;
  color: #cbd5e1;
  transition: color 0.15s;
}
.auto-tile--interactive:hover .auto-tile__drill {
  color: var(--brand-primary, #00bf9a);
}

.auto-tile--success .auto-tile__icon {
  background: #e7f6ef;
  color: #00734a;
}
.auto-tile--danger .auto-tile__icon {
  background: #fdecec;
  color: #b91c1c;
}
.auto-tile--warning .auto-tile__icon {
  background: #fcf0d8;
  color: #8a5a00;
}
.auto-tile--info .auto-tile__icon {
  background: #e0f6fa;
  color: #04566b;
}
.auto-tile--success .auto-tile__value {
  color: #00734a;
}
.auto-tile--danger .auto-tile__value {
  color: #b91c1c;
}

/* ── Toolbar: busca + filtros + ações ────────────────────────────────────── */

.auto-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}
.auto-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 12rem;
  padding: 0 0.75rem;
  height: 2.25rem;
  background: var(--auto-surface);
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
}
.auto-search .material-icons {
  font-size: 1.0625rem;
  color: var(--auto-muted-2);
}
.auto-search input {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  width: 100%;
  color: var(--auto-ink);
}
.auto-search:focus-within {
  border-color: var(--brand-light, #00b6d6);
  box-shadow: var(--ds-focus-ring, 0 0 0 3px rgb(0 191 154 / 0.2));
}

.auto-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.auto-filters select,
.auto-form select,
.auto-form input,
.auto-form textarea,
.auto-form-row input,
.auto-form-row select,
.auto-form-row textarea {
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.4375rem 0.625rem;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  background: var(--auto-surface);
  color: var(--auto-ink);
  height: 2.25rem;
}
.auto-form textarea, .auto-form-row textarea {
  height: auto;
}
.auto-filters select:focus,
.auto-form input:focus,
.auto-form select:focus,
.auto-form textarea:focus {
  outline: none;
  border-color: var(--brand-light, #00b6d6);
  box-shadow: var(--ds-focus-ring, 0 0 0 3px rgb(0 191 154 / 0.2));
}

.auto-toolbar__actions {
  display: flex;
  gap: 0.375rem;
  margin-left: auto;
  align-items: center;
  flex: none;
}

.auto-btn.is-active {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: var(--auto-navy);
}

.auto-filter-menu,
.auto-export-menu {
  position: relative;
}

.auto-filter-menu__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.3125rem;
  border-radius: 999px;
  background: var(--auto-navy);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}

.auto-filter-menu__panel,
.auto-export-menu__panel {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  z-index: 40;
  background: var(--auto-surface);
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  box-shadow: 0 12px 28px rgb(15 23 42 / 0.14);
}

.auto-filter-menu__panel {
  width: min(18.5rem, calc(100vw - 2rem));
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.auto-filter-menu__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--auto-muted-2);
}

.auto-filter-menu__field select {
  width: 100%;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  padding: 0.4375rem 0.625rem;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  background: var(--auto-surface);
  color: var(--auto-ink);
  height: 2.25rem;
}

.auto-filter-menu__field select:focus {
  outline: none;
  border-color: var(--brand-light, #00b6d6);
  box-shadow: var(--ds-focus-ring, 0 0 0 3px rgb(0 191 154 / 0.2));
}

.auto-filter-menu__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.375rem;
  padding-top: 0.25rem;
}

.auto-export-menu__panel {
  min-width: 10.5rem;
  padding: 0.375rem;
  display: flex;
  flex-direction: column;
}

.auto-export-menu__panel button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: none;
  border-radius: var(--ds-radius-sm, 6px);
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--auto-ink);
  cursor: pointer;
  text-align: left;
}

.auto-export-menu__panel button:hover {
  background: #f7f8fb;
}

.auto-export-menu__panel .material-icons {
  font-size: 1.0625rem;
  color: var(--auto-muted);
}

.auto-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin-top: -0.25rem;
}

.auto-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 16rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--auto-line);
  border-radius: 999px;
  background: #f7f8fb;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--auto-navy);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-filter-chip .material-icons {
  font-size: 0.875rem;
  color: var(--auto-muted-2);
}

.auto-filter-chip:hover {
  border-color: #cbd5e1;
  background: #eef2f7;
}

.auto-filter-chips__clear {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--auto-muted);
  cursor: pointer;
  padding: 0.25rem 0.375rem;
}

.auto-filter-chips__clear:hover {
  color: var(--auto-navy);
}

.auto-period {
  display: inline-flex;
  padding: 0.1875rem;
  background: #f1f5f9;
  border-radius: var(--ds-radius-md, 8px);
}
.auto-period button {
  border: none;
  background: transparent;
  padding: 0.3125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--auto-muted);
  border-radius: var(--ds-radius-sm, 6px);
  cursor: pointer;
}
.auto-period button.is-active {
  background: var(--auto-surface);
  color: var(--auto-navy);
  box-shadow: var(--ds-shadow-xs, 0 1px 2px rgb(0 0 0 / 0.06));
}
.auto-period--wide {
  width: 100%;
}
.auto-period--wide button {
  flex: 1;
}

/* ── Botões ──────────────────────────────────────────────────────────────── */

.auto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2.25rem;
  padding: 0 0.875rem;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  background: var(--auto-surface);
  color: var(--auto-ink);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
a.auto-btn:hover,
a.auto-btn:focus,
a.auto-btn:visited {
  text-decoration: none;
}
.auto-btn .material-icons {
  font-size: 1.0625rem;
}
.auto-btn:hover:not(:disabled) {
  background: #f7f8fb;
  border-color: #cbd5e1;
}
.auto-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.auto-btn--primary {
  background: var(--auto-navy);
  border-color: var(--auto-navy);
  color: #fff;
}
.auto-btn--primary:hover:not(:disabled) {
  background: #06405f;
  border-color: #06405f;
}
.auto-btn--danger {
  background: var(--error-color, #ef4444);
  border-color: var(--error-color, #ef4444);
  color: #fff;
}
.auto-btn--danger:hover:not(:disabled) {
  background: #dc2626;
}
.auto-btn--ghost {
  background: transparent;
}
.auto-btn--sm {
  height: 1.875rem;
  padding: 0 0.625rem;
  font-size: 0.75rem;
}
.auto-btn--block {
  width: 100%;
}

/* ── Tabela do catálogo ──────────────────────────────────────────────────── */

.auto-table {
  background: var(--auto-surface);
  border: 1px solid var(--auto-line);
  border-radius: var(--auto-radius);
  overflow: hidden;
}
.auto-table__head,
.auto-table__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px 128px 88px 132px 28px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6875rem 1rem;
  text-align: left;
}
.auto-table__head {
  background: #f7f8fb;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--auto-muted-2);
}
.auto-table__row {
  border: none;
  border-top: 1px solid var(--auto-line-soft);
  background: var(--auto-surface);
  width: 100%;
  font: inherit;
  cursor: pointer;
  transition: background 0.12s;
}
.auto-table__row:hover {
  background: #fafbfd;
}
.auto-table__row:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--brand-primary, #00bf9a);
}
.auto-table__row.is-warn {
  background: #fdfbf5;
}
.auto-table__row.is-warn:hover {
  background: #fbf7ec;
}
.auto-table__main {
  min-width: 0;
  display: block;
}
.auto-table__name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--auto-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auto-table__name b {
  font-weight: 700;
}
.auto-table__sub {
  display: block;
  font-size: 0.71875rem;
  color: var(--auto-muted);
  margin-top: 0.0625rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auto-table__cell {
  font-size: 0.8125rem;
}
.auto-table__label {
  display: none;
}
.auto-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.auto-pos {
  color: #00734a;
}
.auto-neg {
  color: #b91c1c;
}
.auto-table__arrow {
  color: #cbd5e1;
  font-size: 1.125rem;
}
.auto-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e0a312;
  margin-right: 0.375rem;
  vertical-align: 1px;
}
.auto-real {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #e7f6ef;
  color: #00734a;
  font-size: 0.5625rem;
  font-weight: 700;
  font-style: normal;
  margin-left: 0.25rem;
  vertical-align: 1px;
}

/* ── Painéis e grid de análises ──────────────────────────────────────────── */

.auto-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1rem;
}
.auto-panel {
  background: var(--auto-surface);
  border: 1px solid var(--auto-line);
  border-radius: var(--auto-radius);
  padding: 1.125rem 1.25rem 1.25rem;
}
.auto-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.auto-panel__eyebrow {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auto-muted-2);
}
.auto-panel__head h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--auto-navy);
  margin: 0.125rem 0 0;
}
.auto-panel__head p {
  font-size: 0.75rem;
  color: var(--auto-muted);
  margin: 0.1875rem 0 0;
}

/* ── Gráfico de volume ───────────────────────────────────────────────────── */

.auto-volume {
  position: relative;
  padding-bottom: 1.25rem;
}
.auto-volume__grid {
  position: absolute;
  inset: 0 0 2.75rem 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.auto-volume__grid i {
  display: block;
  height: 1px;
  background: #f1f5f9;
}
.auto-volume__cols {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  height: 150px;
}
.auto-volume__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  min-width: 0;
}
.auto-volume__col:disabled {
  cursor: default;
}
.auto-volume__col b {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--auto-muted);
  font-variant-numeric: tabular-nums;
  height: 0.875rem;
}
.auto-volume__track {
  width: 100%;
  max-width: 34px;
  flex: 1;
  display: flex;
  align-items: flex-end;
  background: #f7f8fb;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
}
.auto-volume__track i {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, #00b6d6, #00bf9a);
  border-radius: 5px 5px 0 0;
  transition: height 0.3s ease, filter 0.15s;
}
.auto-volume__col:hover .auto-volume__track i {
  filter: brightness(1.1);
}
.auto-volume__col:hover b {
  color: var(--auto-navy);
}
.auto-volume__col small {
  font-size: 0.5625rem;
  color: var(--auto-muted-2);
  white-space: nowrap;
}

/* ── Donut (SVG) ─────────────────────────────────────────────────────────── */

.auto-donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.auto-donut {
  flex: none;
  width: 148px;
  height: 148px;
  position: relative;
  display: grid;
  place-items: center;
}
.auto-donut__svg {
  width: 148px;
  height: 148px;
  transform: rotate(-90deg);
  overflow: visible;
}
.auto-donut__track {
  stroke: #eef1f5;
  stroke-width: 3.6;
}
.auto-donut__slice {
  stroke-width: 3.6;
  transition: stroke-width 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
  animation: auto-donut-in 0.65s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: var(--donut-delay, 0ms);
  transform-origin: 18px 18px;
}
.auto-donut-wrap.is-interactive .auto-donut__slice {
  cursor: pointer;
  outline: none;
}
.auto-donut-wrap.is-interactive .auto-donut__slice:hover,
.auto-donut-wrap.is-interactive .auto-donut__slice:focus-visible,
.auto-donut__slice.is-hot {
  stroke-width: 4.6;
  filter: brightness(1.05);
}
.auto-donut__slice.is-dim {
  opacity: 0.38;
}
@keyframes auto-donut-in {
  from {
    opacity: 0;
    stroke-width: 1.5;
  }
  to {
    opacity: 1;
    stroke-width: 3.6;
  }
}
.auto-donut__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.auto-donut__center strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--auto-navy);
  line-height: 1;
}
.auto-donut__center span {
  font-size: 0.625rem;
  color: var(--auto-muted);
}
.auto-donut__legend {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  min-width: 0;
}
.auto-donut__key {
  display: grid;
  grid-template-columns: 10px 1fr auto auto 1rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.5rem;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--ds-radius-sm, 6px);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  text-align: left;
  color: var(--auto-ink);
  transition: background 0.15s, border-color 0.15s;
}
.auto-donut__key:disabled {
  cursor: default;
  grid-template-columns: 10px 1fr auto auto;
}
.auto-donut__key:hover:not(:disabled),
.auto-donut__key.is-hot:not(:disabled) {
  background: #f7f8fb;
  border-color: #e8edf2;
}
.auto-donut__key i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.auto-donut__key span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auto-donut__key span .material-icons {
  font-size: 0.875rem;
  color: var(--auto-muted-2);
}
.auto-donut__key b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.auto-donut__key small {
  color: var(--auto-muted-2);
  font-variant-numeric: tabular-nums;
}
.auto-donut__key em {
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--auto-muted-2);
  justify-self: end;
}
.auto-donut__key:hover:not(:disabled) em,
.auto-donut__key.is-hot:not(:disabled) em {
  color: var(--auto-navy);
}

/* ── Barras ranqueadas ───────────────────────────────────────────────────── */

.auto-ranked {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.auto-ranked__row {
  display: grid;
  grid-template-columns: 22px 1fr auto 18px;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4375rem 0.375rem;
  border: none;
  background: transparent;
  border-radius: var(--ds-radius-sm, 6px);
  font: inherit;
  cursor: pointer;
  text-align: left;
  color: var(--auto-ink);
}
.auto-ranked__row:disabled {
  cursor: default;
}
.auto-ranked__row:hover:not(:disabled) {
  background: #f7f8fb;
}
.auto-ranked__rank {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--auto-muted-2);
  font-variant-numeric: tabular-nums;
}
.auto-ranked__body {
  min-width: 0;
}
.auto-ranked__label {
  display: block;
  font-size: 0.78125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auto-ranked__label em {
  font-style: normal;
  color: var(--auto-muted-2);
  font-size: 0.6875rem;
  margin-left: 0.375rem;
}
.auto-ranked__track {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: #f1f5f9;
  margin-top: 0.25rem;
  overflow: hidden;
}
.auto-ranked__track i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #00b6d6, #00bf9a);
  transition: width 0.35s ease;
}
.auto-ranked__row b {
  font-size: 0.78125rem;
  font-variant-numeric: tabular-nums;
}
.auto-ranked__arrow {
  font-size: 0.9375rem;
  color: #cbd5e1;
}
.auto-ranked__row:hover .auto-ranked__arrow {
  color: var(--brand-primary, #00bf9a);
}

/* ── Distribuição de ciclo de vida ───────────────────────────────────────── */

.auto-lifecycle {
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
}
.auto-lifecycle__row {
  display: grid;
  grid-template-columns: 148px 1fr 28px 18px;
  align-items: center;
  gap: 0.625rem;
  padding: 0.25rem 0.375rem;
  border: none;
  background: transparent;
  border-radius: var(--ds-radius-sm, 6px);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.auto-lifecycle__row:hover {
  background: #f7f8fb;
}
.auto-lifecycle__arrow {
  font-size: 1rem;
  color: var(--auto-muted-2);
}
.auto-lifecycle__row:hover .auto-lifecycle__arrow {
  color: var(--auto-navy);
}
.auto-lifecycle__track {
  height: 8px;
  border-radius: 4px;
  background: #f1f5f9;
  overflow: hidden;
}
.auto-lifecycle__fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #94a3b8;
  transition: width 0.35s ease;
}
.auto-lifecycle__fill--producao {
  background: #00995d;
}
.auto-lifecycle__fill--sustentacao {
  background: #38536e;
}
.auto-lifecycle__fill--homolog {
  background: #10b7d4;
}
.auto-lifecycle__fill--dev {
  background: #5b4bc4;
}
.auto-lifecycle__fill--aprovada {
  background: #1b5a8c;
}
.auto-lifecycle__fill--estudo {
  background: #e0a312;
}
.auto-lifecycle__fill--descontinuada {
  background: #b6b6b6;
}
.auto-lifecycle__row b {
  font-size: 0.8125rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── Chips ───────────────────────────────────────────────────────────────── */

.auto-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.1875rem;
  font-size: 0.65625rem;
  font-weight: 600;
  padding: 0.1875rem 0.5rem;
  border-radius: 11px;
  white-space: nowrap;
  background: #f1f5f9;
  color: #475569;
}
.auto-chip .material-icons {
  font-size: 0.75rem;
}
.auto-chip--producao {
  background: #e7f6ef;
  color: #00734a;
}
.auto-chip--sustentacao {
  background: #eef3f8;
  color: #38536e;
}
.auto-chip--homolog {
  background: #e0f6fa;
  color: #04566b;
}
.auto-chip--dev {
  background: #f3f1fd;
  color: #5b4bc4;
}
.auto-chip--aprovada {
  background: #eaf3fb;
  color: #1b5a8c;
}
.auto-chip--estudo {
  background: #fcf0d8;
  color: #8a5a00;
}
.auto-chip--descontinuada {
  background: #f1f1f1;
  color: #767676;
}
.auto-chip--danger {
  background: #fdecec;
  color: #b91c1c;
}
.auto-chip--warning {
  background: #fcf0d8;
  color: #8a5a00;
}
.auto-chip--info {
  background: #e0f6fa;
  color: #04566b;
}
.auto-chip--realizado {
  background: #e7f6ef;
  color: #00734a;
}
.auto-chip--estimado {
  background: #f3f1fd;
  color: #5b4bc4;
}
.auto-chip--protected {
  background: #002b49;
  color: #cfe3f2;
}

/* ── Medidor ─────────────────────────────────────────────────────────────── */

.auto-meter {
  min-width: 140px;
}
.auto-meter__head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.6875rem;
  color: var(--auto-muted);
  margin-bottom: 0.25rem;
}
.auto-meter__head b {
  color: var(--auto-navy);
  font-variant-numeric: tabular-nums;
}
.auto-meter__track {
  height: 8px;
  border-radius: 4px;
  background: #eef0f4;
  overflow: hidden;
}
.auto-meter__track i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #00b6d6;
  transition: width 0.35s ease;
}
.auto-meter__track--success i {
  background: #00995d;
}
.auto-meter__track--warning i {
  background: #e0a312;
}
.auto-meter__track--danger i {
  background: #ef4444;
}
.auto-meter__track--info i {
  background: #00b6d6;
}

/* ── Vazios e carregamento ───────────────────────────────────────────────── */

.auto-empty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--auto-muted);
  padding: 1.5rem 0;
  justify-content: center;
}
.auto-empty .material-icons {
  font-size: 1.0625rem;
  color: var(--auto-muted-2);
}

.auto-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--auto-surface);
  border: 1px dashed var(--auto-line);
  border-radius: var(--auto-radius);
}
.auto-empty-state > .material-icons {
  font-size: 2.25rem;
  color: #cbd5e1;
}
.auto-empty-state strong {
  font-size: 0.9375rem;
  color: var(--auto-navy);
}
.auto-empty-state p {
  font-size: 0.8125rem;
  color: var(--auto-muted);
  margin: 0;
  max-width: 46ch;
}
.auto-empty-state > *:last-child {
  margin-top: 0.5rem;
}

.auto-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 4rem;
  color: var(--auto-muted);
  font-size: 0.875rem;
}
.auto-loading .material-icons {
  animation: auto-spin 1.4s linear infinite;
  color: var(--brand-primary, #00bf9a);
}
@keyframes auto-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Slide-over: drilldown e ficha ───────────────────────────────────────── */

body.auto-sheet-open {
  overflow: hidden;
}

.auto-sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.auto-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgb(13 42 74 / 0.34);
  cursor: pointer;
  animation: auto-fade 0.18s ease;
}
@keyframes auto-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.auto-sheet, .auto-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100%);
  background: var(--auto-canvas);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgb(13 42 74 / 0.14);
  animation: auto-slide-in 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}
.auto-drawer {
  width: min(620px, 100%);
}
@keyframes auto-slide-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: none;
  }
}

.auto-sheet__header, .auto-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--auto-surface);
  border-bottom: 1px solid var(--auto-line);
}
.auto-sheet__eyebrow {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auto-muted-2);
}
.auto-sheet__header h2, .auto-drawer__header h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--auto-navy);
  margin: 0.125rem 0 0;
}
.auto-sheet__close {
  flex: none;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  background: var(--auto-surface);
  color: var(--auto-muted);
  cursor: pointer;
  line-height: 0;
}
.auto-sheet__close-icon {
  display: block;
  flex: none;
}
.auto-sheet__close:hover {
  background: #f1f5f9;
  color: var(--auto-ink);
}
.auto-sheet__description {
  padding: 0.875rem 1.25rem 0;
  font-size: 0.8125rem;
  color: var(--auto-muted);
  margin: 0;
}
.auto-sheet__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 0;
}
.auto-sheet__summary > span {
  display: inline-flex;
  flex-direction: column;
  gap: 0.0625rem;
  min-width: 5.5rem;
  padding: 0.5rem 0.6875rem;
  border-radius: var(--ds-radius-md, 8px);
  background: #f7f8fb;
  border: 1px solid var(--auto-line);
}
.auto-sheet__summary > span.is-warn {
  background: #fff7ed;
  border-color: #fed7aa;
}
.auto-sheet__summary b {
  font-size: 0.8125rem;
  color: var(--auto-navy);
  font-variant-numeric: tabular-nums;
}
.auto-sheet__summary em {
  font-style: normal;
  font-size: 0.625rem;
  color: var(--auto-muted-2);
  letter-spacing: 0.02em;
}
.auto-sheet__list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem 0.5rem;
}
.auto-sheet__list-head strong {
  font-size: 1.125rem;
  color: var(--auto-navy);
  margin-right: 0.3125rem;
}
.auto-sheet__list-head span {
  font-size: 0.8125rem;
  color: var(--auto-muted);
}
.auto-sheet__search {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.5rem;
  height: 1.875rem;
  background: var(--auto-surface);
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
}
.auto-sheet__search .material-icons {
  font-size: 0.9375rem;
  color: var(--auto-muted-2);
}
.auto-sheet__search input {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  width: 130px;
}
.auto-sheet__items {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.auto-sheet__item {
  position: relative;
  display: block;
  text-align: left;
  padding: 0.75rem 2.25rem 0.75rem 0.875rem;
  background: var(--auto-surface);
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auto-sheet__item:hover {
  border-color: #cbd5e1;
  box-shadow: var(--ds-shadow-sm, 0 1px 3px rgb(0 0 0 / 0.08));
}
.auto-sheet__item-code {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--auto-muted-2);
}
.auto-sheet__item strong {
  display: block;
  font-size: 0.8125rem;
  color: var(--auto-navy);
  margin-top: 0.0625rem;
}
.auto-sheet__item-meta {
  display: flex;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: var(--auto-muted);
  margin-top: 0.125rem;
  flex-wrap: wrap;
}
.auto-sheet__item-meta i {
  color: #cbd5e1;
  font-style: normal;
}
.auto-sheet__item-badges {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-top: 0.4375rem;
}
.auto-sheet__item-metric {
  position: absolute;
  top: 0.75rem;
  right: 2.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--auto-navy);
  font-variant-numeric: tabular-nums;
}
.auto-sheet__item-arrow {
  position: absolute;
  bottom: 0.75rem;
  right: 0.875rem;
  font-size: 1rem;
  color: #cbd5e1;
}
.auto-sheet__item:hover .auto-sheet__item-arrow {
  color: var(--brand-primary, #00bf9a);
}
.auto-sheet__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--auto-muted);
}
.auto-sheet__empty .material-icons {
  font-size: 2rem;
  color: #cbd5e1;
}
.auto-sheet__empty strong {
  color: var(--auto-navy);
  font-size: 0.875rem;
}
.auto-sheet__empty p {
  font-size: 0.8125rem;
  margin: 0;
}

/* ── Ficha da automação ──────────────────────────────────────────────────── */

.auto-drawer__code {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--brand-light, #00b6d6);
}
.auto-drawer__badges {
  display: flex;
  gap: 0.3125rem;
  flex-wrap: wrap;
  margin-top: 0.4375rem;
}
.auto-drawer__tabs {
  display: flex;
  gap: 0.375rem;
  padding: 0.625rem 1.5rem 0;
  background: var(--auto-surface);
  border-bottom: 1px solid var(--auto-line);
  overflow-x: auto;
  scrollbar-width: none;
  /* Keep first/last tabs clear of the drawer edge while scrolling. */
  scroll-padding-inline: 1.5rem;
}
.auto-drawer__tabs::-webkit-scrollbar {
  display: none;
}
.auto-drawer__tabs button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex: none;
  padding: 0.5625rem 0.75rem;
  margin: 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 0.78125rem;
  font-weight: 600;
  color: var(--auto-muted);
  cursor: pointer;
  white-space: nowrap;
  white-space: nowrap;
}
.auto-drawer__tabs button .material-icons {
  font-size: 1rem;
}
.auto-drawer__tabs button:hover {
  color: var(--auto-ink);
}
.auto-drawer__tabs button.is-active {
  color: var(--auto-navy);
  border-bottom-color: var(--brand-primary, #00bf9a);
}
.auto-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.auto-drawer__lead {
  font-size: 0.84375rem;
  color: var(--auto-ink);
  margin: 0;
  line-height: 1.55;
}
.auto-drawer__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.auto-box {
  background: var(--auto-surface);
  border: 1px solid var(--auto-line);
  border-radius: var(--auto-radius);
  padding: 0.9375rem 1rem;
}
.auto-box h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--auto-muted-2);
  margin: 0 0 0.75rem;
}
.auto-box__link {
  display: inline-flex;
  align-items: center;
  gap: 0.1875rem;
  font-size: 0.625rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--brand-light, #00b6d6);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.auto-box__link .material-icons {
  font-size: 0.75rem;
}
.auto-box__link:hover {
  text-decoration: underline;
}
.auto-box__note {
  display: flex;
  align-items: flex-start;
  gap: 0.4375rem;
  font-size: 0.71875rem;
  color: var(--auto-muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}
.auto-box__note > span:last-child {
  flex: 1;
  min-width: 0;
}
.auto-box__note .material-icons {
  font-size: 0.875rem;
  flex: none;
  margin-top: 1px;
}

.auto-declare__fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}
.auto-declare__fields label {
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
  min-width: 0;
  font-size: 0.75rem;
  color: var(--auto-muted);
}
.auto-declare__fields input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.4375rem 0.625rem;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  background: var(--auto-surface);
  color: var(--auto-ink);
  height: 2.25rem;
}
.auto-declare__fields input:focus {
  outline: none;
  border-color: var(--brand-light, #00b6d6);
  box-shadow: var(--ds-focus-ring, 0 0 0 3px rgb(0 191 154 / 0.2));
}
.auto-declare__actions {
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 560px) {
  .auto-declare__fields {
    grid-template-columns: 1fr;
  }
  .auto-declare__actions {
    justify-content: stretch;
  }
  .auto-declare__actions .auto-btn {
    width: 100%;
    justify-content: center;
  }
}

.auto-trail {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--auto-muted);
  margin-bottom: 0.75rem;
}
.auto-trail .material-icons {
  font-size: 0.875rem;
  color: #cbd5e1;
}
.auto-trail b {
  background: #e0f6fa;
  color: #04566b;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
}

.auto-rows {
  margin: 0;
}
.auto-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.375rem 0;
  font-size: 0.78125rem;
  border-top: 1px solid var(--auto-line-soft);
}
.auto-rows > div:first-child {
  border-top: none;
}
.auto-rows dt {
  color: var(--auto-muted);
  margin: 0;
}
.auto-rows dd {
  margin: 0;
  text-align: right;
  color: var(--auto-ink);
}
.auto-mini__hint {
  display: block;
  font-size: 0.6875rem;
  color: var(--auto-muted);
}

.auto-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 0.5rem;
}
.auto-mini-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}
.auto-mini {
  background: #f7f8fb;
  border-radius: var(--ds-radius-md, 8px);
  padding: 0.5rem 0.625rem;
}
.auto-mini small {
  display: block;
  font-size: 0.625rem;
  color: var(--auto-muted);
  margin-bottom: 0.125rem;
}
.auto-mini b {
  font-size: 0.9375rem;
  color: var(--auto-navy);
  font-variant-numeric: tabular-nums;
}

.auto-gate {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-top: 0.875rem;
  padding: 0.6875rem 0.8125rem;
  border-radius: var(--ds-radius-md, 8px);
  font-size: 0.75rem;
}
.auto-gate .material-icons {
  font-size: 1.125rem;
  flex: none;
}
.auto-gate strong {
  display: block;
  font-size: 0.8125rem;
}
.auto-gate p {
  margin: 0.125rem 0 0;
  line-height: 1.5;
}
.auto-gate__hint {
  opacity: 0.85;
  font-size: 0.6875rem;
}
.auto-gate--ok {
  background: #e7f6ef;
  color: #00734a;
}
.auto-gate--block {
  background: #fcf0d8;
  color: #8a5a00;
}

.auto-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78125rem;
}
.auto-compare th {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--auto-muted-2);
  text-align: right;
  padding: 0 0 0.4375rem;
}
.auto-compare th:first-child {
  text-align: left;
}
.auto-compare td {
  padding: 0.4375rem 0;
  border-top: 1px solid var(--auto-line-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.auto-compare td:first-child {
  text-align: left;
  color: var(--auto-muted);
}
.auto-dev-alert {
  color: #b91c1c;
  font-weight: 700;
}

.auto-hold, .auto-blocked, .auto-collision, .auto-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--ds-radius-md, 8px);
  font-size: 0.78125rem;
  line-height: 1.55;
}
.auto-hold {
  background: #f3f1fd;
  border: 1px solid #dfdaf7;
  color: #4c3fae;
}
.auto-blocked {
  background: #fcf0d8;
  border: 1px solid #f0dcae;
  color: #8a5a00;
  margin-top: 0.75rem;
}
.auto-collision {
  background: #fdecec;
  border: 1px solid #f1c3c3;
  color: #7f1d1d;
  margin-top: 0.75rem;
}
.auto-collision--warn {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}
.auto-banner {
  background: #e0f6fa;
  border: 1px solid #b7e7f1;
  color: #04566b;
}
.auto-hold .material-icons,
.auto-blocked .material-icons,
.auto-collision .material-icons,
.auto-banner .material-icons {
  font-size: 1.125rem;
  flex: none;
  margin-top: 1px;
}
.auto-hold strong,
.auto-blocked strong,
.auto-collision strong,
.auto-banner strong {
  display: block;
  font-size: 0.8125rem;
  margin-bottom: 0.125rem;
}
.auto-hold p, .auto-blocked p, .auto-collision p, .auto-banner p {
  margin: 0 0 0.25rem;
}
.auto-hold a, .auto-banner a {
  color: inherit;
  font-weight: 600;
}

.auto-warnbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #fcf0d8;
  border-radius: var(--ds-radius-md, 8px);
  padding: 0.6875rem 0.8125rem;
  font-size: 0.75rem;
  color: #8a5a00;
  margin: 0 0 0.875rem;
  line-height: 1.5;
}
.auto-warnbox > :not(.material-icons) {
  flex: 1;
  min-width: 0;
}
.auto-warnbox .material-icons {
  font-size: 1rem;
  flex: none;
}

.auto-okbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #e8f7ef;
  border-radius: var(--ds-radius-md, 8px);
  padding: 0.6875rem 0.8125rem;
  font-size: 0.75rem;
  color: #1e5c3c;
  margin: 0.5rem 0 0.75rem;
  line-height: 1.5;
}
.auto-okbox > :not(.material-icons) {
  flex: 1;
  min-width: 0;
}
.auto-okbox .material-icons {
  font-size: 1rem;
  flex: none;
}

.auto-history {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--auto-line);
  padding-top: 0.75rem;
}
.auto-history li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--auto-ink);
  line-height: 1.4;
}
.auto-history time {
  color: var(--auto-muted);
  font-variant-numeric: tabular-nums;
}

.auto-checkgroup {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.auto-checkgroup legend {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--auto-muted);
  margin-bottom: 0.375rem;
  width: 100%;
}

.auto-evidence-upload {
  margin: 0.75rem 0 1rem;
}
.auto-file {
  position: relative;
  display: inline-flex !important;
  flex-direction: row !important;
  width: auto !important;
  cursor: pointer;
}
.auto-file input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.auto-evidence-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.auto-evidence-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  background: var(--auto-surface);
}
.auto-evidence-item > .material-icons {
  font-size: 1.25rem;
  color: var(--auto-muted);
  margin-top: 0.125rem;
}
.auto-evidence-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  font-size: 0.75rem;
  color: var(--auto-muted);
}
.auto-evidence-item__body b {
  color: var(--auto-ink);
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auto-evidence-item__body em {
  font-style: normal;
  color: var(--auto-ink-2, var(--auto-muted));
}
.auto-evidence-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex: none;
}
.auto-empty-inline {
  font-size: 0.75rem;
  color: var(--auto-muted);
  margin: 0.5rem 0 0;
}
.auto-queue__sla {
  margin: 0 0 0.75rem;
}
.auto-queue__list li.is-sla-breach {
  background: #fcf0d8;
  border-color: #f0d59a;
}

.auto-origin {
  font-size: 0.71875rem;
  color: var(--auto-muted);
  margin: 0.75rem 0 0;
}
.auto-origin b {
  color: var(--auto-navy);
}

.auto-hint {
  font-size: 0.71875rem;
  color: var(--auto-muted);
  margin: 0.5rem 0 0;
  line-height: 1.55;
}
.auto-hint code, .auto-hold code {
  background: #f1f5f9;
  padding: 0.0625rem 0.3125rem;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Ciclo de vida — status atual + ações (não um seletor de pills) */
.auto-lifecycle-now {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}
.auto-lifecycle-now__label {
  font-size: 0.75rem;
  color: var(--auto-muted);
}
.auto-lifecycle-path {
  list-style: none;
  margin: 0 0 0.875rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.125rem;
  align-items: center;
}
.auto-lifecycle-path__step {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  font-size: 0.6875rem;
  color: #94a3b8;
}
.auto-lifecycle-path__step:not(:last-child)::after {
  content: "";
  width: 0.75rem;
  height: 1px;
  background: #e2e8f0;
  margin: 0 0.125rem 0 0.25rem;
}
.auto-lifecycle-path__dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: #cbd5e1;
  flex: none;
}
.auto-lifecycle-path__step.is-done {
  color: #64748b;
}
.auto-lifecycle-path__step.is-done .auto-lifecycle-path__dot {
  background: #00995d;
}
.auto-lifecycle-path__step.is-here {
  color: var(--auto-navy);
  font-weight: 700;
}
.auto-lifecycle-path__step.is-here .auto-lifecycle-path__dot {
  background: var(--auto-navy);
  box-shadow: 0 0 0 3px rgb(0 43 73 / 0.15);
}
.auto-lifecycle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.auto-btn--danger-ghost {
  color: #b91c1c;
  border-color: #fecaca;
}
.auto-btn--danger-ghost:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #fca5a5;
}

.auto-inline {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.auto-inline label {
  font-size: 0.6875rem;
  color: var(--auto-muted);
}
.auto-inline input {
  display: block;
  margin-top: 0.1875rem;
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
}
.auto-inline__note {
  font-size: 0.6875rem;
  color: var(--auto-muted);
  flex: 1 1 180px;
}

.auto-justify {
  margin-top: 0.75rem;
}
.auto-justify label {
  display: block;
  font-size: 0.6875rem;
  color: var(--auto-muted);
}
.auto-justify textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.5rem;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  resize: vertical;
}
.auto-justify__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

/* Formulários */
.auto-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.auto-form > label, .auto-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--auto-muted);
  position: relative;
}
.auto-field__label {
  font-size: 0.75rem;
  color: var(--auto-muted);
}
.auto-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.625rem;
}
.auto-form-row label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--auto-muted);
}
.auto-counter {
  position: absolute;
  right: 0.5rem;
  bottom: 0.375rem;
  font-size: 0.625rem;
  font-style: normal;
  color: var(--auto-muted-2);
}

.auto-days {
  display: flex;
  gap: 0.3125rem;
  flex-wrap: wrap;
}
.auto-day {
  border: 1px solid var(--auto-line);
  background: var(--auto-surface);
  border-radius: 8px;
  padding: 0.375rem 0.75rem;
  font: inherit;
  font-size: 0.75rem;
  color: var(--auto-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.auto-day.is-on {
  background: #e0f6fa;
  border-color: #b7e7f1;
  color: #04566b;
  font-weight: 700;
}
.auto-day:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Especificidade acima de `.auto-form > label` (0,1,1), senão o checkbox
   herda flex-direction:column e cai numa linha só dele. */
.auto-form > label.auto-check,
.auto-check {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.75rem;
  line-height: 1.45;
  cursor: pointer;
}
.auto-check input {
  width: auto;
  flex: none;
  margin: 2px 0 0;
  height: auto;
  accent-color: var(--brand-primary, #00bf9a);
}
.auto-check b {
  display: block;
  color: var(--auto-ink);
  font-size: 0.78125rem;
}
.auto-check em {
  font-style: normal;
  color: var(--auto-muted);
}

.auto-resume {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  font-size: 0.75rem;
  color: #04566b;
  background: #e0f6fa;
  border-radius: var(--ds-radius-md, 8px);
  padding: 0.5rem 0.75rem;
}
.auto-resume .material-icons {
  font-size: 1rem;
}

/* Código de integração */
.auto-code {
  background: var(--auto-navy);
  color: #cfe3f2;
  border-radius: var(--ds-radius-md, 8px);
  padding: 0.75rem 0.8125rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.6875rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  margin: 0;
}
.auto-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.1875rem;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-sm, 6px);
  background: var(--auto-surface);
  padding: 0.1875rem 0.4375rem;
  font: inherit;
  font-size: 0.625rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--auto-muted);
  cursor: pointer;
}
.auto-copy .material-icons {
  font-size: 0.75rem;
}
.auto-copy:hover {
  background: #f1f5f9;
  color: var(--auto-ink);
}

/* ── Calendário da faixa ─────────────────────────────────────────────────── */

.auto-lane-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auto-lane-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1rem;
  align-items: start;
}
.auto-lane-main {
  min-width: 0;
}

.auto-daytabs {
  display: flex;
  gap: 0.3125rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}
.auto-daytab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  border: 1px solid var(--auto-line);
  background: var(--auto-surface);
  border-radius: 11px;
  padding: 0.3125rem 0.75rem;
  font: inherit;
  font-size: 0.75rem;
  color: var(--auto-muted);
  cursor: pointer;
}
.auto-daytab em {
  font-style: normal;
  font-size: 0.625rem;
  color: var(--auto-muted-2);
}
.auto-daytab.is-today {
  border-color: #b7e7f1;
}
.auto-daytab.is-active {
  background: var(--auto-navy);
  border-color: var(--auto-navy);
  color: #fff;
  font-weight: 700;
}
.auto-daytab.is-active em {
  color: rgb(255 255 255 / 0.7);
}
.auto-daytab__alert {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--error-color, #ef4444);
}

.auto-lane-timeline {
  padding-bottom: 1.375rem;
  margin-bottom: 0.875rem;
}
.auto-lane-track {
  position: relative;
  height: 58px;
  background: #f7f8fb;
  border: 1px solid var(--auto-line-soft);
  border-radius: var(--ds-radius-md, 8px);
}
.auto-lane-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #ebeef2;
}
.auto-lane-ticklab {
  position: absolute;
  bottom: -1.125rem;
  font-size: 0.5625rem;
  color: var(--auto-muted-2);
  transform: translateX(-50%);
  white-space: nowrap;
}
.auto-lane-win {
  position: absolute;
  top: 5px;
  bottom: 5px;
  background: #10b7d4;
  border: none;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 0 0.375rem;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 3px rgb(4 86 107 / 0.25);
  transition: filter 0.15s;
}
.auto-lane-win:hover {
  filter: brightness(1.08);
}
.auto-lane-win small {
  color: #04324a;
  font-size: 0.59375rem;
  font-weight: 700;
  white-space: nowrap;
}
.auto-lane-win.is-protected {
  background: var(--auto-navy);
}
.auto-lane-win.is-protected small {
  color: #cfe3f2;
}
.auto-lane-win.is-attended {
  box-shadow: inset 0 0 0 2px #f59e0b;
}
.auto-lane-win.is-collide {
  background: #f5b5b5;
  outline: 2px solid var(--error-color, #ef4444);
  outline-offset: -2px;
}
.auto-lane-win.is-collide small {
  color: #661111;
}
.auto-lane-now {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--error-color, #ef4444);
  z-index: 3;
}
.auto-lane-now::after {
  content: "agora";
  position: absolute;
  top: -14px;
  left: -13px;
  font-size: 0.5625rem;
  color: var(--error-color, #ef4444);
  font-weight: 700;
}

.auto-agenda {
  list-style: none;
  margin: 0;
  padding: 0;
}
.auto-agenda__row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.375rem;
  border: none;
  border-top: 1px solid var(--auto-line-soft);
  background: transparent;
  font: inherit;
  font-size: 0.78125rem;
  cursor: pointer;
  text-align: left;
  border-radius: var(--ds-radius-sm, 6px);
}
.auto-agenda li:first-child .auto-agenda__row {
  border-top: none;
}
.auto-agenda__row:hover {
  background: #f7f8fb;
}
.auto-agenda__row.is-collide {
  background: #fdf6f6;
}
.auto-agenda__dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
  background: #10b7d4;
}
.auto-agenda__dot.is-protected {
  background: var(--auto-navy);
}
.auto-agenda__row time {
  font-variant-numeric: tabular-nums;
  color: var(--auto-muted);
  width: 104px;
  flex: none;
  font-size: 0.75rem;
}
.auto-agenda__name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auto-agenda__name b {
  color: var(--auto-navy);
  margin-right: 0.375rem;
}
.auto-agenda__tags {
  display: flex;
  gap: 0.25rem;
  flex: none;
}
.auto-agenda__dur {
  color: var(--auto-muted-2);
  font-size: 0.71875rem;
  flex: none;
}

/* Fila ao vivo */
.auto-queue {
  background: var(--auto-surface);
  border: 1px solid var(--auto-line);
  border-radius: var(--auto-radius);
  padding: 1rem;
  position: sticky;
  top: calc(var(--app-header-offset, 4rem) + 0.75rem);
}
.auto-queue__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.auto-queue__head h3 {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--auto-muted-2);
  margin: 0;
}
.auto-queue__live {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.5625rem;
  color: var(--auto-muted-2);
}
.auto-queue__live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00995d;
  animation: auto-pulse-dot 1.8s ease-in-out infinite;
}
.auto-running {
  background: #e7f6ef;
  border: 1px solid #bfe6d3;
  border-radius: var(--ds-radius-md, 8px);
  padding: 0.6875rem 0.75rem;
  margin-bottom: 0.75rem;
}
.auto-running small {
  display: block;
  font-size: 0.625rem;
  color: #1e5c3c;
}
.auto-running b {
  font-size: 0.8125rem;
  color: #00734a;
}
.auto-running.is-idle {
  background: #f1f1f1;
  border-color: #e2e2e2;
}
.auto-running.is-idle small {
  color: #767676;
}
.auto-running.is-idle b {
  color: #555;
}
.auto-running__meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65625rem;
  color: #1e5c3c;
  margin-top: 0.25rem;
}
.auto-running__meta .material-icons {
  font-size: 0.8125rem;
}
.auto-queue__label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--auto-muted-2);
  margin: 0 0 0.5rem;
}
.auto-queue__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.auto-queue__list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.5rem;
  background: #f7f8fb;
  border-radius: var(--ds-radius-md, 8px);
  margin-bottom: 0.375rem;
  font-size: 0.71875rem;
}
.auto-queue__list li.is-priority {
  border-left: 3px solid var(--error-color, #ef4444);
}
.auto-queue__pos {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--auto-navy);
  color: #fff;
  font-size: 0.625rem;
  display: grid;
  place-items: center;
  flex: none;
}
.auto-queue__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auto-queue__name b {
  color: var(--auto-navy);
  margin-right: 0.25rem;
}
.auto-queue__trigger {
  margin-left: auto;
  font-size: 0.625rem;
  color: var(--auto-muted-2);
  flex: none;
}
.auto-queue__empty {
  font-size: 0.75rem;
  color: var(--auto-muted-2);
  padding: 0.5rem 0;
  text-align: center;
  margin: 0;
}
.auto-queue__actions {
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--auto-line-soft);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.auto-queue__actions select {
  font: inherit;
  font-size: 0.78125rem;
  padding: 0.4375rem 0.5rem;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  width: 100%;
  background: var(--auto-surface);
}

.auto-week-occupancy {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}
.auto-week-day {
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
  padding: 0.625rem 0.5rem;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  background: var(--auto-surface);
  font: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s;
}
.auto-week-day:hover {
  border-color: #cbd5e1;
}
.auto-week-day.is-active {
  border-color: var(--brand-primary, #00bf9a);
  background: #f4fdfa;
}
.auto-week-day__label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--auto-muted);
}
.auto-week-day b {
  font-size: 0.78125rem;
  color: var(--auto-navy);
  font-variant-numeric: tabular-nums;
}
.auto-week-day small {
  font-size: 0.5625rem;
  color: var(--auto-muted-2);
}

/* ── Vitrine ─────────────────────────────────────────────────────────────── */

.auto-showcase {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auto-vitrine {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 0.875rem;
}
.auto-case {
  background: var(--auto-surface);
  border: 1px solid var(--auto-line);
  border-radius: var(--auto-radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6875rem;
}
.auto-case header b {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--auto-navy);
}
.auto-case header small {
  display: block;
  font-size: 0.71875rem;
  color: var(--auto-muted);
  margin-top: 0.125rem;
}
/* Antes/depois empilhados: em cartão de ~280px duas colunas dão ~120px cada e
   a frase quebra em cinco linhas. Empilhado, lê-se como narrativa e o texto
   ocupa a largura toda — mesmo comportamento em qualquer tamanho de tela. */
.auto-case__ba {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.375rem;
}
.auto-case__ba > div {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  align-items: baseline;
  gap: 0.5rem;
}
.auto-case__ba > div {
  border-radius: var(--ds-radius-md, 8px);
  padding: 0.5rem 0.6875rem;
}
.auto-case__before {
  background: #fdecec;
}
.auto-case__before small {
  color: #791f1f;
}
.auto-case__before b {
  color: #501313;
}
.auto-case__after {
  background: #e7f6ef;
}
.auto-case__after small {
  color: #1e5c3c;
}
.auto-case__after b {
  color: #0f3f27;
}
.auto-case__ba small {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auto-case__ba b {
  font-size: 0.8125rem;
  line-height: 1.4;
  font-weight: 600;
}
.auto-case__tags {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.auto-case__foot {
  border-top: 1px solid var(--auto-line-soft);
  padding-top: 0.625rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.71875rem;
  color: var(--auto-muted);
}
.auto-case__foot span {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.auto-case__foot b {
  color: var(--auto-navy);
  font-size: 0.875rem;
}
.auto-case__edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  background: transparent;
  padding: 0.375rem;
  font: inherit;
  font-size: 0.71875rem;
  color: var(--auto-muted);
  cursor: pointer;
}
.auto-case__edit .material-icons {
  font-size: 0.875rem;
}
.auto-case__edit:hover {
  background: #f7f8fb;
  color: var(--auto-ink);
}

.auto-candidates {
  background: var(--auto-surface);
  border: 1px solid var(--auto-line);
  border-radius: var(--auto-radius);
  padding: 1rem;
}
.auto-candidates h3 {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--auto-muted-2);
  margin: 0 0 0.625rem;
}
.auto-candidate {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--auto-line-soft);
  border-radius: var(--ds-radius-md, 8px);
  background: transparent;
  font: inherit;
  font-size: 0.78125rem;
  cursor: pointer;
  margin-bottom: 0.375rem;
  text-align: left;
}
.auto-candidate:hover {
  background: #f7f8fb;
}
.auto-candidate > span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auto-candidate b {
  color: var(--auto-navy);
}
.auto-candidate__meta {
  color: var(--auto-muted);
  font-size: 0.71875rem;
  flex: none;
}
.auto-candidate .material-icons {
  font-size: 1rem;
  color: #cbd5e1;
}

/* ── Modal ───────────────────────────────────────────────────────────────── */

.auto-modal {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.auto-modal__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgb(13 42 74 / 0.34);
  cursor: pointer;
}
.auto-modal__box {
  position: relative;
  background: var(--auto-surface);
  border-radius: var(--ds-radius-xl, 16px);
  width: min(620px, 100%);
  max-height: 84vh;
  overflow-y: auto;
  padding: 1.25rem;
  box-shadow: var(--ds-shadow-lg, 0 12px 32px rgb(0 0 0 / 0.14));
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.auto-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.auto-modal__eyebrow {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auto-muted-2);
}
.auto-modal__head h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--auto-navy);
  margin: 0.125rem 0 0;
}
.auto-modal__lead {
  font-size: 0.78125rem;
  color: var(--auto-muted);
  margin: 0;
  line-height: 1.55;
}
.auto-modal__no-analysis {
  margin: 0.625rem 0 0;
}
.auto-search--modal {
  flex: none;
}
.auto-modal__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.auto-modal__list--compact {
  gap: 0.3125rem;
  max-height: 11rem;
  overflow-y: auto;
}
.auto-option--compact {
  padding: 0.5rem 0.625rem;
}
.auto-option {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.6875rem 0.8125rem;
  border: 1px solid var(--auto-line);
  border-radius: var(--ds-radius-md, 8px);
  background: var(--auto-surface);
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.auto-option:hover {
  border-color: var(--brand-light, #00b6d6);
  background: #f7fdfe;
}
.auto-option__main {
  flex: 1;
  min-width: 0;
}
.auto-option__main b {
  display: block;
  font-size: 0.8125rem;
  color: var(--auto-navy);
}
.auto-option__main small {
  display: block;
  font-size: 0.71875rem;
  color: var(--auto-muted);
  margin-top: 0.0625rem;
}
.auto-option__metrics {
  display: flex;
  gap: 0.875rem;
  flex: none;
}
.auto-option__metrics span {
  display: flex;
  flex-direction: column;
  font-size: 0.78125rem;
  font-variant-numeric: tabular-nums;
  color: var(--auto-ink);
}
.auto-option__metrics em {
  font-style: normal;
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--auto-muted-2);
}
.auto-modal__context {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.6875rem 0.8125rem;
  background: #e0f6fa;
  border: 1px solid #b7e7f1;
  border-radius: var(--ds-radius-md, 8px);
  font-size: 0.75rem;
  color: #04566b;
}
.auto-modal__context .material-icons {
  font-size: 1rem;
  flex: none;
}
.auto-modal__context > div {
  flex: 1;
  min-width: 0;
}
.auto-modal__context strong {
  display: block;
  font-size: 0.8125rem;
}
.auto-modal__context small {
  display: block;
  margin-top: 0.0625rem;
}
.auto-modal__warn {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  margin: 0.375rem 0 0;
  color: #8a5a00;
  line-height: 1.5;
}
.auto-modal__warn .material-icons {
  font-size: 1rem;
  flex: none;
  margin-top: 0.125rem;
}
.auto-modal__foot {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 0.25rem;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */

.auto-toast {
  position: fixed;
  left: 50%;
  bottom: 1.625rem;
  transform: translateX(-50%);
  background: var(--auto-navy);
  color: #fff;
  padding: 0.6875rem 1.125rem;
  border-radius: var(--ds-radius-md, 8px);
  font-size: 0.8125rem;
  z-index: 1400;
  max-width: min(520px, 90vw);
  text-align: center;
  box-shadow: var(--ds-shadow-lg, 0 12px 32px rgb(0 0 0 / 0.14));
  animation: auto-toast-in 0.2s ease;
}
.auto-toast.is-bad {
  background: #9f1228;
}
@keyframes auto-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLET — a fila sai da coluna lateral e vira faixa horizontal acima do
   calendário, porque 300px de sidebar espremem a régua do dia.
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .auto-lane-grid {
    grid-template-columns: 1fr;
  }
  .auto-queue {
    position: static;
    order: -1;
  }
  .auto-queue__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }
  .auto-queue__actions .auto-field {
    flex: 1 1 220px;
  }
  .auto-queue__actions .auto-btn--block {
    width: auto;
  }
  .auto-queue__actions .auto-hint {
    flex: 1 1 100%;
  }
  .auto-table__head,
  .auto-table__row {
    grid-template-columns: minmax(0, 1fr) 104px 116px 76px 120px 24px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE — reposicionamento real, não encolhimento.

   • KPIs viram carrossel com snap (a informação prioritária fica visível
     inteira em vez de virar seis cartões minúsculos).
   • A tabela vira cartão: cada linha empilha e os números ganham rótulo,
     porque sem cabeçalho fixo "1.240" sozinho não significa nada.
   • A régua horizontal da faixa some — 16 horas em 375px é ilegível — e a
     agenda vertical, que já existe, passa a ser a visão única.
   • Slide-overs viram bottom sheets: o polegar alcança o topo do conteúdo e
     o gesto de fechar é para baixo, não para o lado.
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  .auto-module {
    gap: 1rem;
  }

  /* Abas: rolagem horizontal com o rótulo escondido nos ícones secundários */
  .auto-tabs {
    align-self: stretch;
  }
  .auto-tab {
    padding: 0.5rem 0.75rem;
  }

  /* Hero: o anel sai da lateral e vira faixa de métricas embaixo do texto */
  .auto-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.25rem;
  }
  .auto-hero h2 {
    font-size: 1.125rem;
  }
  .auto-hero__pulse {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding-top: 0.875rem;
    border-top: 1px solid rgb(255 255 255 / 0.18);
  }
  .auto-hero__ring {
    position: static;
    width: 84px;
    height: 84px;
    flex: none;
    padding: 0 0.25rem;
  }
  .auto-hero__ring span {
    font-size: 1.5rem;
  }
  /* Sem letter-spacing e menor: "EM PRODUÇÃO" não cabe no círculo senão. */
  .auto-hero__ring small {
    font-size: 0.5rem;
    letter-spacing: 0;
    line-height: 1.15;
  }

  /* A nota explicativa vai para baixo do título em vez de disputar a linha. */
  .auto-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
  }
  .auto-hero__mini {
    position: static;
    flex: 1;
    justify-content: center;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.5rem;
    text-align: center;
  }
  .auto-hero__button {
    width: 100%;
    justify-content: center;
  }

  /* KPIs: empilha para o rótulo não ficar cortado fora da tela */
  .auto-kpi-grid,
  .auto-kpi-grid--3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
  .auto-tile {
    flex: none;
    max-width: none;
    width: 100%;
  }

  /* Toolbar: busca full-width; ações em uma linha abaixo */
  .auto-toolbar {
    flex-wrap: wrap;
    align-items: stretch;
  }
  .auto-search {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }
  .auto-toolbar__actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .auto-toolbar__actions .auto-btn {
    flex: none;
  }
  .auto-toolbar__actions .auto-btn--primary {
    margin-left: auto;
  }
  .auto-period {
    flex: none;
  }
  .auto-filter-menu__panel,
  .auto-export-menu__panel {
    left: 0;
    right: auto;
  }

  /* Tabela → cartões empilhados com rótulo em cada número */
  .auto-table {
    border: none;
    background: transparent;
    overflow: visible;
  }
  .auto-table__head {
    display: none;
  }
  .auto-table__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "main main"
      "s1 s2"
      "s3 status";
    gap: 0.5rem 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--auto-surface);
    border: 1px solid var(--auto-line);
    border-radius: var(--auto-radius);
    margin-bottom: 0.5rem;
  }
  .auto-table__row.is-warn {
    border-color: #f0dcae;
  }
  .auto-table__main {
    grid-area: main;
  }
  .auto-table__name {
    white-space: normal;
  }
  .auto-table__sub {
    white-space: normal;
  }
  /* Classes explícitas, não nth-of-type: todos os filhos da linha são <span>,
     então nth-of-type contaria o bloco principal e desalinharia tudo em um. */
  .auto-cell--hours {
    grid-area: s1;
  }
  .auto-cell--savings {
    grid-area: s2;
  }
  .auto-cell--roi {
    grid-area: s3;
  }
  .auto-cell--status {
    grid-area: status;
    justify-self: end;
    align-self: center;
  }
  /* `block`, não flex-column: assim o valor e o selo "R" (realizado) seguem
     no mesmo fluxo de texto em vez de virarem duas linhas. */
  .auto-table__cell {
    text-align: left;
    display: block;
    font-weight: 600;
    color: var(--auto-navy);
  }
  .auto-table__label {
    display: block;
    font-style: normal;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--auto-muted-2);
  }
  .auto-table__arrow {
    display: none;
  }

  /* Painéis lado a lado viram empilhados */
  .auto-grid-2 {
    grid-template-columns: 1fr;
  }
  .auto-panel {
    padding: 1rem;
  }
  .auto-panel__head {
    flex-direction: column;
    gap: 0.625rem;
  }

  /* Donut acima da legenda, centralizado */
  .auto-donut-wrap {
    flex-direction: column;
    align-items: center;
  }
  .auto-donut__legend {
    width: 100%;
  }

  /* Volume: menos colunas legíveis → rótulos alternados */
  .auto-volume__cols {
    height: 128px;
  }
  .auto-volume__col:nth-child(even) small {
    visibility: hidden;
  }

  /* Ciclo de vida: chip acima da barra */
  .auto-lifecycle__row {
    grid-template-columns: 116px 1fr 28px 18px;
  }

  /* Faixa: a régua horizontal some; a agenda vertical assume */
  .auto-lane-timeline {
    display: none;
  }
  .auto-daytabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -0.25rem 0.875rem;
    padding: 0 0.25rem;
    scrollbar-width: none;
  }
  .auto-daytabs::-webkit-scrollbar {
    display: none;
  }
  .auto-daytab {
    flex: none;
  }
  .auto-agenda__row {
    flex-wrap: wrap;
    gap: 0.375rem 0.5rem;
  }
  .auto-agenda__row time {
    width: auto;
    font-weight: 600;
    color: var(--auto-navy);
  }
  .auto-agenda__name {
    flex: 1 1 100%;
    order: 3;
    white-space: normal;
  }
  .auto-agenda__dur {
    margin-left: auto;
  }
  .auto-week-occupancy {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Vitrine em coluna única */
  .auto-vitrine {
    grid-template-columns: 1fr;
  }

  /* Slide-overs viram bottom sheets */
  .auto-sheet, .auto-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 92vh;
    border-radius: var(--ds-radius-xl, 16px) var(--ds-radius-xl, 16px) 0 0;
    animation: auto-slide-up 0.26s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -8px 30px rgb(13 42 74 / 0.18);
  }
  /* Ancorado em `bottom` a altura do painel é indefinida, então `flex: 1`
     (flex-basis: 0%) colapsaria o corpo e sobraria só o cabeçalho. Com
     basis auto o painel cresce até o conteúdo, limitado por max-height. */
  .auto-drawer__body, .auto-sheet__items {
    flex: 1 1 auto;
    min-height: 0;
  }
  @keyframes auto-slide-up {
    from {
      transform: translateY(100%);
    }
    to {
      transform: none;
    }
  }
  /* Alça de arrasto: sinaliza que o gesto de fechar é para baixo */
  .auto-sheet__header, .auto-drawer__header {
    position: relative;
    border-radius: var(--ds-radius-xl, 16px) var(--ds-radius-xl, 16px) 0 0;
    padding-top: 1.375rem;
  }
  .auto-sheet__header::before, .auto-drawer__header::before {
    content: "";
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
  }
  .auto-sheet__item-metric {
    position: static;
    display: block;
    margin-top: 0.4375rem;
  }
  .auto-sheet__item {
    padding-right: 0.875rem;
  }
  .auto-sheet__item-arrow {
    display: none;
  }
  .auto-sheet__list-head {
    flex-wrap: wrap;
  }
  .auto-sheet__search input {
    width: 100%;
  }
  .auto-sheet__search {
    flex: 1;
  }

  /* Modal ocupa a tela inteira */
  .auto-modal {
    padding: 0;
    place-items: end stretch;
  }
  .auto-modal__box {
    width: 100%;
    max-height: 94vh;
    border-radius: var(--ds-radius-xl, 16px) var(--ds-radius-xl, 16px) 0 0;
  }
  .auto-option {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .auto-option__metrics {
    width: 100%;
    justify-content: space-between;
  }
  .auto-modal__foot {
    flex-direction: column-reverse;
  }
  .auto-modal__foot .auto-btn {
    width: 100%;
  }

  /* Formulários em coluna única */
  .auto-form-row {
    grid-template-columns: 1fr;
  }
  .auto-mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .auto-drawer__actions {
    flex-direction: column-reverse;
  }
  .auto-drawer__actions .auto-btn {
    width: 100%;
  }

  .auto-toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    transform: none;
    max-width: none;
  }
  @keyframes auto-toast-in {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* Telas muito estreitas: o rótulo do botão some, fica só o ícone */
@media (max-width: 400px) {
  .auto-btn__text {
    display: none;
  }
  .auto-toolbar__actions .auto-btn {
    flex: none;
  }
  .auto-tab__label {
    display: none;
  }
  .auto-tab.is-active .auto-tab__label {
    display: inline;
  }
  .auto-table__row {
    grid-template-areas: "main main" "s1 s2" "s3 status";
  }
}

/* Impressão: só o conteúdo */
@media print {
  .app-sidebar,
  .app-topbar,
  .auto-tabs,
  .auto-toolbar,
  .auto-hero__button,
  .auto-queue__actions,
  .auto-case__edit,
  .auto-export,
  .auto-sheet-layer,
  .auto-toast {
    display: none !important;
  }
  .auto-table__row {
    break-inside: avoid;
  }
  .auto-panel, .auto-tile {
    break-inside: avoid;
    border-color: #ccc;
  }
  .auto-module {
    padding: 0 !important;
  }
}

.auto-export {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
/* Legacy export row kept for other surfaces; catalog uses .auto-export-menu */
.auto-lane-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.auto-audit-table {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.75rem;
}
.auto-audit-table__head,
.auto-audit-table__row {
  display: grid;
  grid-template-columns: 6.5rem 5rem 7rem 1fr;
  gap: 0.5rem;
  align-items: start;
}
.auto-audit-table__head {
  font-weight: 700;
  color: var(--auto-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.625rem;
}
.auto-audit-table__row {
  padding: 0.5rem 0;
  border-top: 1px solid var(--auto-line);
}
.auto-audit-outcome {
  font-family: ui-monospace, monospace;
  color: #8a5a00;
}
.auto-token-once {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fcf0d8;
  border-radius: 8px;
  word-break: break-all;
}

/* Docs connected-app references: a source-of-truth link, not a file copy. */
.docs-ref {
  margin: 0.85rem 0 0;
  padding: 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
}
.docs-ref--compact {
  padding: 0.75rem;
}
.docs-ref__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.docs-ref__eyebrow {
  margin: 0 0 0.15rem;
  color: #2563eb;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.docs-ref__header h3 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
}
.docs-ref__header h3 .material-icons {
  color: #2563eb;
}
.docs-ref__header p:not(.docs-ref__eyebrow) {
  margin: 0.25rem 0 0;
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.45;
}
.docs-ref__count {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}
.docs-ref__save-first {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: 9px;
  background: rgb(255 255 255 / 0.8);
  color: #475569;
  font-size: 0.8rem;
}
.docs-ref__save-first .material-icons {
  color: #2563eb;
}
.docs-ref__linked-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.8rem 0;
  padding: 0;
  list-style: none;
}
.docs-ref__linked-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #fff;
}
.docs-ref__linked-item > a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.62rem 0.7rem;
  color: inherit;
  text-decoration: none;
}
.docs-ref__linked-item > a:hover {
  background: #f8fafc;
}
.docs-ref__linked-item > a > .material-icons:first-child {
  color: #2563eb;
}
.docs-ref__linked-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1e3a8a;
  font-size: 0.82rem;
}
.docs-ref__open {
  color: #64748b;
  font-size: 1rem !important;
}
.docs-ref__path {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.1rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 500;
}
.docs-ref__path .material-icons {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.85rem !important;
}
.docs-ref__linked-item > button {
  width: 2.4rem;
  border: 0;
  border-left: 1px solid #dbeafe;
  background: #fff;
  color: #94a3b8;
  cursor: pointer;
}
.docs-ref__linked-item > button:hover:not(:disabled) {
  background: #fef2f2;
  color: #dc2626;
}
.docs-ref__picker {
  border-top: 1px solid #dbeafe;
  padding-top: 0.75rem;
}
.docs-ref__picker label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.08rem 0.65rem;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #fff;
  color: #2563eb;
}
.docs-ref__picker input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.82rem;
  line-height: 2rem;
}
.docs-ref__picker label:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.12);
}
.docs-ref__results {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.5rem;
}
.docs-ref__loading, .docs-ref__empty, .docs-ref__hint {
  padding: 0.35rem 0.1rem;
  color: #64748b;
  font-size: 0.76rem;
}
.docs-ref__error {
  margin: 0.55rem 0 0;
  color: #b91c1c;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.docs-ref__result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.3rem 0.3rem 0.6rem;
  border-radius: 8px;
}
.docs-ref__result-row:hover {
  background: rgb(255 255 255 / 0.8);
}
.docs-ref__result-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.docs-ref__result-info > .material-icons {
  flex: 0 0 auto;
  color: #60a5fa;
  font-size: 1.05rem;
}
.docs-ref__result-text {
  min-width: 0;
}
.docs-ref__result-text > strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
}
.docs-ref__result-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.2rem;
}
.docs-ref__result-actions button {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}
.docs-ref__result-actions button:hover:not(:disabled) {
  background: #eff6ff;
  color: #2563eb;
}
.docs-ref__result-actions button.docs-ref__result-link:hover:not(:disabled) {
  background: #dbeafe;
  color: #1d4ed8;
}
.docs-ref__result-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 560px) {
  .docs-ref {
    padding: 0.8rem;
    border-radius: 12px;
  }
  .docs-ref__header p:not(.docs-ref__eyebrow) {
    font-size: 0.74rem;
  }
  .docs-ref__linked-item > a {
    padding: 0.58rem;
  }
  .docs-ref__linked-item strong {
    font-size: 0.78rem;
  }
}

/* Rich text editor — inline Docs document picker (toolbar button + popover). */
.rich-editor__docs-anchor {
  position: relative;
}
.rich-editor__docs-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: min(320px, calc(100vw - 2.5rem));
  padding: 0.6rem;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgb(15 23 42 / 0.16);
}
.rich-editor__docs-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.1rem 0.6rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
  color: #2563eb;
}
.rich-editor__docs-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.82rem;
  line-height: 2rem;
}
.rich-editor__docs-search:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.12);
}
.rich-editor__docs-results {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.45rem;
  max-height: 220px;
  overflow-y: auto;
}
.rich-editor__docs-hint {
  padding: 0.35rem 0.1rem;
  color: #64748b;
  font-size: 0.76rem;
}

.rich-editor__docs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.3rem 0.3rem 0.5rem;
  border-radius: 8px;
}
.rich-editor__docs-row:hover {
  background: #eff6ff;
}
.rich-editor__docs-row-info {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.rich-editor__docs-row-info > .material-icons {
  flex: 0 0 auto;
  color: #60a5fa;
  font-size: 1rem;
}
.rich-editor__docs-row-info > span {
  min-width: 0;
}
.rich-editor__docs-row-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
}
.rich-editor__docs-row-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.05rem;
  color: #94a3b8;
  font-size: 0.68rem;
}
.rich-editor__docs-row-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.15rem;
}
.rich-editor__docs-row-actions button {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}
.rich-editor__docs-row-actions button:hover {
  background: #dbeafe;
  color: #1d4ed8;
}
@media (max-width: 560px) {
  .rich-editor__docs-popover {
    left: auto;
    right: 0;
    width: min(300px, calc(100vw - 2rem));
  }
}

/* Docs document full preview — its own modal, portalled above any parent dialog. */
.docs-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(15 23 42 / 0.6);
  padding: 1.25rem;
}
.docs-preview-modal__panel {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(88vh, 900px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgb(15 23 42 / 0.35);
  overflow: hidden;
}
.docs-preview-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
}
.docs-preview-modal__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.docs-preview-modal__title > .material-icons {
  flex: 0 0 auto;
  color: #2563eb;
  font-size: 1.35rem;
}
.docs-preview-modal__title strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-size: 1rem;
}
.docs-preview-modal__title small {
  display: block;
  margin-top: 0.1rem;
  color: #64748b;
  font-size: 0.74rem;
  text-transform: capitalize;
}
.docs-preview-modal__breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin-top: 0.3rem;
  color: #64748b;
  font-size: 0.72rem;
}
.docs-preview-modal__breadcrumb > .material-icons {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.95rem !important;
  margin-right: 0.15rem;
}
.docs-preview-modal__breadcrumb-sep {
  flex: 0 0 auto;
  color: #cbd5e1;
  font-size: 0.85rem !important;
  margin: 0 0.1rem;
}
.docs-preview-modal__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.docs-preview-modal__actions .app-btn {
  white-space: nowrap;
}
.docs-preview-modal__close {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}
.docs-preview-modal__close:hover {
  background: rgb(15 23 42 / 0.06);
  color: #0f172a;
}
.docs-preview-modal__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1.5rem 1.75rem 2rem;
}
.docs-preview-modal__hint {
  margin: 0;
  padding: 2rem 0;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}
.docs-preview-modal__hint--error {
  color: #b91c1c;
}
.docs-preview-modal__content {
  max-width: 68ch;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .docs-preview-modal {
    padding: 0;
  }
  .docs-preview-modal__panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  .docs-preview-modal__header {
    flex-wrap: wrap;
  }
  .docs-preview-modal__body {
    padding: 1.1rem 1.1rem 1.75rem;
  }
}

/* Process named versions (business checkpoints) */
.proc-hist {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.proc-hist__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #002b49 0%, #003d66 52%, #0b6b62 100%);
  color: #f8fafc;
  box-shadow: 0 10px 28px rgb(0 43 73 / 0.18);
}
.proc-hist__kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.72);
  font-weight: 600;
}
.proc-hist__hero-title {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.proc-hist__hero-meta,
.proc-hist__hero-desc {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  color: rgb(248 250 252 / 0.82);
  max-width: 42rem;
}
.proc-hist__hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  flex: 0 0 auto;
}
.proc-hist__tech-pill {
  margin: 0;
  font-size: 0.75rem;
  color: rgb(248 250 252 / 0.7);
  text-align: right;
}
.proc-hist__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.proc-hist__tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: #f1f5f9;
}
.proc-hist__tab {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.proc-hist__tab--active {
  background: #fff;
  color: #002b49;
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.08);
}
.proc-hist__count {
  font-size: 0.72rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  border-radius: 999px;
  min-width: 1.25rem;
  padding: 0.05rem 0.4rem;
  text-align: center;
}
.proc-hist-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
}
.proc-hist-switch input {
  width: 1rem;
  height: 1rem;
  accent-color: #00bf9a;
}
.proc-hist-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.proc-hist-card {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 0.75rem;
}
.proc-hist-card__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.proc-hist-card__dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #002b49;
  background: #e6fbf6;
  border: 2px solid #00bf9a;
  flex: 0 0 auto;
}
.proc-hist-card--current .proc-hist-card__dot {
  background: #00bf9a;
  color: #fff;
}
.proc-hist-card__line {
  width: 2px;
  flex: 1 1 auto;
  min-height: 1rem;
  background: linear-gradient(#00bf9a66, #e2e8f0);
  margin: 0.2rem 0;
}
.proc-hist-card__body {
  min-width: 0;
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}
.proc-hist-card--current .proc-hist-card__body {
  border-color: color-mix(in srgb, #00bf9a 40%, #e2e8f0);
  box-shadow: 0 8px 22px rgb(0 191 154 / 0.1);
}
.proc-hist-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.proc-hist-card__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #002b49;
  overflow-wrap: anywhere;
}
.proc-hist-card__meta,
.proc-hist-card__desc {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}
.proc-hist-card__chips,
.proc-hist-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}
.proc-hist-chip {
  font-size: 0.72rem;
  font-weight: 600;
  color: #0f766e;
  background: #ecfdf8;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.proc-hist-audit__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.proc-hist-audit__lead {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
  max-width: 40rem;
}
.proc-hist-audit__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.proc-hist-audit__item {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.proc-hist-audit__icon {
  flex: 0 0 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #eef2ff;
  color: #4338ca;
  display: grid;
  place-items: center;
}
.proc-hist-audit__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.proc-hist-audit__changes {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.proc-hist-audit__old {
  text-decoration: line-through;
  opacity: 0.65;
}
.proc-hist-audit__new {
  color: #16a34a;
  font-weight: 500;
}
.proc-nv-backdrop {
  padding: max(0.75rem, env(safe-area-inset-top))
    max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-left));
}
.proc-nv-modal {
  width: min(100%, 32rem);
  max-height: min(92dvh, 40rem);
  overflow: auto;
  gap: 0.9rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 16px;
}
.proc-nv-modal__head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.proc-nv-modal__icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #ecfdf8;
  color: #0f766e;
  font-size: 1.35rem;
}
.proc-nv-modal__lead {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
}
.proc-nv-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
}
.proc-nv-snapshot div {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.proc-nv-snapshot dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.proc-nv-snapshot dd {
  margin: 0.15rem 0 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #002b49;
}
.proc-nv-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.proc-nv-chip {
  border: 1px solid #ccfbf1;
  background: #f0fdfa;
  color: #0f766e;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}
.proc-nv-chip:hover {
  background: #ccfbf1;
}
.proc-bpmn-export__tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f766e;
  background: #ecfdf8;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proc-bpmn-export__rev select {
  max-width: min(22rem, 100%);
}
@media (max-width: 720px) {
  .proc-hist__hero-actions {
    align-items: stretch;
    width: 100%;
  }
  .proc-hist__hero-actions .app-btn {
    width: 100%;
    justify-content: center;
  }
  .proc-hist__tech-pill {
    text-align: left;
  }
  .proc-nv-snapshot {
    grid-template-columns: 1fr;
  }
  .proc-nv-modal {
    width: 100%;
    max-height: 100dvh;
    border-radius: 16px 16px 0 0;
    align-self: end;
  }
  .proc-hist-card {
    grid-template-columns: 1.6rem minmax(0, 1fr);
  }
}
@media (max-width: 480px) {
  .proc-bpmn-export {
    align-items: stretch;
  }
  .proc-bpmn-export__rev,
  .proc-bpmn-export__rev select {
    width: 100%;
    max-width: none;
  }
  .proc-bpmn-export .app-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.proc-hist-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  max-width: min(28rem, 100%);
  padding: 0.4rem 0.65rem 0.4rem 0.5rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}
.proc-hist-trigger:hover,
.proc-hist-trigger:focus-visible {
  border-color: color-mix(in srgb, var(--brand-primary, #00bf9a) 50%, #e2e8f0);
  outline: none;
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--brand-primary, #00bf9a) 16%, transparent);
}
.proc-hist-trigger__icon {
  flex: 0 0 auto;
  font-size: 1.25rem;
  color: var(--brand-primary, #00bf9a);
}
.proc-hist-trigger__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.proc-hist-trigger__copy small {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
}
.proc-hist-trigger__copy strong {
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
}
.proc-hist-trigger__copy em {
  font-style: normal;
  font-size: 0.7rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proc-hist-trigger__chevron {
  margin-left: auto;
  font-size: 1.15rem;
  color: #94a3b8;
}
.bpmn-toolbar .proc-hist-trigger {
  max-width: 18rem;
}

.bpmn-hist-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgb(15 23 42 / 0.38);
  display: flex;
  justify-content: flex-end;
}
.bpmn-hist-sheet {
  width: min(28rem, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -12px 0 40px rgb(15 23 42 / 0.18);
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.1rem 1rem;
  gap: 0.75rem;
}
.bpmn-hist-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.bpmn-hist-sheet__kicker {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary, #00bf9a);
  font-weight: 700;
}
.bpmn-hist-sheet__title {
  margin: 0.1rem 0 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}
.bpmn-hist-sheet__close {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.2rem;
  color: #64748b;
  cursor: pointer;
}
.bpmn-hist-sheet__close:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.bpmn-hist-sheet__search,
.proc-hist__search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 10px;
  background: #f8fafc;
}
.bpmn-hist-sheet__search .material-icons,
.proc-hist__search .material-icons {
  font-size: 1.1rem;
  color: #94a3b8;
}
.bpmn-hist-sheet__search input,
.proc-hist__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}
.proc-hist__toolbar {
  flex-wrap: wrap;
}
.proc-hist__search {
  flex: 1 1 12rem;
  min-width: 10rem;
}
.proc-hist__search-empty {
  margin: 1rem 0;
  color: var(--text-secondary, #64748b);
}
.bpmn-hist-sheet__filters {
  display: flex;
  gap: 0.4rem;
}
.bpmn-hist-sheet__chip {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--liberty-border, #e2e8f0);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}
.bpmn-hist-sheet__chip span {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
}
.bpmn-hist-sheet__chip--on {
  border-color: color-mix(in srgb, var(--brand-primary, #00bf9a) 55%, #e2e8f0);
  background: color-mix(in srgb, var(--brand-primary, #00bf9a) 12%, #fff);
  color: #0f172a;
}
.bpmn-hist-sheet__hint {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
}
.bpmn-hist-sheet__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.bpmn-hist-sheet__empty {
  color: #64748b;
  font-size: 0.88rem;
  padding: 1.5rem 0.5rem;
}
.bpmn-hist-sheet__item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--liberty-border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}
.bpmn-hist-sheet__item-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}
.bpmn-hist-sheet__viewing {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f766e;
}
.bpmn-hist-sheet__item strong {
  font-size: 0.9rem;
  color: #0f172a;
}
.bpmn-hist-sheet__item > span:not(.bpmn-hist-sheet__item-top) {
  font-size: 0.75rem;
  color: #64748b;
}
.bpmn-hist-sheet__item em {
  font-style: normal;
  font-size: 0.78rem;
  color: #475569;
}
.bpmn-hist-sheet__item--active {
  border-color: var(--brand-primary, #00bf9a);
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--brand-primary, #00bf9a) 16%, transparent);
}
.bpmn-hist-sheet__kind {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
}
.bpmn-hist-sheet__kind--named {
  background: color-mix(in srgb, var(--brand-primary, #00bf9a) 18%, #fff);
  color: #0f766e;
}
.bpmn-hist-sheet__kind--automatic {
  background: #f1f5f9;
  color: #475569;
}
.bpmn-hist-sheet__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--liberty-border, #e2e8f0);
}
.bpmn-hist-sheet__foot .app-btn {
  flex: 1 1 auto;
  justify-content: center;
}

.bpmn-preview-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.55rem 0.9rem;
  background: color-mix(in srgb, #0f172a 92%, var(--brand-primary, #00bf9a));
  color: #f8fafc;
  font-size: 0.85rem;
}
.bpmn-preview-banner .material-icons {
  color: var(--brand-primary, #00bf9a);
}
.bpmn-preview-banner span:nth-child(2) {
  flex: 1 1 12rem;
}
.bpmn-preview-banner .app-btn {
  color: #fff;
  border-color: rgb(255 255 255 / 0.28);
}

.bpmn-editor-wrap--readonly .djs-palette,
.bpmn-editor-wrap--readonly .djs-context-pad,
.bpmn-editor-wrap--readonly .djs-popup,
.bpmn-editor-wrap--readonly .djs-direct-editing-parent {
  display: none !important;
}
.bpmn-editor-wrap--readonly .djs-element {
  pointer-events: none;
}

@media (max-width: 640px) {
  .bpmn-hist-sheet {
    width: 100%;
  }
  .proc-hist-trigger {
    max-width: none;
    width: 100%;
  }
}

.acoes-kb-time-session-user {
  grid-column: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #0f766e;
}

.acoes-kb-time-session-user .material-icons {
  font-size: 0.8rem;
}

/* Admin impersonation ("entrar como") */
.impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.55rem 1rem;
  background: #fef3c7;
  border-bottom: 1px solid #f59e0b;
  color: #78350f;
  font-size: 0.875rem;
}

.impersonation-banner__text {
  flex: 1;
  min-width: 12rem;
}

.impersonation-banner__err {
  color: #b91c1c;
  font-weight: 600;
}

.impersonation-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid #b45309;
  border-radius: 0.5rem;
  background: #fff;
  color: #78350f;
  font-weight: 600;
  cursor: pointer;
}

.impersonation-banner__btn .material-icons,
.impersonation-banner > .material-icons {
  font-size: 1.1rem;
}

/* Nova ação: sub-itens / atualização preparados antes de salvar */
.acoes-staged {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.acoes-staged__hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary, #64748b);
}

.acoes-staged__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.acoes-staged__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 0.5rem;
  background: var(--surface, #fff);
  font-size: 0.875rem;
}

.acoes-staged__text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.acoes-staged__add {
  display: flex;
  gap: 0.5rem;
}

.acoes-staged__add .app-input {
  flex: 1;
}

.baseline-panel__missing {
  color: #b45309;
  font-weight: 600;
}

/* Linha de base: original vs atual, barras em escala e histórico */
.baseline-panel__original {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  font-size: 0.85rem;
}

.baseline-panel__original--late {
  background: #fef2f2;
  color: #991b1b;
}

.baseline-panel__bars {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: #f8fafc;
}

.baseline-panel__bar-row {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
}

.baseline-panel__bar-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
}

.baseline-panel__bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  min-width: 6px;
}

.baseline-panel__bar--original {
  background: repeating-linear-gradient(
    90deg,
    #94a3b8 0 6px,
    transparent 6px 10px
  );
}

.baseline-panel__bar--baseline {
  background: #64748b;
}

.baseline-panel__bar--real {
  background: linear-gradient(90deg, #10b981, #0ea5e9);
}

.baseline-panel__bar-scale {
  display: flex;
  justify-content: space-between;
  margin-left: 10.1rem;
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
}

.baseline-panel__history summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
}

.baseline-panel__history ol {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.baseline-panel__history li {
  display: grid;
  grid-template-columns: 2.2rem 11rem 1fr auto;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  font-size: 0.8rem;
}

.baseline-panel__history-reason {
  color: var(--text-secondary, #64748b);
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .baseline-panel__bar-row {
    grid-template-columns: 1fr;
  }
  .baseline-panel__bar-scale {
    margin-left: 0;
  }
  .baseline-panel__history li {
    grid-template-columns: 2.2rem 1fr;
  }
}
