/* Shell desktop progressivo: preserva o DOM, as rotas e os módulos existentes. */
@media (min-width: 768px) {
  html,
  body,
  #root {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: visible !important;
  }

  .app-shell {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0 !important;
    background: radial-gradient(680px circle at 0 0, color-mix(in srgb, var(--color-brand-neon) 24%, transparent), transparent 54%), linear-gradient(180deg, color-mix(in srgb, var(--color-brand-emerald) 84%, #041f18), color-mix(in srgb, var(--color-brand-emerald) 68%, #031711)) !important;
  }

  .app-shell > .sidebar-shell {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow: visible !important;
    align-self: stretch !important;
    width: 18.75rem !important;
    min-width: 18.75rem !important;
    max-width: 18.75rem !important;
    border: 0 !important;
    background: linear-gradient(180deg, color-mix(in srgb, white 7%, transparent), transparent 22%), radial-gradient(480px circle at 8% 0, color-mix(in srgb, var(--color-brand-neon) 26%, transparent), transparent 52%), linear-gradient(180deg, color-mix(in srgb, var(--color-brand-emerald) 84%, #041f18), color-mix(in srgb, var(--color-brand-emerald) 68%, #031711)) !important;
    box-shadow: none !important;
    color: #f3fff9 !important;
    transition: none !important;
  }

  .app-shell > .sidebar-shell::before { opacity: .42; }
  .app-shell .sidebar-collapse-button { display: none !important; }

  .app-shell .sidebar-brand {
    height: 3rem !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    padding: 0 .75rem !important;
    border-color: transparent !important;
    border-radius: 1rem !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .app-shell .sidebar-brand::after { display: none !important; }

  .app-shell .sidebar-brand__logo {
    pointer-events: auto !important;
    width: auto !important;
    height: 2.5rem !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }

  .app-shell .sidebar-brand__favicon { pointer-events: none !important; opacity: 0 !important; }
  .app-shell > .sidebar-shell > nav {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    overscroll-behavior: auto !important;
    padding: .65rem .75rem .85rem !important;
    row-gap: .72rem !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .app-shell > .sidebar-shell > nav::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
  .app-shell > .sidebar-shell > nav > * { margin-top: 0 !important; }
  .app-shell > .sidebar-shell > nav > * + * { margin-top: .32rem !important; }
  .app-shell .sidebar-menu-section { margin: 0 !important; padding: 0 !important; border: 0 !important; }
  .app-shell .sidebar-menu-section > :not([hidden]) ~ :not([hidden]) { margin-top: .35rem !important; }
  .app-shell .sidebar-section-label { display: none !important; }
  .app-shell .sidebar-group-count { display: none !important; }
  .app-shell > .sidebar-shell > div:last-child { display: none !important; }
  .app-shell .sidebar-item--idle { color: rgba(239, 255, 248, .8) !important; }
  .app-shell .sidebar-item--idle:hover,
  .app-shell .sidebar-item--idle:focus-visible {
    border-color: rgba(224, 255, 243, .12) !important;
    background: rgba(238, 255, 248, .055) !important;
    color: #fff !important;
  }

  .app-shell .sidebar-section-icon {
    width: 1.55rem;
    min-width: 1.55rem;
    height: 1.55rem;
    border-radius: .55rem;
    background: color-mix(in srgb, var(--color-brand-neon) 9%, transparent);
  }

  .app-shell .sidebar-item { justify-content: flex-start !important; }

  .app-shell .sidebar-item--root,
  .app-shell .sidebar-item--group {
    min-height: 2.85rem !important;
    height: auto !important;
    padding: .42rem .65rem !important;
    border-radius: .95rem !important;
    font-size: .78rem !important;
  }

  .app-shell .sidebar-item--group { justify-content: space-between !important; }

  .app-shell .sidebar-item--nested {
    min-height: 2.35rem !important;
    height: auto !important;
    margin-left: .1rem !important;
    padding: .28rem .48rem !important;
    border-radius: .75rem !important;
    font-size: .73rem !important;
  }

  .app-shell .sidebar-item__icon-slot {
    width: 2.1rem !important;
    min-width: 2.1rem !important;
    height: 2.1rem !important;
    border: 0 !important;
    border-radius: .72rem !important;
    background: transparent !important;
    box-shadow: none !important;
    color: currentColor !important;
  }

  .app-shell .sidebar-item__icon-slot--nested { width: 1.65rem !important; min-width: 1.65rem !important; height: 1.65rem !important; }
  .app-shell .sidebar-item__icon { width: 1.08rem !important; height: 1.08rem !important; stroke-width: 1.8; }

  .app-shell .sidebar-item__content {
    pointer-events: auto !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 17.5rem !important;
    padding-left: .48rem !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .app-shell .sidebar-item__chevron {
    pointer-events: auto !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 1rem !important;
    max-width: 2rem !important;
    opacity: 1 !important;
    transform: none !important;
    transition-property: transform !important;
  }

  .app-shell .sidebar-item__description { display: none !important; }
  .app-shell .sidebar-icon-tone { color: inherit !important; }
  .app-shell .sidebar-item[aria-label*="Instagram" i] .sidebar-item__icon-slot > * { display: none !important; }
  .app-shell .sidebar-item[aria-label*="Instagram" i] .sidebar-item__icon-slot::before {
    content: "";
    width: 1.08rem;
    height: 1.08rem;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='m8.59 13.51 6.83 3.98M15.41 6.51 8.59 10.49'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='m8.59 13.51 6.83 3.98M15.41 6.51 8.59 10.49'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .app-shell .sidebar-item[aria-label="WhatsApp" i] .sidebar-item__icon-slot > * { display: none !important; }
  .app-shell .sidebar-item[aria-label="WhatsApp" i] .sidebar-item__icon-slot::before {
    content: "";
    display: block !important;
    width: 1.08rem;
    height: 1.08rem;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .app-shell .sidebar-item--group + div {
    border-left: 0 !important;
    border-radius: .8rem;
    background: rgba(235, 255, 247, .035);
  }
  .app-shell .sidebar-item--group[aria-expanded="true"] + div {
    pointer-events: auto !important;
    max-height: 2000px !important;
    padding-left: .625rem !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .app-shell .sidebar-item--root:hover,
  .app-shell .sidebar-item--group:hover { transform: translateX(2px); }

  html body .app-shell .sidebar-item--root.sidebar-item--active,
  html body .app-shell .sidebar-item--group.sidebar-item--active {
    position: relative;
    z-index: 2;
    width: calc(100% + 1.4rem) !important;
    margin-right: -1.4rem !important;
    border-color: transparent !important;
    border-radius: 999px 0 0 999px !important;
    background-color: var(--color-bg) !important;
    background-image: none !important;
    color: var(--color-text-primary) !important;
    box-shadow: inset 0 0 0 999px var(--color-bg) !important;
  }

  html body .app-shell .sidebar-item--root.sidebar-item--active::after,
  html body .app-shell .sidebar-item--group.sidebar-item--active::after { display: none !important; }

  .app-shell .sidebar-item--active .sidebar-item__icon-slot {
    background: color-mix(in srgb, var(--color-brand-neon) 10%, transparent) !important;
    color: var(--color-brand-emerald) !important;
  }

  .app-shell .sidebar-item--active .sidebar-item__icon-slot,
  .app-shell .sidebar-item--active .sidebar-item__icon,
  .app-shell .sidebar-item--active .sidebar-item__icon-slot::before {
    visibility: visible !important;
    opacity: 1 !important;
  }

  .app-shell .sidebar-item--nested.sidebar-item--active {
    border-color: color-mix(in srgb, var(--color-brand-neon) 18%, transparent) !important;
    background: color-mix(in srgb, var(--color-brand-neon) 7%, transparent) !important;
    box-shadow: none !important;
    color: #f4fff9 !important;
  }

  .app-shell .sidebar-group-count { min-width: 1.3rem; height: 1.15rem; border: 0; background: color-mix(in srgb, var(--color-brand-neon) 10%, transparent); font-size: .58rem; }

  .desktop-shell-main {
    isolation: isolate;
    height: auto !important;
    min-height: calc(100vh - 1.4rem) !important;
    max-height: none !important;
    overflow: visible !important;
    align-self: stretch !important;
    margin: .7rem .7rem .7rem 0 !important;
    border: 1px solid color-mix(in srgb, var(--color-brutal-border) 78%, transparent);
    border-radius: 2rem;
    background: var(--color-bg);
    box-shadow: 0 10px 28px rgba(2, 14, 18, .08), inset 0 1px 0 rgba(255, 255, 255, .04);
  }

  .desktop-shell-main::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(720px circle at 88% 0, color-mix(in srgb, var(--color-brand-neon) 6%, transparent), transparent 46%), linear-gradient(180deg, color-mix(in srgb, white 1.8%, transparent), transparent 28%);
  }

  .desktop-shell-main > .z-10.flex-1 {
    height: auto !important;
    min-height: calc(100vh - 6.05rem) !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  .desktop-shell-header {
    position: relative;
    z-index: 100;
    min-height: 4.65rem;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: .75rem 5rem .75rem 1.5rem;
    border-bottom: 1px solid color-mix(in srgb, var(--color-brutal-border) 72%, transparent);
    background: color-mix(in srgb, var(--color-brutal-panel) 84%, transparent);
    backdrop-filter: blur(18px);
    border-radius: 2rem 2rem 0 0;
  }

  .app-shell.app-shell--conversation,
  .app-shell.app-shell--crm {
    height: 100vh !important;
    min-height: 100vh !important;
    overflow: hidden !important;
  }

  .app-shell.app-shell--conversation > .sidebar-shell,
  .app-shell.app-shell--crm > .sidebar-shell {
    height: 100vh !important;
    min-height: 0 !important;
    max-height: 100vh !important;
    overflow: hidden !important;
  }

  .app-shell.app-shell--conversation > .sidebar-shell > nav,
  .app-shell.app-shell--crm > .sidebar-shell > nav {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
  }

  .app-shell.app-shell--conversation > .desktop-shell-main,
  .app-shell.app-shell--crm > .desktop-shell-main {
    height: calc(100vh - 1.4rem) !important;
    min-height: 0 !important;
    max-height: calc(100vh - 1.4rem) !important;
    overflow: hidden !important;
    align-self: flex-start !important;
  }

  .app-shell.app-shell--conversation > .desktop-shell-main > .z-10.flex-1,
  .app-shell.app-shell--crm > .desktop-shell-main > .z-10.flex-1 {
    flex: 1 1 0% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  .app-shell.app-shell--conversation .desktop-shell-main div[class*="shadow-[0_18px_36px"] {
    box-shadow: none !important;
  }

  .desktop-shell-breadcrumb { min-width: 0; display: flex; align-items: center; gap: .55rem; color: var(--color-text-secondary); font-size: .82rem; font-weight: 600; }
  .desktop-shell-breadcrumb > span,
  .desktop-shell-breadcrumb > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .desktop-shell-breadcrumb > span { color: var(--color-brand-emerald); }
  .desktop-shell-breadcrumb > strong { color: var(--color-text-primary); font-weight: 760; }

  .desktop-shell-profile {
    min-width: 0;
    min-height: 2.7rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .3rem .65rem .3rem .35rem;
    border: 1px solid color-mix(in srgb, var(--color-brutal-border) 72%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-brutal-panel) 90%, transparent);
    color: var(--color-text-primary);
    text-decoration: none;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
  }

  .desktop-shell-profile:hover,
  .desktop-shell-profile:focus-visible { border-color: color-mix(in srgb, var(--color-brand-neon) 48%, var(--color-brutal-border)); background: color-mix(in srgb, var(--color-brand-neon) 7%, var(--color-brutal-panel)); transform: translateY(-1px); outline: none; }

  .desktop-shell-profile__avatar { width: 2.05rem; height: 2.05rem; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 999px; background: linear-gradient(145deg, var(--color-brand-neon), var(--color-brand-emerald)); color: var(--color-contrast-on-brand, #062018); }
  .desktop-shell-profile__avatar img { width: 100%; height: 100%; object-fit: cover; }
  .desktop-shell-profile__copy { min-width: 0; display: grid; line-height: 1.15; }
  .desktop-shell-profile__copy strong { font-size: .72rem; font-weight: 760; }
  .desktop-shell-profile__copy small { margin-top: .18rem; color: var(--color-text-secondary); font-size: .61rem; font-weight: 600; }

  .desktop-shell-account { position: relative; }
  .desktop-shell-profile__chevron { transition: transform .2s ease; }
  .desktop-account-menu { position: absolute; top: calc(100% + .55rem); right: 0; z-index: 80; width: min(18rem, calc(100vw - 2rem)); overflow: hidden; border: 1px solid color-mix(in srgb, var(--color-brand-neon) 24%, var(--color-brutal-border)); border-radius: 1.15rem; background: color-mix(in srgb, var(--color-brand-emerald) 88%, #03261d); box-shadow: 0 10px 28px rgba(2, 25, 19, .18); color: #f4fff9; }
  .desktop-account-menu__identity { display: grid; gap: .18rem; padding: 1rem 1.05rem .8rem; border-bottom: 1px solid rgba(255,255,255,.12); }
  .desktop-account-menu__identity strong { font-size: .86rem; }
  .desktop-account-menu__identity span { color: rgba(239,255,248,.68); font-size: .7rem; }
  .desktop-account-menu > a,
  .desktop-account-menu > button { width: 100%; min-height: 2.75rem; display: flex; align-items: center; gap: .7rem; padding: .68rem 1rem; border: 0; background: transparent; color: inherit; font-size: .78rem; font-weight: 650; text-align: left; text-decoration: none; }
  .desktop-account-menu > a:hover,
  .desktop-account-menu > button:hover { background: rgba(255,255,255,.085); }
  .desktop-account-menu__logout { border-top: 1px solid rgba(255,255,255,.12) !important; color: #ffd7d7 !important; }
}

/* Keep the icon reset inside Tailwind's component layer so it also wins over
   legacy !important tone utilities generated in that same layer. */
@layer components {
  @media (min-width: 768px) {
    html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--idle .sidebar-item__icon-slot,
    html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--idle .sidebar-icon-tone,
    html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--idle [class*="sidebar-icon-tone--"] {
      border: 0 !important;
      background: transparent !important;
      background-image: none !important;
      box-shadow: none !important;
      color: inherit !important;
    }

    html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--active .sidebar-item__icon-slot,
    html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--active .sidebar-icon-tone,
    html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--active [class*="sidebar-icon-tone--"] {
      border: 0 !important;
      background: #dff3eb !important;
      background-image: none !important;
      box-shadow: none !important;
      color: #0b6d53 !important;
    }
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .app-shell > .sidebar-shell {
    width: 16.5rem !important;
    min-width: 16.5rem !important;
    max-width: 16.5rem !important;
  }
}

@media (max-width: 767px) {
  .desktop-shell-header { display: none !important; }
}

/* Compact visual standard: keep navigation inside the sidebar and remove costly elevation. */
@media (min-width: 768px) {
  html body .app-shell.app-shell,
  html body .app-shell.app-shell > .sidebar-shell.sidebar-shell {
    background: #0f6e56 !important;
    background-image: none !important;
  }

  html body .app-shell.app-shell > .sidebar-shell.sidebar-shell {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
  }

  html body .app-shell.app-shell > .sidebar-shell.sidebar-shell::before {
    display: none !important;
  }

  html body .app-shell.app-shell > .desktop-shell-main.desktop-shell-main {
    border-left: 0 !important;
  }

  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--root.sidebar-item--active,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--group.sidebar-item--active {
    position: relative !important;
    z-index: 4 !important;
    width: calc(100% + 0.8rem) !important;
    margin-right: -0.8rem !important;
    overflow: visible !important;
    border-color: transparent !important;
    border-radius: 999px 0 0 999px !important;
    background-color: var(--color-bg) !important;
    background-image: none !important;
    box-shadow: none !important;
    color: var(--color-text-primary) !important;
  }

  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--root.sidebar-item--active::before,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--group.sidebar-item--active::before,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--root.sidebar-item--active::after,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--group.sidebar-item--active::after {
    content: "" !important;
    position: absolute !important;
    right: 0 !important;
    left: auto !important;
    display: block !important;
    width: 28px !important;
    height: 28px !important;
    pointer-events: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--root.sidebar-item--active::before,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--group.sidebar-item--active::before {
    top: -28px !important;
    bottom: auto !important;
    background: var(--color-bg) !important;
    clip-path: path("M 0 25 C 13.8 25 25 13.8 25 0 L 28 0 L 28 28 L 0 28 Z") !important;
  }

  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--root.sidebar-item--active::after,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--group.sidebar-item--active::after {
    top: auto !important;
    bottom: -28px !important;
    background: var(--color-bg) !important;
    clip-path: path("M 0 3 C 13.8 3 25 14.2 25 28 L 28 28 L 28 0 L 0 0 Z") !important;
  }
}

@media (min-width: 1101px) {
  html body .app-shell.app-shell > .sidebar-shell.sidebar-shell {
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
  }
}

.app-shell .sidebar-item,
.app-shell .sidebar-item__icon-slot,
.app-shell .desktop-shell-main,
.app-shell .desktop-account-menu {
  box-shadow: none !important;
}

/* Marca em branco sobre o fundo verde da sidebar, no desktop e no mobile. */
.sidebar-shell .sidebar-brand__logo {
  filter: brightness(0) invert(1) !important;
}

@media (max-width: 767px) {
  .sidebar-shell[class*="fixed"] {
    background: #0f6e56 !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }

  .sidebar-shell[class*="fixed"]::before { display: none !important; }

  .sidebar-shell[class*="fixed"] .sidebar-brand {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }

  .sidebar-shell[class*="fixed"] .sidebar-item:not(.sidebar-item--active),
  .sidebar-shell[class*="fixed"] .sidebar-item:not(.sidebar-item--active) .sidebar-item__label,
  .sidebar-shell[class*="fixed"] .sidebar-item:not(.sidebar-item--active) .sidebar-item__description {
    color: rgba(255, 255, 255, .82) !important;
  }

  .sidebar-shell[class*="fixed"] .sidebar-item--active {
    color: #12372f !important;
    background: #f7fbf9 !important;
  }

  .sidebar-shell[class*="fixed"] .sidebar-item--active .sidebar-item__label,
  .sidebar-shell[class*="fixed"] .sidebar-item--active .sidebar-item__description {
    color: #12372f !important;
  }

  .sidebar-shell[class*="fixed"] .sidebar-section-label,
  .sidebar-shell[class*="fixed"] [class*="tracking-"] {
    color: rgba(255, 255, 255, .7) !important;
  }

  .sidebar-shell[class*="fixed"] > div:first-child button {
    color: #fff !important;
    background: rgba(255, 255, 255, .1) !important;
    border-color: rgba(255, 255, 255, .18) !important;
  }

  .sidebar-shell[class*="fixed"] .sidebar-section-icon { display: none !important; }

  .sidebar-shell[class*="fixed"] .sidebar-icon-tone {
    color: rgba(255, 255, 255, .92) !important;
    background: rgba(255, 255, 255, .1) !important;
    border-color: rgba(255, 255, 255, .14) !important;
  }

  .sidebar-shell[class*="fixed"] .sidebar-item--active .sidebar-icon-tone {
    color: #0f6e56 !important;
    background: #e3f2ed !important;
    border-color: #b9ddd2 !important;
  }
}

/* Final desktop navigation contract: stable in both themes and independent of bundle order. */
@media (min-width: 768px) {
  html body .app-shell.app-shell > .desktop-shell-main.desktop-shell-main {
    border: 1px solid color-mix(in srgb, var(--color-brutal-border) 78%, transparent) !important;
    border-left: 0 !important;
    border-radius: 32px !important;
    background: var(--color-bg) !important;
  }
  html body .app-shell.app-shell > .desktop-shell-main.desktop-shell-main > .desktop-shell-header {
    border-radius: 32px 32px 0 0 !important;
  }
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--idle,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--idle .sidebar-item__label,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--idle .sidebar-item__description,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--idle .sidebar-item__chevron {
    color: rgba(245, 255, 250, .86) !important;
  }
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item__icon-slot,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-icon-tone,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell [class*="sidebar-icon-tone--"] {
    border-color: transparent !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: inherit !important;
  }
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item__icon,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item__icon-slot::before {
    color: inherit !important;
    opacity: 1 !important;
  }
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--root.sidebar-item--active,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--group.sidebar-item--active {
    width: calc(100% + .7rem) !important;
    margin-right: -.7rem !important;
    overflow: visible !important;
    border-color: transparent !important;
    border-radius: 999px 18px 18px 999px !important;
    background: var(--color-bg) !important;
    box-shadow: none !important;
    color: #0b5f49 !important;
  }
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--root.sidebar-item--active::before,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--group.sidebar-item--active::before,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--root.sidebar-item--active::after,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell--expanded .sidebar-item--group.sidebar-item--active::after {
    display: none !important;
    content: none !important;
  }
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--active .sidebar-item__icon-slot,
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--active .sidebar-icon-tone {
    background: #dff3eb !important;
    color: #0b6d53 !important;
  }
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--nested.sidebar-item--active {
    border-color: rgba(194, 241, 221, .18) !important;
    border-radius: 12px !important;
    background: rgba(238, 255, 248, .09) !important;
    color: #f7fffb !important;
  }
  html body .app-shell.app-shell .sidebar-shell.sidebar-shell .sidebar-item--group + div {
    border-radius: 16px !important;
    background: rgba(238, 255, 248, .045) !important;
  }
}

/* Dashboard compacto: mais informação útil por tela sem perder hierarquia. */
.app-shell--dashboard .sidebar-active-dot { display: none !important; }

@media (min-width: 768px) {
  .app-shell--dashboard .dashboard-page .app-page-frame {
    gap: 12px !important;
    padding-top: 12px !important;
  }

  .app-shell--dashboard .dashboard-page .app-page-frame > header > * + * {
    margin-top: 12px !important;
  }

  .app-shell--dashboard .dashboard-page .app-page-frame > header > div:first-child {
    padding: 18px !important;
  }

  .app-shell--dashboard .dashboard-page .app-page-frame > header h1 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }

  .app-shell--dashboard .dashboard-page .app-page-frame > header > div:nth-child(2) {
    gap: 12px !important;
  }

  .app-shell--dashboard .dashboard-page .app-page-frame > header > div:nth-child(2) > div {
    padding: 12px !important;
  }

  .app-shell--dashboard .dashboard-page .app-page-frame > header > div:nth-child(2) > div > div:first-child {
    font-size: 10px !important;
    letter-spacing: .14em !important;
  }

  .app-shell--dashboard .dashboard-page .app-page-frame > header > div:nth-child(2) > div > div:nth-child(2) {
    margin-top: 6px !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
  }

  .app-shell--dashboard .dashboard-page .app-page-frame > div:last-child {
    row-gap: 20px !important;
  }

  .app-shell--dashboard .dashboard-page .app-page-frame > div:last-child > section {
    row-gap: 12px !important;
  }

  .app-shell--dashboard .dashboard-page .app-page-frame > div:last-child > section > div:nth-child(2) > div {
    padding: 14px !important;
  }

  .app-shell--dashboard .dashboard-page .app-page-frame > div:last-child > section > div:nth-child(2) > div > div:first-child {
    font-size: 10px !important;
    letter-spacing: .14em !important;
  }

  .app-shell--dashboard .dashboard-page .app-page-frame > div:last-child > section > div:nth-child(2) > div > div:nth-child(2) {
    margin-top: 6px !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
  }
}

/* Superfícies planas: remove brilhos e degradês decorativos do fundo. */
.desktop-shell-main > .absolute.inset-0.pointer-events-none {
  display: none !important;
}

.schedule-page .schedule-shell {
  background: var(--schedule-bg) !important;
  background-image: none !important;
  box-shadow: none !important;
}

.app-shell .glass-panel,
.schedule-page .glass-panel,
.schedule-page .schedule-surface,
.schedule-page [class*="shadow-"] {
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Disparador: botão do CRM legível e digitação da lista sem cintilação. */
.schedule-page--campaign-dispatch .campaign-crm-load-button,
.schedule-page--campaign-dispatch .campaign-crm-load-runtime {
  border-color: color-mix(in srgb, var(--schedule-green) 38%, var(--schedule-border)) !important;
  background: var(--schedule-green-light) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--schedule-green-dark) !important;
}

.schedule-page--campaign-dispatch .campaign-crm-load-button:disabled,
.schedule-page--campaign-dispatch .campaign-crm-load-runtime:disabled {
  color: var(--schedule-text-muted) !important;
}

.schedule-page--campaign-dispatch .campaign-phone-input-runtime {
  transition: none !important;
  animation: none !important;
  caret-color: var(--schedule-green-dark);
}

.schedule-page--campaign-dispatch .campaign-phone-updating-runtime {
  display: none !important;
}

/* CRM compacto com ações por ícone e rolagem horizontal também no topo. */
@media (min-width: 768px) {
  .crm-compact-runtime > div:last-child {
    display: flex !important;
    min-height: 0 !important;
    flex-direction: column !important;
  }

  .crm-compact-runtime .crm-toolbar-icon-runtime,
  .crm-compact-runtime .crm-card-icon-runtime {
    width: 2.25rem !important;
    min-width: 2.25rem !important;
    height: 2.25rem !important;
    padding: 0 !important;
    justify-content: center !important;
    gap: 0 !important;
    border-radius: .7rem !important;
    font-size: 0 !important;
    letter-spacing: 0 !important;
  }

  .crm-compact-runtime .crm-toolbar-icon-runtime svg,
  .crm-compact-runtime .crm-card-icon-runtime svg {
    width: 15px !important;
    height: 15px !important;
    margin: 0 !important;
  }

  .crm-compact-runtime .crm-stage-lane-runtime {
    width: clamp(330px, 24vw, 390px) !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 20px !important;
  }

  .crm-compact-runtime .crm-stage-lane-runtime > div:last-child {
    min-height: 0 !important;
    flex: 1 1 0% !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--color-brand-emerald) 58%, transparent) transparent;
  }

  .crm-compact-runtime .crm-stage-lane-runtime > div:last-child::-webkit-scrollbar {
    width: 7px;
  }

  .crm-compact-runtime .crm-stage-lane-runtime > div:last-child::-webkit-scrollbar-track {
    background: transparent;
  }

  .crm-compact-runtime .crm-stage-lane-runtime > div:last-child::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-brand-emerald) 58%, transparent);
    background-clip: padding-box;
  }

  .crm-compact-runtime .crm-lead-card-runtime {
    padding: 10px !important;
    border-radius: 18px !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .crm-compact-runtime .crm-lead-card-runtime p {
    min-height: 32px !important;
    margin-top: 8px !important;
    font-size: 11px !important;
    line-height: 1rem !important;
  }

  .crm-kanban-with-top-scroll {
    display: flex !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    flex: 1 1 0% !important;
    flex-direction: column !important;
    border-radius: 22px !important;
    box-shadow: none !important;
  }

  .crm-kanban-top-scroll-runtime {
    width: 100%;
    height: 14px;
    min-height: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--color-brand-emerald) transparent;
  }

  .crm-kanban-top-scroll-spacer-runtime { height: 1px; }

  .crm-kanban-body-runtime {
    height: auto !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .crm-kanban-body-runtime::-webkit-scrollbar { display: none !important; }
}
