/* Visucio 1.9 — interface premium, clara e orientada ao conteúdo. */
:root {
  --vui-bg: #f5f5f7;
  --vui-surface: rgba(255, 255, 255, .88);
  --vui-surface-solid: #fff;
  --vui-ink: #1d1d1f;
  --vui-muted: #6e6e73;
  --vui-faint: #8e8e93;
  --vui-line: rgba(60, 60, 67, .14);
  --vui-line-soft: rgba(60, 60, 67, .09);
  --vui-blue: #5f82f2;
  --vui-blue-strong: #4269de;
  --vui-blue-soft: rgba(103, 143, 255, .12);
  --vui-radius-sm: 12px;
  --vui-radius-md: 18px;
  --vui-radius-lg: 24px;
  --vui-shadow: 0 1px 2px rgba(0, 0, 0, .035), 0 14px 38px rgba(0, 0, 0, .055);
  --vui-shadow-float: 0 2px 8px rgba(0, 0, 0, .05), 0 24px 60px rgba(0, 0, 0, .09);
  --vui-ease: cubic-bezier(.22, 1, .36, 1);
  --visucio-background: var(--vui-bg);
  --visucio-surface: var(--vui-surface-solid);
  --visucio-text: var(--vui-ink);
  --visucio-text-secondary: var(--vui-muted);
  --visucio-border: var(--vui-line);
  --visucio-radius-sm: var(--vui-radius-sm);
  --visucio-radius-md: var(--vui-radius-md);
  --visucio-radius-lg: var(--vui-radius-lg);
  --visucio-shadow-sm: var(--vui-shadow);
  --visucio-shadow-md: var(--vui-shadow-float);
  --visucio-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
}

html {
  min-width: 320px;
  background: var(--vui-bg);
  color-scheme: light;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 92% -10%, rgba(173, 197, 255, .16), transparent 30rem),
    var(--vui-bg);
  color: var(--vui-ink);
  font-family: var(--visucio-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(67, 108, 225, .26);
  outline-offset: 2px;
}

.button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding-inline: 20px;
  background: var(--vui-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.01em;
  box-shadow: none;
  transition: transform .18s var(--vui-ease), background-color .18s ease, opacity .18s ease;
}

.button:hover,
.button:active:not(:disabled) {
  transform: translateY(-1px);
  background: #333336;
  color: #fff;
}

.button.secondary,
.button.ghost {
  border: 1px solid var(--vui-line);
  background: rgba(255, 255, 255, .82);
  color: var(--vui-ink);
}

.button.secondary:hover,
.button.ghost:hover {
  border-color: rgba(60, 60, 67, .22);
  background: #fff;
  color: var(--vui-ink);
}

.button.small {
  min-height: 38px;
  padding-inline: 16px;
  font-size: 12px;
}

.icon-button,
.logout-button,
.client-avatar,
.client-whatsapp {
  transition: transform .18s var(--vui-ease), background-color .18s ease, border-color .18s ease;
}

.icon-button:hover,
.logout-button:hover,
.client-avatar:hover,
.client-whatsapp:hover {
  transform: scale(1.035);
}

.eyebrow {
  color: var(--vui-blue-strong);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .13em;
}

.field input,
.field select,
.field textarea,
.search-input {
  min-height: 48px;
  border: 1px solid var(--vui-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  color: var(--vui-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-input:focus {
  border-color: rgba(73, 112, 224, .58);
  box-shadow: 0 0 0 4px rgba(103, 143, 255, .12);
}

.card,
.table-card,
.metric-card {
  border: 1px solid var(--vui-line-soft);
  border-radius: var(--vui-radius-md);
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--vui-shadow);
}

.card:hover,
.metric-card:hover,
.entity-card:hover {
  border-color: var(--vui-line);
  box-shadow: var(--vui-shadow);
}

.page-header h1,
.client-section-heading h2,
.card-header h2 {
  color: var(--vui-ink);
  font-weight: 700;
  letter-spacing: -.04em;
}

.page-header > div > p:last-child,
.client-section-heading > div > p:last-child,
.card-header p {
  color: var(--vui-muted);
}

.modal {
  border: 1px solid var(--vui-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--vui-shadow-float);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
}

.modal-backdrop {
  background: rgba(28, 28, 30, .32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.toast {
  border: 1px solid var(--vui-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--vui-shadow-float);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

/* Acesso */
.login-shell {
  background:
    radial-gradient(circle at 16% 12%, rgba(103, 143, 255, .2), transparent 26rem),
    radial-gradient(circle at 88% 86%, rgba(202, 164, 255, .13), transparent 25rem),
    var(--vui-bg);
}

.login-panel {
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 28px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--vui-shadow-float);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
}

.login-form .mobile-logo {
  width: min(158px, 52vw);
  max-height: 50px;
  object-fit: contain;
}

/* Área administrativa */
.app-shell:not(.client-shell) {
  background: var(--vui-bg);
}

.app-shell:not(.client-shell) .sidebar {
  border-right: 1px solid var(--vui-line-soft);
  background: rgba(250, 250, 252, .88);
  box-shadow: none;
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
}

.app-shell:not(.client-shell) .main {
  background: transparent;
}

.app-shell:not(.client-shell) .topbar {
  border-bottom: 1px solid var(--vui-line-soft);
  background: rgba(245, 245, 247, .78);
  box-shadow: none;
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.app-shell:not(.client-shell) .nav-button {
  border-radius: 12px;
  color: var(--vui-muted);
}

.app-shell:not(.client-shell) .nav-button:hover,
.app-shell:not(.client-shell) .nav-button.active {
  background: rgba(118, 118, 128, .11);
  color: var(--vui-ink);
}

.page {
  max-width: 1540px;
  padding: 34px 40px 104px;
}

/* Área do cliente: desktop com dois estados reais de navegação. */
.client-shell {
  --client-sidebar-collapsed: 76px;
  --client-sidebar-expanded: 260px;
  min-height: 100vh;
  padding-top: 88px;
  background: transparent;
}

.client-header {
  position: fixed;
  z-index: 55;
  top: 12px;
  left: 16px;
  right: 16px;
  width: auto;
  min-height: 64px;
  height: 64px;
  padding: 8px 12px 8px 20px;
  grid-template-columns: minmax(170px, .8fr) minmax(340px, 1.5fr) minmax(170px, .8fr);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 20px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .035), 0 10px 34px rgba(0, 0, 0, .06);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

.client-brand img {
  width: auto;
  height: 34px;
  max-width: 158px;
  max-height: 50px;
  object-fit: contain;
}

.client-top-nav {
  gap: 4px;
}

.client-top-nav button {
  position: relative;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  padding: 0 15px;
  background: transparent;
  color: var(--vui-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: background-color .18s ease, color .18s ease, transform .18s var(--vui-ease), box-shadow .18s ease;
}

.client-top-nav button svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

.client-top-nav button:hover,
.client-top-nav button.active {
  transform: none;
  background: rgba(118, 118, 128, .1);
  color: var(--vui-ink);
  box-shadow: none;
}

.client-header-actions {
  gap: 8px;
}

.client-header-actions .icon-button,
.client-avatar {
  width: 42px;
  height: 42px;
  border: 1px solid var(--vui-line-soft);
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
  color: var(--vui-ink);
}

.client-avatar {
  border-color: transparent;
  background: var(--vui-ink);
  color: #fff;
}

.client-sidebar {
  position: fixed;
  z-index: 50;
  inset: 88px auto 16px 16px;
  width: var(--client-sidebar-collapsed);
  height: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 22px;
  background: rgba(250, 250, 252, .78);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .035), 0 12px 34px rgba(0, 0, 0, .055);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  transition: width .34s var(--vui-ease), transform .3s var(--vui-ease), box-shadow .2s ease;
}

.client-sidebar-expanded .client-sidebar {
  width: var(--client-sidebar-expanded);
}

.client-sidebar .nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: visible;
}

.client-sidebar .nav-button,
.client-sidebar-toggle {
  width: 50px;
  min-width: 50px;
  min-height: 50px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--vui-muted);
  white-space: nowrap;
  transition: width .3s var(--vui-ease), padding .3s var(--vui-ease), background-color .18s ease, color .18s ease, transform .18s var(--vui-ease);
}

.client-sidebar .nav-button svg,
.client-sidebar-toggle svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  stroke-width: 1.65;
}

.client-sidebar .nav-button span,
.client-sidebar-toggle span,
.client-sidebar .profile-compact > div:nth-child(2),
.client-sidebar .logout-button {
  display: none;
}

.client-sidebar .nav-button:hover,
.client-sidebar .nav-button.active,
.client-sidebar-toggle:hover {
  transform: none;
  background: rgba(118, 118, 128, .11);
  color: var(--vui-ink);
}

.client-sidebar .nav-button.active {
  font-weight: 650;
}

.client-sidebar-toggle {
  margin-bottom: 12px;
  cursor: pointer;
}

.client-sidebar-toggle svg {
  transform: rotate(180deg);
  transition: transform .3s var(--vui-ease);
}

.client-sidebar-expanded .client-sidebar-toggle svg {
  transform: rotate(0);
}

.client-sidebar-expanded .client-sidebar .nav-button,
.client-sidebar-expanded .client-sidebar-toggle {
  width: 100%;
  justify-content: flex-start;
  margin-inline: 0;
  padding: 0 14px;
}

.client-sidebar-expanded .client-sidebar .nav-button span,
.client-sidebar-expanded .client-sidebar-toggle span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-sidebar .sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--vui-line-soft);
}

.client-sidebar .profile-compact {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0;
}

.client-sidebar .profile-compact .avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 13px;
  background: var(--vui-blue-soft);
  color: var(--vui-blue-strong);
}

.client-sidebar-expanded .client-sidebar .profile-compact {
  justify-content: flex-start;
  padding: 5px 6px;
}

.client-sidebar-expanded .client-sidebar .profile-compact > div:nth-child(2) {
  min-width: 0;
  display: grid;
  flex: 1;
  gap: 3px;
}

.client-sidebar-expanded .client-sidebar .profile-compact strong,
.client-sidebar-expanded .client-sidebar .profile-compact span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-sidebar-expanded .client-sidebar .profile-compact strong {
  color: var(--vui-ink);
  font-size: 11px;
}

.client-sidebar-expanded .client-sidebar .profile-compact span {
  color: var(--vui-muted);
  font-size: 8px;
}

.client-sidebar-expanded .client-sidebar .logout-button {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--vui-muted);
}

.client-main {
  width: auto;
  min-height: calc(100vh - 88px);
  margin-left: calc(var(--client-sidebar-collapsed) + 32px);
  background: transparent;
  transition: margin-left .34s var(--vui-ease);
}

.client-sidebar-expanded .client-main {
  margin-left: calc(var(--client-sidebar-expanded) + 32px);
}

.client-main .page {
  max-width: 1600px;
  padding: 24px 32px 104px;
}

/* VisuAI em destaque sem transformar a navegação em publicidade. */
.client-sidebar .nav-button.is-visuai,
.client-top-nav button.is-visuai {
  color: #5d5bd6;
}

.client-sidebar .nav-button.is-visuai svg,
.client-top-nav button.is-visuai svg {
  filter: drop-shadow(0 0 5px rgba(111, 103, 255, .34));
}

.client-sidebar .nav-button.is-visuai:hover,
.client-sidebar .nav-button.is-visuai.active,
.client-top-nav button.is-visuai:hover,
.client-top-nav button.is-visuai.active {
  background: linear-gradient(120deg, rgba(111, 145, 255, .14), rgba(190, 132, 255, .12), rgba(88, 213, 190, .11));
  color: #514fc8;
  box-shadow: 0 0 0 1px rgba(126, 111, 242, .09), 0 7px 20px rgba(101, 92, 218, .1);
}

/* Painel inicial */
.client-overview-grid {
  grid-template-columns: minmax(290px, .75fr) minmax(0, 1.45fr);
  gap: 20px;
}

.client-intro-stack {
  gap: 14px;
}

.client-welcome {
  min-height: 118px;
  padding: 16px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.client-welcome h1 {
  margin: 6px 0 8px;
  color: var(--vui-ink);
  font-size: clamp(28px, 2.25vw, 40px);
  font-weight: 700;
  letter-spacing: -.052em;
}

.client-welcome > div > p:last-child {
  max-width: 440px;
  color: var(--vui-muted);
  font-size: 13px;
  line-height: 1.55;
}

.client-advisor-card,
.client-notification-center {
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 22px;
  background: rgba(255, 255, 255, .74);
  box-shadow: var(--vui-shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.client-advisor-card {
  min-height: 104px;
  padding: 16px 18px;
}

.client-advisor-avatar,
.notification-type-icon {
  border-radius: 14px;
  background: var(--vui-blue-soft);
  color: var(--vui-blue-strong);
}

.client-notification-center {
  min-height: 238px;
  padding: 22px 24px;
}

.client-notification-item {
  border-radius: 16px;
}

.client-notification-item:hover {
  background: rgba(118, 118, 128, .07);
}

.client-products {
  margin-top: 24px;
  padding: 28px 0 0;
  border: 0;
  border-top: 1px solid var(--vui-line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.client-section-heading {
  margin-bottom: 20px;
  padding-inline: 4px;
}

.client-section-heading h2 {
  margin: 7px 0 6px;
  font-size: clamp(26px, 2.25vw, 36px);
}

.client-product-grid {
  gap: 16px;
}

.client-product-card {
  position: relative;
  min-height: 220px;
  padding: 26px;
  overflow: visible;
  border: 1px solid rgba(60, 60, 67, .1);
  border-radius: 24px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--vui-shadow);
  text-align: left;
  isolation: isolate;
  transition: transform .24s var(--vui-ease), box-shadow .24s ease, border-color .2s ease, background-color .2s ease;
}

.client-product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(60, 60, 67, .17);
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .045), 0 20px 44px rgba(0, 0, 0, .075);
}

.client-product-icon {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: rgba(103, 143, 255, .1);
  color: var(--vui-blue-strong);
}

.client-product-card h3 {
  margin: 9px 0 9px;
  color: var(--vui-ink);
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -.025em;
}

.client-product-card p {
  color: var(--vui-muted);
  line-height: 1.55;
}

.client-product-card strong {
  color: #5b6b7f;
  font-weight: 650;
}

.client-product-card.is-visuai {
  border-color: transparent;
  background:
    linear-gradient(rgba(255, 255, 255, .94), rgba(255, 255, 255, .94)) padding-box,
    linear-gradient(125deg, rgba(104, 143, 255, .72), rgba(187, 132, 255, .66), rgba(95, 218, 193, .62), rgba(104, 143, 255, .72)) border-box;
  box-shadow: 0 2px 6px rgba(76, 92, 170, .08), 0 18px 48px rgba(102, 91, 214, .12);
  animation: vui-ai-breathe 4.8s ease-in-out infinite;
}

.client-product-card.is-visuai::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 14px;
  border-radius: 22px;
  background: linear-gradient(120deg, rgba(104, 143, 255, .22), rgba(188, 128, 255, .2), rgba(80, 213, 185, .17));
  filter: blur(22px);
  opacity: .48;
  pointer-events: none;
}

.client-product-card.is-visuai .client-product-icon {
  background: linear-gradient(135deg, rgba(104, 143, 255, .17), rgba(188, 128, 255, .16), rgba(80, 213, 185, .14));
  color: #5a57cd;
  box-shadow: inset 0 0 0 1px rgba(118, 106, 224, .08), 0 0 22px rgba(111, 103, 255, .14);
}

.client-product-card.is-visuai small,
.client-product-card.is-visuai strong {
  background: linear-gradient(90deg, #466bd6, #7c5ad2, #2f8d83);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.visuai-settings-card {
  border-color: rgba(126, 111, 242, .16);
  background:
    linear-gradient(rgba(255, 255, 255, .9), rgba(255, 255, 255, .9)) padding-box,
    linear-gradient(135deg, rgba(104, 143, 255, .46), rgba(187, 132, 255, .4), rgba(95, 218, 193, .38)) border-box;
  box-shadow: 0 18px 48px rgba(98, 91, 192, .1);
}

.visuai-settings-card .plugin-card-icon {
  background: linear-gradient(135deg, rgba(104, 143, 255, .17), rgba(187, 132, 255, .15), rgba(95, 218, 193, .14));
  color: #5b57cb;
}

@keyframes vui-ai-breathe {
  0%, 100% { box-shadow: 0 2px 6px rgba(76, 92, 170, .08), 0 18px 48px rgba(102, 91, 214, .1); }
  50% { box-shadow: 0 2px 7px rgba(76, 92, 170, .1), 0 20px 56px rgba(102, 91, 214, .17); }
}

/* Tabelas e formulários */
.data-table th {
  background: rgba(118, 118, 128, .06);
  color: var(--vui-muted);
}

.data-table tbody tr:hover {
  background: rgba(118, 118, 128, .045);
}

.badge {
  border-radius: 999px;
}

.ai-plugin-option,
.safe-note,
.profile-edit-notice,
.captcha-slot {
  border-color: var(--vui-line);
  border-radius: 16px;
  background: rgba(118, 118, 128, .055);
}

.mobile-nav {
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 20px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--vui-shadow-float);
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
}

.drawer-backdrop {
  background: rgba(28, 28, 30, .28);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

@media (max-width: 1180px) {
  .client-header {
    grid-template-columns: minmax(155px, .7fr) minmax(330px, 1.5fr) minmax(145px, .7fr);
  }
  .client-top-nav button {
    padding-inline: 11px;
    font-size: 12px;
  }
  .client-main .page {
    padding-inline: 24px;
  }
}

@media (max-width: 1023px) {
  .client-shell {
    padding-top: 80px;
  }

  .client-header {
    top: 8px;
    left: 8px;
    right: 8px;
    height: 64px;
    min-height: 64px;
    grid-template-columns: 1fr auto;
    padding-inline: 12px;
    border-radius: 18px;
  }

  .client-mobile-menu {
    display: grid;
  }

  .client-top-nav {
    display: none;
  }

  .client-sidebar,
  .client-sidebar-expanded .client-sidebar,
  .client-sidebar-collapsed .client-sidebar {
    z-index: 70;
    inset: 80px auto 8px 8px;
    width: min(320px, calc(100vw - 28px));
    height: auto;
    padding: 14px;
    transform: translateX(calc(-100% - 20px));
    border-radius: 22px;
    background: rgba(250, 250, 252, .94);
  }

  .client-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--vui-shadow-float);
  }

  .client-sidebar-toggle {
    display: none;
  }

  .client-sidebar .nav-button,
  .client-sidebar-expanded .client-sidebar .nav-button {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    margin-inline: 0;
    padding: 0 14px;
  }

  .client-sidebar .nav-button span,
  .client-sidebar .profile-compact > div:nth-child(2),
  .client-sidebar .logout-button {
    display: block;
  }

  .client-sidebar .profile-compact {
    justify-content: flex-start;
    padding: 5px 6px;
  }

  .client-sidebar .profile-compact > div:nth-child(2) {
    min-width: 0;
    display: grid;
    flex: 1;
    gap: 3px;
  }

  .client-sidebar .profile-compact strong,
  .client-sidebar .profile-compact span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .client-sidebar .logout-button {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 0;
    border-radius: 12px;
    background: transparent;
  }

  .client-main,
  .client-sidebar-expanded .client-main,
  .client-sidebar-collapsed .client-main {
    margin-left: 0;
  }

  .client-main .page {
    padding: 20px 20px 104px;
  }

  .client-overview-grid {
    grid-template-columns: 1fr;
  }

  html.drawer-open {
    overflow: hidden;
  }
}

@media (max-width: 700px) {
  body {
    background: var(--vui-bg);
  }

  .client-header-actions .install-button {
    display: none !important;
  }

  .client-brand img {
    height: 30px;
  }

  .client-main .page,
  .page {
    padding: 18px 14px 100px;
  }

  .client-welcome {
    min-height: 104px;
    padding: 12px 4px;
  }

  .client-welcome h1 {
    font-size: 30px;
  }

  .client-intro-stack {
    grid-template-columns: 1fr;
  }

  .client-advisor-card,
  .client-notification-center,
  .client-product-card {
    border-radius: 20px;
  }

  .client-notification-center {
    padding: 18px;
  }

  .client-products {
    padding-top: 22px;
  }

  .client-product-grid {
    grid-template-columns: 1fr;
  }

  .client-product-card {
    min-height: 190px;
    padding: 22px;
  }

  .client-product-icon {
    width: 50px;
    height: 50px;
  }
}

/* Visucio 1.9.2 — acesso refinado e autenticação Google. */
[hidden] {
  display: none !important;
}

.auth-security-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.auth-security-label svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  stroke-width: 1.9;
}

#login-form .auth-security-label {
  margin-bottom: 46px;
}

#login-form .auth-create-account {
  margin-top: 12px;
}

#login-form .text-button {
  margin-top: 18px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.25;
}

.register-form .login-back {
  min-height: 34px;
  margin-bottom: 25px;
  padding: 6px 2px;
  font-size: 13px;
}

.register-actions .button[hidden] {
  display: none !important;
}

.google-login {
  margin-top: 13px;
}

.google-login .auth-divider {
  margin: 0 0 13px;
}

.google-login .auth-divider span {
  padding: 0 2px;
}

.google-button {
  position: relative;
  gap: 10px;
  border: 1px solid #d8dee9;
  background: rgba(255, 255, 255, .88);
  color: #202124;
  box-shadow: none;
}

.google-button:hover {
  border-color: #bfc9da;
  background: #fff;
  box-shadow: 0 6px 18px rgba(30, 42, 66, .08);
}

.google-mark {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 20px;
  object-fit: contain;
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.copy-field .button {
  min-height: 48px;
}

.copy-field input[readonly] {
  background: #f5f7fb;
  color: #46546a;
  cursor: text;
}

.google-auto-create > span {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-weight: 700;
}

.google-auto-create input {
  width: auto;
  min-height: 0;
  margin-top: 2px;
}

.google-auth-help .plugin-card-icon svg {
  stroke-width: 1.55;
}

.setup-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 24px;
  padding-left: 20px;
  color: var(--vui-muted);
  font-size: 12px;
  line-height: 1.55;
}

.setup-list strong {
  color: var(--vui-ink);
}

@media (max-width: 620px) {
  #login-form .auth-security-label {
    margin-bottom: 34px;
  }

  .copy-field {
    grid-template-columns: 1fr;
  }

  .copy-field .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Visucio 1.9.2 — refinamento final de densidade, acesso e ações. */
.button {
  border-radius: 10px;
}

.client-top-nav button {
  border-radius: 10px;
}

.login-shell {
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  place-items: stretch;
  gap: 18px;
  padding: 18px;
}

.login-brand {
  display: flex;
  min-height: calc(100vh - 36px);
  padding: clamp(38px, 5vw, 68px);
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 82%, rgba(103, 143, 255, .4), transparent 29rem),
    radial-gradient(circle at 18% 16%, rgba(167, 127, 243, .16), transparent 22rem),
    linear-gradient(145deg, #101217, #171c28 58%, #212a3d);
  box-shadow: 0 24px 64px rgba(18, 24, 38, .17);
}

.login-brand::after {
  width: 360px;
  height: 360px;
  right: -130px;
  bottom: -185px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(103, 143, 255, .14);
}

.login-brand .brand-logo {
  width: min(190px, 38vw);
}

.login-copy h1 {
  max-width: 720px;
  font-size: clamp(35px, 4.2vw, 62px);
  font-weight: 680;
  letter-spacing: -.055em;
}

.login-points span {
  border-radius: 9px;
  background: rgba(255, 255, 255, .055);
}

.login-panel {
  width: auto;
  margin: 0;
  padding: clamp(36px, 6vw, 80px);
  border-radius: 22px;
}

.login-form .mobile-logo {
  display: none;
}

.client-product-grid {
  gap: 12px;
}

.client-product-card {
  min-height: 168px;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-content: start;
  padding: 18px;
  border-radius: 14px;
}

.client-product-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
}

.client-product-icon svg {
  width: 23px;
  height: 23px;
}

.client-product-card > div:last-child {
  min-width: 0;
}

.client-product-card h3 {
  margin: 6px 0;
  font-size: 17px;
  line-height: 1.18;
}

.client-product-card p {
  min-height: 30px;
  margin: 0 0 10px;
  font-size: 10px;
  line-height: 1.45;
}

.client-product-card strong {
  font-size: 10px;
}

.client-product-card.is-visuai::after {
  inset: 10px;
  border-radius: 12px;
  filter: blur(17px);
}

.visuai-fab {
  position: fixed;
  z-index: 64;
  right: 26px;
  bottom: 26px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background: linear-gradient(135deg, #638cff, #9b68e4 56%, #4abda8);
  color: #fff;
  box-shadow: 0 8px 24px rgba(94, 86, 204, .24), 0 0 0 7px rgba(114, 102, 224, .07);
  cursor: pointer;
  transition: transform .2s var(--vui-ease), box-shadow .2s ease, opacity .16s ease;
  animation: visuai-fab-glow 4.6s ease-in-out infinite;
}

.visuai-fab svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.8;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .32));
}

.visuai-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 13px 32px rgba(94, 86, 204, .3), 0 0 0 8px rgba(114, 102, 224, .09);
}

html.drawer-open .visuai-fab {
  opacity: 0;
  pointer-events: none;
}

@keyframes visuai-fab-glow {
  0%, 100% { box-shadow: 0 8px 24px rgba(94, 86, 204, .22), 0 0 0 7px rgba(114, 102, 224, .065); }
  50% { box-shadow: 0 11px 32px rgba(94, 86, 204, .31), 0 0 0 9px rgba(114, 102, 224, .09); }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    gap: 0;
    padding: 14px;
  }

  .login-brand {
    display: none;
  }

  .login-panel {
    width: min(100%, 480px);
    padding: 30px 24px;
  }

  .login-form .mobile-logo {
    display: block;
  }
}

@media (max-width: 700px) {
  .client-product-card {
    min-height: 148px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
    border-radius: 13px;
  }

  .client-product-icon {
    width: 42px;
    height: 42px;
  }

  .visuai-fab {
    right: 16px;
    bottom: 88px;
    width: 52px;
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .visuai-fab {
    animation: none;
  }
}

/* Gestão de Ativos Financeiros */
.asset-access-hero,
.asset-confirmation,
.asset-redirect-card {
  width: min(100%, 900px);
  margin: 28px auto 0;
  padding: clamp(34px, 6vw, 68px);
  border: 1px solid var(--vui-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 12%, rgba(103, 143, 255, .17), transparent 20rem),
    rgba(255, 255, 255, .9);
  box-shadow: var(--vui-shadow-card);
  text-align: center;
}

.asset-access-mark,
.asset-confirmation-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(88, 126, 255, .15), rgba(150, 104, 224, .13));
  color: #5276ef;
}

.asset-access-mark svg,
.asset-confirmation-icon svg {
  width: 28px;
  height: 28px;
}

.asset-access-hero h2,
.asset-confirmation h2 {
  max-width: 720px;
  margin: 10px auto 14px;
  font-size: clamp(27px, 3.4vw, 43px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.asset-access-hero > p:not(.eyebrow),
.asset-confirmation > p:not(.eyebrow) {
  max-width: 650px;
  margin: 0 auto;
  color: var(--vui-muted);
  line-height: 1.65;
}

.asset-access-hero > small {
  display: block;
  margin-top: 20px;
  color: var(--vui-muted);
}

.asset-store-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 650px;
  margin: 30px auto 0;
}

.store-button {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-content: center;
  justify-items: start;
  padding: 13px 18px;
  border-radius: 11px;
  text-align: left;
}

.store-button span {
  grid-column: 1;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .68;
}

.store-button strong {
  grid-column: 1;
  font-size: 14px;
}

.store-button svg {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  width: 19px;
  height: 19px;
}

.asset-redirect-card {
  padding: 36px;
}

.asset-redirect-card p {
  margin: 14px 0 20px;
  color: var(--vui-muted);
}

.asset-confirmation {
  background:
    radial-gradient(circle at 50% -18%, rgba(75, 189, 168, .2), transparent 22rem),
    rgba(255, 255, 255, .92);
}

.asset-confirmation-icon {
  background: rgba(53, 178, 132, .13);
  color: #208a64;
}

.asset-confirmation .button {
  margin-top: 28px;
}

.asset-questionnaire-shell {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.asset-questionnaire-intro,
#asset-questionnaire-form {
  border: 1px solid var(--vui-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--vui-shadow-card);
}

.asset-questionnaire-intro {
  position: sticky;
  top: 96px;
  padding: 26px;
  background:
    radial-gradient(circle at 0 0, rgba(103, 143, 255, .15), transparent 18rem),
    rgba(255, 255, 255, .92);
}

.asset-questionnaire-intro .asset-access-mark {
  margin: 0 0 22px;
}

.asset-questionnaire-intro h2 {
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: -.035em;
}

.asset-questionnaire-intro > p {
  margin: 0;
  color: var(--vui-muted);
  font-size: 13px;
  line-height: 1.6;
}

.asset-security-note {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--vui-line-soft);
  color: var(--vui-muted);
  font-size: 11px;
  line-height: 1.5;
}

.asset-security-note svg {
  width: 18px;
  height: 18px;
  color: #5276ef;
}

#asset-questionnaire-form {
  min-width: 0;
  overflow: hidden;
}

.asset-questionnaire-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--vui-line-soft);
  background: var(--vui-line-soft);
  list-style: none;
}

.asset-questionnaire-steps li {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  background: rgba(250, 250, 252, .96);
  color: var(--vui-muted);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.25;
}

.asset-questionnaire-steps li span {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid var(--vui-line);
  border-radius: 7px;
  background: #fff;
  font-size: 10px;
}

.asset-questionnaire-steps li.active {
  background: #fff;
  color: var(--vui-ink);
}

.asset-questionnaire-steps li.active span,
.asset-questionnaire-steps li.complete span {
  border-color: #5c7df2;
  background: #5c7df2;
  color: #fff;
}

.asset-questionnaire-step {
  padding: clamp(24px, 4vw, 42px);
  scroll-margin-top: 90px;
}

.asset-step-heading {
  margin-bottom: 24px;
}

.asset-step-heading h2 {
  margin: 5px 0 0;
  font-size: 28px;
  letter-spacing: -.035em;
}

.asset-question-card {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid var(--vui-line-soft);
  border-radius: 13px;
  background: rgba(250, 250, 252, .68);
}

.asset-question-card.invalid {
  border-color: rgba(201, 64, 64, .55);
  box-shadow: 0 0 0 3px rgba(201, 64, 64, .07);
}

.asset-question-card > label:first-child {
  display: block;
  margin-bottom: 14px;
  color: var(--vui-ink);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.4;
}

.asset-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.asset-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.asset-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.asset-option > span {
  min-height: 52px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--vui-line);
  border-radius: 10px;
  background: #fff;
  color: var(--vui-muted);
  font-size: 11px;
  font-weight: 620;
  line-height: 1.35;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.asset-option > span i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(118, 118, 128, .08);
  color: var(--vui-muted);
  font-size: 9px;
  font-style: normal;
}

.asset-option input:focus-visible + span {
  outline: 3px solid rgba(82, 118, 239, .2);
  outline-offset: 2px;
}

.asset-option input:checked + span {
  border-color: rgba(82, 118, 239, .55);
  background: rgba(82, 118, 239, .07);
  color: var(--vui-ink);
}

.asset-option input:checked + span i {
  background: #5c7df2;
  color: #fff;
}

.asset-question-card textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
}

.asset-consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin: 0;
  cursor: pointer;
}

.asset-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #5c7df2;
}

.asset-consent span {
  color: var(--vui-muted);
  font-size: 12px;
  line-height: 1.55;
}

.asset-question-error {
  display: block;
  margin-top: 9px;
  color: #b43a3a;
  font-size: 10px;
}

.asset-question-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 18px clamp(24px, 4vw, 42px);
  border-top: 1px solid var(--vui-line-soft);
  background: rgba(250, 250, 252, .88);
}

#asset-questionnaire-status {
  color: var(--vui-muted);
  font-size: 11px;
  text-align: right;
}

.client-asset-access {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin: 22px 0 4px;
  padding: 20px;
  border: 1px solid rgba(82, 118, 239, .2);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(82, 118, 239, .07), rgba(155, 104, 228, .04));
}

.client-asset-access-copy h3 {
  margin: 4px 0 7px;
  font-size: 18px;
}

.client-asset-access-copy > p:not(.eyebrow) {
  margin: 0 0 12px;
  color: var(--vui-muted);
  font-size: 11px;
  line-height: 1.5;
}

.asset-access-toggle {
  display: grid;
  justify-items: center;
  gap: 7px;
  cursor: pointer;
}

.asset-access-toggle input {
  position: absolute;
  opacity: 0;
}

.asset-access-toggle > span {
  width: 50px;
  height: 29px;
  padding: 3px;
  border: 1px solid rgba(118, 118, 128, .2);
  border-radius: 15px;
  background: rgba(118, 118, 128, .22);
  transition: background .18s ease, border-color .18s ease;
}

.asset-access-toggle > span i {
  width: 21px;
  height: 21px;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .18);
  transition: transform .18s ease;
}

.asset-access-toggle input:checked + span {
  border-color: #5c7df2;
  background: #5c7df2;
}

.asset-access-toggle input:checked + span i {
  transform: translateX(21px);
}

.asset-access-toggle input:focus-visible + span {
  outline: 3px solid rgba(82, 118, 239, .2);
  outline-offset: 3px;
}

.asset-access-toggle strong {
  font-size: 10px;
}

.client-asset-answers {
  grid-column: 1 / -1;
  padding-top: 15px;
  border-top: 1px solid rgba(82, 118, 239, .14);
}

.client-asset-answers summary {
  width: fit-content;
  color: #4869ca;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.client-asset-answers dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 15px 0 0;
}

.client-asset-answers dl div {
  padding: 11px;
  border: 1px solid rgba(60, 60, 67, .09);
  border-radius: 9px;
  background: rgba(255, 255, 255, .65);
}

.client-asset-answers dt {
  color: var(--vui-muted);
  font-size: 9px;
  line-height: 1.35;
}

.client-asset-answers dd {
  margin: 5px 0 0;
  color: var(--vui-ink);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .asset-questionnaire-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .asset-questionnaire-intro {
    position: static;
  }
}

@media (max-width: 640px) {
  .asset-access-hero,
  .asset-confirmation,
  .asset-redirect-card {
    margin-top: 14px;
    padding: 30px 19px;
    border-radius: 14px;
  }

  .asset-store-buttons,
  .asset-option-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .asset-questionnaire-steps {
    grid-template-columns: repeat(4, minmax(62px, 1fr));
    overflow-x: auto;
  }

  .asset-questionnaire-steps li {
    min-height: 58px;
    justify-content: center;
    padding: 9px;
    font-size: 0;
  }

  .asset-questionnaire-step {
    padding: 21px 15px;
  }

  .asset-question-card {
    padding: 15px;
  }

  .asset-question-actions {
    grid-template-columns: 1fr 1fr;
    padding: 14px 15px;
  }

  #asset-questionnaire-status {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: left;
  }

  .client-asset-access {
    grid-template-columns: minmax(0, 1fr);
  }

  .client-asset-answers dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .asset-access-toggle {
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: center;
  }
}

/* Mantém o Admin responsivo após a camada visual redefinir a largura lateral. */
@media (max-width: 820px) {
  :root {
    --sidebar: 0px;
  }

  .app-shell:not(.client-shell) .main {
    margin-left: 0;
  }

  .app-shell:not(.client-shell) .sidebar {
    width: 276px;
    transform: translateX(-102%);
  }

  .app-shell:not(.client-shell) .sidebar.open {
    transform: translateX(0);
  }
}

/* Visucio 1.9.3 — tema escuro, alternância persistente e ícone único do VisuAI. */
.theme-toggle {
  flex: 0 0 auto;
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.65;
}

.auth-theme-toggle {
  position: fixed;
  top: 34px;
  right: 34px;
  z-index: 12;
  width: 42px;
  height: 42px;
  border: 1px solid var(--vui-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .76);
  color: var(--vui-ink);
  box-shadow: var(--vui-shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.visuai-star {
  display: block;
  width: 100%;
  height: 100%;
}

.client-sidebar .nav-button.is-visuai > .visuai-star,
.client-top-nav button.is-visuai > .visuai-star {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  padding: 7px;
  border: 1px solid rgba(111, 94, 211, .08);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(98, 140, 255, .18), rgba(163, 107, 230, .15), rgba(77, 189, 169, .13));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), 0 7px 18px rgba(104, 91, 203, .1);
}

.page.visuai-page {
  padding-top: 18px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --vui-bg: #111113;
  --vui-surface: rgba(30, 30, 33, .9);
  --vui-surface-solid: #1c1c1f;
  --vui-ink: #f5f5f7;
  --vui-muted: #aeaeb2;
  --vui-faint: #8e8e93;
  --vui-line: rgba(235, 235, 245, .18);
  --vui-line-soft: rgba(235, 235, 245, .1);
  --vui-blue: #86a2ff;
  --vui-blue-strong: #9db3ff;
  --vui-blue-soft: rgba(103, 143, 255, .18);
  --vui-shadow: 0 1px 2px rgba(0, 0, 0, .28), 0 16px 42px rgba(0, 0, 0, .2);
  --vui-shadow-float: 0 2px 8px rgba(0, 0, 0, .3), 0 28px 70px rgba(0, 0, 0, .36);
  --visucio-background: var(--vui-bg);
  --visucio-surface: var(--vui-surface-solid);
  --visucio-text: var(--vui-ink);
  --visucio-text-secondary: var(--vui-muted);
  --visucio-border: var(--vui-line);
  background: var(--vui-bg);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 88% -12%, rgba(94, 119, 205, .17), transparent 32rem),
    radial-gradient(circle at 12% 105%, rgba(103, 73, 144, .1), transparent 30rem),
    var(--vui-bg);
  color: var(--vui-ink);
}

html[data-theme="dark"] .login-shell {
  background:
    radial-gradient(circle at 16% 12%, rgba(80, 112, 207, .18), transparent 27rem),
    radial-gradient(circle at 88% 86%, rgba(139, 88, 181, .11), transparent 26rem),
    var(--vui-bg);
}

html[data-theme="dark"] .login-brand {
  border-color: rgba(255, 255, 255, .09);
  background: #090b10;
}

html[data-theme="dark"] .login-panel,
html[data-theme="dark"] .client-header,
html[data-theme="dark"] .client-sidebar,
html[data-theme="dark"] .app-shell:not(.client-shell) .sidebar,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .mobile-nav,
html[data-theme="dark"] .client-advisor-card,
html[data-theme="dark"] .client-notification-center,
html[data-theme="dark"] .client-products,
html[data-theme="dark"] .asset-access-hero,
html[data-theme="dark"] .asset-confirmation,
html[data-theme="dark"] .asset-redirect-card,
html[data-theme="dark"] .asset-questionnaire-intro,
html[data-theme="dark"] .asset-questionnaire-step {
  border-color: var(--vui-line-soft);
  background: rgba(29, 29, 32, .86);
  color: var(--vui-ink);
  box-shadow: var(--vui-shadow);
}

html[data-theme="dark"] .client-welcome {
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] :is(.sidebar-logo img, .client-brand img, .mobile-logo, .boot-screen img) {
  content: url('/assets/logo-visucio-dark.png');
  filter: none;
}

html[data-theme="dark"] .profile-save-bar {
  border-top: 1px solid var(--vui-line-soft);
  background: rgba(29, 29, 32, .94);
  box-shadow: 0 -12px 24px rgba(0, 0, 0, .08);
}

html[data-theme="dark"] :is(.field input, .field select, .field textarea, .search-input, .copy-field input, .google-button, .upload-zone, .dropzone) {
  border-color: var(--vui-line);
  background: rgba(44, 44, 47, .9);
  color: var(--vui-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

html[data-theme="dark"] :is(input, textarea)::placeholder {
  color: #7f7f86;
  opacity: 1;
}

html[data-theme="dark"] select option {
  background: #232326;
  color: var(--vui-ink);
}

html[data-theme="dark"] :is(.button.secondary, .button.ghost, .icon-button, .logout-button, .client-sidebar-toggle, .theme-toggle) {
  border-color: var(--vui-line);
  background: rgba(44, 44, 47, .78);
  color: var(--vui-ink);
}

html[data-theme="dark"] :is(.button.secondary, .button.ghost, .icon-button, .logout-button, .client-sidebar-toggle, .theme-toggle):hover {
  border-color: rgba(235, 235, 245, .26);
  background: #37373b;
  color: #fff;
}

html[data-theme="dark"] .button:not(.secondary):not(.ghost):not(.google-button) {
  background: #f5f5f7;
  color: #161618;
}

html[data-theme="dark"] .button:not(.secondary):not(.ghost):not(.google-button):hover {
  background: #fff;
  color: #111113;
}

html[data-theme="dark"] :is(.nav-button, .client-top-nav button, .mobile-nav button) {
  color: var(--vui-muted);
}

html[data-theme="dark"] :is(.nav-button, .client-top-nav button, .mobile-nav button):hover,
html[data-theme="dark"] :is(.nav-button, .client-top-nav button, .mobile-nav button).active {
  background: rgba(255, 255, 255, .075);
  color: var(--vui-ink);
}

html[data-theme="dark"] .client-sidebar .nav-button.is-visuai,
html[data-theme="dark"] .client-top-nav button.is-visuai {
  color: #a9b8ff;
}

html[data-theme="dark"] .client-sidebar .nav-button.is-visuai > .visuai-star,
html[data-theme="dark"] .client-top-nav button.is-visuai > .visuai-star {
  border-color: rgba(167, 157, 255, .16);
  background: linear-gradient(135deg, rgba(98, 140, 255, .24), rgba(163, 107, 230, .2), rgba(77, 189, 169, .16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 20px rgba(77, 65, 174, .2);
}

html[data-theme="dark"] .client-sidebar .nav-button.is-visuai:hover,
html[data-theme="dark"] .client-sidebar .nav-button.is-visuai.active,
html[data-theme="dark"] .client-top-nav button.is-visuai:hover,
html[data-theme="dark"] .client-top-nav button.is-visuai.active {
  background: linear-gradient(135deg, rgba(104, 122, 255, .18), rgba(160, 94, 218, .13), rgba(66, 176, 163, .1));
  color: #d9ddff;
}

html[data-theme="dark"] :is(.client-product-card, .client-notification-item, .quick-action, .entity-card, .notification-card, .asset-question-card, .asset-option, .ai-plugin-option) {
  border-color: var(--vui-line-soft);
  background: rgba(39, 39, 42, .72);
  color: var(--vui-ink);
}

html[data-theme="dark"] :is(.client-product-card, .quick-action, .entity-card, .asset-option):hover {
  border-color: var(--vui-line);
  background: rgba(50, 50, 54, .9);
  color: var(--vui-ink);
}

html[data-theme="dark"] :is(.client-product-card h3, .client-section-heading h2, .page-header h1, .card-header h2, .client-welcome h1, .entity-card h3, .asset-question-card label, .asset-step-heading h2, .asset-access-hero h2, .asset-confirmation h2) {
  color: var(--vui-ink);
}

html[data-theme="dark"] :is(.client-product-card p, .client-section-heading p, .page-header p, .card-header p, .client-welcome p, .entity-card p, .asset-questionnaire-intro p, .asset-access-hero p, .asset-confirmation p, .breadcrumbs) {
  color: var(--vui-muted);
}

html[data-theme="dark"] :is(.client-advisor-avatar, .client-product-icon, .asset-access-mark, .asset-confirmation-icon, .plugin-card-icon, .empty-icon) {
  background: rgba(103, 143, 255, .16);
  color: #9eb3ff;
}

html[data-theme="dark"] :is(.data-table th, .data-table td) {
  border-color: var(--vui-line-soft);
  background: transparent;
  color: var(--vui-ink);
}

html[data-theme="dark"] .data-table th {
  background: rgba(44, 44, 47, .8);
  color: var(--vui-muted);
}

html[data-theme="dark"] :is(.captcha-slot, .safe-note, .profile-edit-notice, .update-review, .asset-security-note, .client-asset-access, .client-asset-answers dl div) {
  border-color: var(--vui-line-soft);
  background: rgba(255, 255, 255, .045);
  color: var(--vui-muted);
}

html[data-theme="dark"] .modal-backdrop {
  background: rgba(0, 0, 0, .58);
}

html[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #252529, #333338, #252529);
}

@media (max-width: 820px) {
  .auth-theme-toggle {
    top: 24px;
    right: 24px;
  }
}

@media (max-width: 520px) {
  .auth-theme-toggle {
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
  }

  .page.visuai-page {
    padding-top: 12px;
  }
}

/* Visucio 1.9.6 — usa a marca branca oficial dentro da plataforma no tema escuro. */
html[data-theme="dark"] :is(.sidebar-logo img, .client-brand img, .mobile-logo, .boot-screen img) {
  content: url('/assets/logo-visucio-white.png');
  filter: none !important;
}

html[data-theme="dark"] .client-header .client-avatar {
  border: 1px solid rgba(157, 179, 255, .28);
  background: #293451;
  color: #f7f8ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .client-header .client-avatar:hover {
  border-color: rgba(173, 192, 255, .46);
  background: #344165;
  color: #fff;
}

html[data-theme="dark"] .client-sidebar .profile-compact .avatar,
html[data-theme="dark"] .profile-large-avatar {
  background: #25304b;
  color: #f5f7ff;
}

html[data-theme="dark"] .client-profile-form .profile-save-bar {
  margin-inline: -26px;
  padding: 16px 26px 20px;
  border-top: 1px solid rgba(235, 235, 245, .12);
  background: rgba(28, 28, 31, .98) !important;
  color: var(--vui-ink);
  box-shadow: 0 -14px 28px rgba(0, 0, 0, .16);
}

html[data-theme="dark"] .client-products {
  border-color: rgba(235, 235, 245, .13);
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .client-products .client-section-heading .eyebrow {
  color: #a9bbff;
}

html[data-theme="dark"] .client-products .client-section-heading > div > p:last-child {
  color: #c0c0c6;
}

html[data-theme="dark"] .client-products .client-product-card {
  border-color: rgba(235, 235, 245, .15);
  background: #222225;
  color: #f5f5f7;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] .client-products .client-product-card:hover {
  border-color: rgba(157, 179, 255, .34);
  background: #2a2a2e;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] .client-products .client-product-card small {
  color: #9fb3ff;
}

html[data-theme="dark"] .client-products .client-product-card h3 {
  color: #f7f7f9;
}

html[data-theme="dark"] .client-products .client-product-card p {
  color: #c4c4ca;
}

html[data-theme="dark"] .client-products .client-product-card strong {
  color: #aabfff;
}

html[data-theme="dark"] .client-products .client-product-card .client-product-icon {
  border: 1px solid rgba(157, 179, 255, .13);
  background: #303751;
  color: #a9bcff;
}

html[data-theme="dark"] .client-products .client-product-card.is-visuai {
  border-color: transparent;
  background:
    linear-gradient(#25252a, #25252a) padding-box,
    linear-gradient(125deg, rgba(120, 153, 255, .72), rgba(187, 132, 255, .62), rgba(95, 218, 193, .48)) border-box;
}

html[data-theme="dark"] .client-products .client-product-card.is-visuai:hover {
  background:
    linear-gradient(#2b2b31, #2b2b31) padding-box,
    linear-gradient(125deg, rgba(134, 164, 255, .82), rgba(198, 148, 255, .72), rgba(103, 226, 202, .56)) border-box;
}

@media (max-width: 700px) {
  html[data-theme="dark"] .client-profile-form .profile-save-bar {
    margin-inline: -19px;
    padding-inline: 19px;
  }
}

/* Visucio 1.9.6 — indicador deslizante da navegação superior. */
.client-top-nav {
  position: relative;
  isolation: isolate;
}

.client-top-nav-indicator {
  position: absolute;
  z-index: 0;
  inset-block: 0;
  left: 0;
  width: 0;
  border: 1px solid rgba(60, 60, 67, .06);
  border-radius: 11px;
  background: rgba(118, 118, 128, .1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .025);
  opacity: 0;
  pointer-events: none;
  will-change: width, transform;
}

.client-top-nav.is-indicator-ready .client-top-nav-indicator {
  transition: width .36s cubic-bezier(.22, 1, .36, 1), transform .36s cubic-bezier(.22, 1, .36, 1), opacity .16s ease, background .24s ease;
}

.client-top-nav button {
  z-index: 1;
}

.client-top-nav button.active,
.client-top-nav button.is-visuai.active {
  background: transparent !important;
  box-shadow: none !important;
}

.client-top-nav.is-visuai-active .client-top-nav-indicator {
  border-color: rgba(126, 111, 242, .09);
  background: linear-gradient(120deg, rgba(111, 145, 255, .14), rgba(190, 132, 255, .12), rgba(88, 213, 190, .11));
  box-shadow: 0 7px 20px rgba(101, 92, 218, .1);
}

html[data-theme="dark"] .client-top-nav-indicator {
  border-color: rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .075);
}

html[data-theme="dark"] .client-top-nav.is-visuai-active .client-top-nav-indicator {
  border-color: rgba(167, 157, 255, .13);
  background: linear-gradient(135deg, rgba(104, 122, 255, .18), rgba(160, 94, 218, .13), rgba(66, 176, 163, .1));
}

@media (prefers-reduced-motion: reduce) {
  .client-top-nav.is-indicator-ready .client-top-nav-indicator {
    transition: none;
  }
}

/* Visucio 1.9.8 — o topo e a lateral compartilham o mesmo movimento das abas. */
.client-top-nav {
  padding: 4px;
  border: 1px solid rgba(60, 60, 67, .055);
  border-radius: 14px;
  background: rgba(118, 118, 128, .075);
}

/* Cadastro legal e publicação dos documentos. */
.registration-legal {
  margin: 18px 0 4px;
  padding: 14px 15px;
  border: 1px solid var(--vui-line-soft);
  border-radius: 12px;
  background: rgba(103, 143, 255, .055);
}

.registration-legal-status {
  margin: 0;
  color: var(--vui-muted);
  font-size: 11px;
  line-height: 1.5;
}

.registration-legal-consents {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.registration-legal-consents[hidden] {
  display: none !important;
}

.legal-consent-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--vui-ink);
  font-size: 11px;
}

.legal-consent-row input {
  width: 17px;
  height: 17px;
  margin: 0 3px 0 0;
  accent-color: var(--vui-blue);
}

.legal-text-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--vui-blue-strong);
  font: inherit;
  font-weight: 720;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.legal-document-modal {
  width: min(820px, 100%);
}

.legal-document-modal .modal-body {
  max-height: 62vh;
  overflow: auto;
}

.legal-document-content {
  color: var(--vui-ink);
  font-size: 13px;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.legal-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.legal-editor-card textarea {
  min-height: 430px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

.legal-publish-bar {
  position: sticky;
  z-index: 4;
  bottom: 18px;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 15px 17px;
  border: 1px solid var(--vui-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--vui-shadow-float);
  backdrop-filter: blur(22px);
}

.legal-publish-bar > div {
  display: grid;
  gap: 3px;
}

.legal-publish-bar strong {
  color: var(--vui-ink);
  font-size: 12px;
}

.legal-publish-bar span {
  color: var(--vui-muted);
  font-size: 10px;
}

/* O hover geral de .button usa texto branco; o botão Google precisa manter seu rótulo visível. */
.google-button > span {
  color: inherit;
  opacity: 1;
  visibility: visible;
  -webkit-text-fill-color: currentColor;
}

.google-button:hover,
.google-button:active,
.google-button:focus-visible {
  color: #202124 !important;
}

html[data-theme="dark"] .registration-legal {
  border-color: var(--vui-line);
  background: rgba(117, 148, 255, .09);
}

html[data-theme="dark"] .legal-publish-bar {
  border-color: var(--vui-line);
  background: rgba(34, 34, 38, .95);
}

html[data-theme="dark"] .google-button:hover,
html[data-theme="dark"] .google-button:active,
html[data-theme="dark"] .google-button:focus-visible {
  border-color: rgba(235, 235, 245, .26);
  background: #37373b;
  color: #f5f5f7 !important;
}

@media (max-width: 900px) {
  .legal-settings-form {
    grid-template-columns: 1fr;
  }

  .legal-publish-bar {
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .legal-publish-bar .button {
    width: 100%;
  }
}

.client-top-nav-indicator {
  top: 4px;
  bottom: 4px;
  border-color: rgba(60, 60, 67, .1);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .065);
}

.client-top-nav button:hover {
  background: rgba(255, 255, 255, .45);
}

.client-top-nav button.active,
.client-top-nav button.is-visuai.active,
.client-top-nav button.active:hover,
.client-top-nav button.is-visuai.active:hover {
  background: transparent !important;
}

.sidebar .nav {
  position: relative;
  isolation: isolate;
}

.sidebar-nav-indicator {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border: 1px solid rgba(60, 60, 67, .07);
  border-radius: 11px;
  background: rgba(118, 118, 128, .11);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .025);
  opacity: 0;
  pointer-events: none;
  will-change: width, height, transform;
}

.sidebar .nav.is-indicator-ready .sidebar-nav-indicator {
  transition: width .36s cubic-bezier(.22, 1, .36, 1), height .36s cubic-bezier(.22, 1, .36, 1), transform .36s cubic-bezier(.22, 1, .36, 1), opacity .16s ease, background .24s ease, box-shadow .24s ease;
}

.sidebar .nav-button {
  position: relative;
  z-index: 1;
}

.sidebar .nav-button.active,
.sidebar .nav-button.active:hover,
.client-sidebar .nav-button.is-visuai.active,
.client-sidebar .nav-button.is-visuai.active:hover {
  background: transparent !important;
  box-shadow: none !important;
}

.sidebar .nav.is-visuai-active .sidebar-nav-indicator {
  border-color: rgba(126, 111, 242, .09);
  background: linear-gradient(120deg, rgba(111, 145, 255, .14), rgba(190, 132, 255, .12), rgba(88, 213, 190, .11));
  box-shadow: 0 7px 20px rgba(101, 92, 218, .1);
}

html[data-theme="dark"] .client-top-nav {
  border-color: rgba(255, 255, 255, .05);
  background: rgba(255, 255, 255, .045);
}

html[data-theme="dark"] .client-top-nav-indicator,
html[data-theme="dark"] .sidebar-nav-indicator {
  border-color: rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] .client-top-nav button:hover {
  background: rgba(255, 255, 255, .055);
}

html[data-theme="dark"] .sidebar .nav.is-visuai-active .sidebar-nav-indicator {
  border-color: rgba(167, 157, 255, .13);
  background: linear-gradient(135deg, rgba(104, 122, 255, .18), rgba(160, 94, 218, .13), rgba(66, 176, 163, .1));
}

@media (prefers-reduced-motion: reduce) {
  .sidebar .nav.is-indicator-ready .sidebar-nav-indicator {
    transition: none;
  }
}
