.beta-activation-page {
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow-y: auto !important;
  align-items: flex-start !important;
  -webkit-overflow-scrolling: touch;
}

.onboarding-page {
  height: 100dvh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.onboarding-page > .relative.z-10 {
  height: 100% !important;
  min-height: 0 !important;
}

.onboarding-page main {
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

html.taskall-app-shell-active,
body.taskall-app-shell-active,
html.taskall-app-shell-active #root {
  height: 100% !important;
  min-height: 100% !important;
  overflow: hidden !important;
}

#root > .theme-pessoal {
  height: 100dvh;
  min-height: 0 !important;
  overflow: hidden;
}

#root > .theme-pessoal > div.flex.min-w-0.flex-1 {
  height: 100dvh;
  min-height: 0 !important;
  overflow: hidden;
}

#root > .theme-pessoal main {
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

.taskall-tai-route .fixed,
.taskall-tai-route button.fixed {
  display: none !important;
}

.taskall-tai-main {
  overflow: hidden !important;
}

.taskall-tai-main .tai-page,
.taskall-tai-main .tai-shell {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.taskall-tai-main .tai-main {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.taskall-tai-main .tai-header {
  position: relative !important;
  top: auto !important;
  z-index: 40 !important;
  grid-row: 1 !important;
}

.taskall-tai-main .tai-conversation {
  grid-row: 2 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

.taskall-tai-main .tai-composer {
  grid-row: 3 !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.theme-pessoal:not(.taskall-tai-route) main:not(.taskall-tai-main) .tai-page {
  display: none !important;
}

.theme-pessoal:not(.taskall-tai-route) main:not(.taskall-tai-main) .tai-composer {
  display: none !important;
}

.taskall-tai-route .tai-composer,
.taskall-tai-main form.tai-composer {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Keep the dashboard highlight carousel as one full-width card per slide. */
main:not(.taskall-tai-main) h2 + div.relative.pb-8 > div.overflow-hidden > div.flex {
  width: 100% !important;
}

main:not(.taskall-tai-main) h2 + div.relative.pb-8 > div.overflow-hidden > div.flex > * {
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 640px) {
  main:not(.taskall-tai-main) h2 + div.relative.pb-8 {
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
    padding-bottom: 1.75rem !important;
  }

  main:not(.taskall-tai-main) h2 + div.relative.pb-8 > div.overflow-hidden {
    border-radius: 1rem !important;
  }

  main:not(.taskall-tai-main) h2 + div.relative.pb-8 > div.overflow-hidden > div.flex > * {
    min-height: 11.75rem !important;
  }

  main:not(.taskall-tai-main) h2 + div.relative.pb-8 > div.overflow-hidden > div.flex > * > div {
    align-items: stretch !important;
    padding: 1rem 1rem 1rem 1.35rem !important;
    gap: 0.75rem !important;
  }

  main:not(.taskall-tai-main) h2 + div.relative.pb-8 > div.overflow-hidden > div.flex > * > div > div:last-child {
    min-height: 0 !important;
  }

  main:not(.taskall-tai-main) h2 + div.relative.pb-8 > div.overflow-hidden > div.flex > * p.inline-flex.rounded-full {
    margin-top: auto !important;
    margin-bottom: 0.25rem !important;
    align-self: flex-start !important;
    white-space: nowrap !important;
  }

  main:not(.taskall-tai-main) h2 + div.relative.pb-8 > div.overflow-hidden > div.flex > * p.inline-flex.rounded-full svg {
    display: none !important;
  }

  main:not(.taskall-tai-main) h2 + div.relative.pb-8 > button[aria-label="Highlight anterior"],
  main:not(.taskall-tai-main) h2 + div.relative.pb-8 > button[aria-label="Próximo highlight"] {
    display: flex !important;
    top: 50% !important;
    width: 2.35rem !important;
    height: 2.35rem !important;
    transform: translateY(calc(-50% - 0.875rem)) !important;
    z-index: 10 !important;
  }

  main:not(.taskall-tai-main) h2 + div.relative.pb-8 > button[aria-label="Highlight anterior"] {
    left: -0.15rem !important;
  }

  main:not(.taskall-tai-main) h2 + div.relative.pb-8 > button[aria-label="Próximo highlight"] {
    right: -0.15rem !important;
  }

  main:not(.taskall-tai-main) h2 + div.relative.pb-8 > div.absolute.bottom-1 {
    bottom: 0 !important;
  }
}

#root > .theme-pessoal + .theme-pessoal,
#root > div + div.theme-pessoal {
  display: none !important;
}

@media (max-width: 640px) {
  [role="dialog"]:not([data-slot="sheet-content"]) {
    width: calc(100vw - 1rem) !important;
    max-width: calc(100vw - 1rem) !important;
    max-height: calc(100dvh - 2rem) !important;
    overflow-y: auto !important;
    padding: 1rem !important;
    border-radius: 1.25rem !important;
  }

  [role="dialog"]:not([data-slot="sheet-content"]) h2 {
    font-size: 1.25rem !important;
    line-height: 1.25 !important;
    padding-right: 1.75rem !important;
  }

  [role="dialog"]:not([data-slot="sheet-content"]) .grid.grid-cols-2,
  [role="dialog"]:not([data-slot="sheet-content"]) .sm\:grid-cols-2,
  [role="dialog"]:not([data-slot="sheet-content"]) .sm\:grid-cols-3 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  [role="dialog"]:not([data-slot="sheet-content"]) .grid,
  [role="dialog"]:not([data-slot="sheet-content"]) .flex,
  [role="dialog"]:not([data-slot="sheet-content"]) .rounded-xl,
  [role="dialog"]:not([data-slot="sheet-content"]) .rounded-lg {
    min-width: 0 !important;
  }

  [role="dialog"]:not([data-slot="sheet-content"]) .flex.gap-3.mt-2 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.5rem !important;
  }

  [role="dialog"]:not([data-slot="sheet-content"]) .flex.flex-col-reverse {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.5rem !important;
  }

  [role="dialog"]:not([data-slot="sheet-content"]) .flex.flex-col-reverse button {
    width: 100% !important;
  }

  [role="dialog"]:not([data-slot="sheet-content"]) input,
  [role="dialog"]:not([data-slot="sheet-content"]) textarea,
  [role="dialog"]:not([data-slot="sheet-content"]) button[role="combobox"],
  [role="dialog"]:not([data-slot="sheet-content"]) [data-slot="select-trigger"] {
    box-sizing: border-box !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  input[type="date"],
  input[type="time"],
  input[type="number"] {
    -webkit-appearance: none;
    appearance: none;
  }

  [role="dialog"]:not([data-slot="sheet-content"]) button {
    max-width: 100%;
  }

  main > .p-6.space-y-6 {
    padding: 1rem 1rem 7rem !important;
  }

  main > .p-6.space-y-6 input,
  main > .p-6.space-y-6 textarea,
  main > .p-6.space-y-6 button[role="combobox"],
  main > .p-6.space-y-6 [data-slot="select-trigger"] {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  main > .p-6.space-y-6 > div:first-child,
  main > .p-6.space-y-6 > div:first-child > div:last-child,
  main > .p-6.space-y-6 > div:first-child > div:last-child > div:first-child {
    width: 100% !important;
  }

  [data-slot="sheet-content"] {
    inset: 0 auto 0 0 !important;
    width: min(86vw, 360px) !important;
    max-width: min(86vw, 360px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

}
