/* Sprint 84.10 FIX7D: Empresa shell geometry only.
   Scope is intentionally positive to avoid leaking the fix into RPO or other roles. */

@media (min-width: 768px) and (max-width: 1439.98px) {
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-shell-top,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar.main-header.feat-header {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-row,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-row {
    display: grid !important;
    grid-template-areas:
      "brand actions"
      "nav nav" !important;
    grid-template-columns: minmax(96px, 168px) minmax(0, 1fr) !important;
    grid-template-rows: minmax(64px, auto) minmax(48px, auto) !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 8px clamp(12px, 1.4vw, 18px) 10px !important;
    gap: 8px 10px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-brand,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .brand.feat-header-brand,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-brand {
    grid-area: brand !important;
    width: 100% !important;
    max-width: 168px !important;
    min-width: 0 !important;
    margin: 0 !important;
    align-self: center !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-actions,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-actions {
    grid-area: actions !important;
    justify-self: end !important;
    align-self: center !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-actions > *,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-actions > * {
    flex: 0 0 auto !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-primary-nav-region,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-primary-nav-region {
    grid-area: nav !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-primary-nav,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-primary-nav {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-primary-nav > *,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-primary-nav-group {
    flex: 0 0 auto !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-topbar-user,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-topbar-user,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-user-toggle,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-user-toggle {
    max-width: min(300px, 34vw) !important;
    min-width: 44px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-user-toggle,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-user-toggle {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-topbar-user .user > div {
    min-width: 0 !important;
    max-width: min(160px, calc(34vw - 112px)) !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-topbar-user .user b,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-topbar-user .user small {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-actions,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-actions,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-primary-nav,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-primary-nav {
    scrollbar-width: none !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-actions::-webkit-scrollbar,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-actions::-webkit-scrollbar,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-primary-nav::-webkit-scrollbar,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-primary-nav::-webkit-scrollbar {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-shell-top,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar.main-header.feat-header {
    min-height: 82px !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-row,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-row {
    grid-template-areas: "brand actions" !important;
    grid-template-columns: minmax(96px, 168px) minmax(0, 1fr) !important;
    grid-template-rows: minmax(64px, auto) !important;
    min-height: 82px !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-primary-nav-region,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-primary-nav-region {
    display: none !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-menu-toggle,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-menu-toggle {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 44px !important;
  }
}

@media (max-width: 767.98px) {
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-shell-top,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar.main-header.feat-header {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    min-height: 116px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-row,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-row {
    display: grid !important;
    grid-template-areas:
      "brand"
      "actions" !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 48px minmax(44px, auto) !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    min-height: 116px !important;
    padding: 8px 10px 10px !important;
    row-gap: 6px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-brand,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .brand.feat-header-brand,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-brand {
    grid-area: brand !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-content: space-between !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-menu-toggle,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-menu-toggle {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 44px !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-actions,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-actions {
    grid-area: actions !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    justify-content: flex-end !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-header-actions > *,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-header-actions > * {
    flex: 0 0 auto !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-module-switcher-cta,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-module-switcher-cta {
    display: inline-flex !important;
    width: auto !important;
    max-width: 142px !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 10px !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-module-switcher-cta strong,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-module-switcher-cta strong {
    display: inline !important;
    max-width: 92px !important;
    margin-left: 6px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-topbar-user,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-topbar-user {
    display: inline-flex !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .topbar .feat-user-toggle,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-user-toggle {
    display: inline-flex !important;
    width: 44px !important;
    max-width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-user-company-logo {
    display: none !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-user-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-user-avatar img {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
  }

  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-topbar-user .user > div,
  body.feat-shell.feat-shell-role-3.feat-shell-context-empresa .feat-user-chevron {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-shell-top,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .topbar.main-header.feat-header {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 116px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .topbar .feat-header-row,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-header-row {
    display: grid !important;
    grid-template-areas:
      "brand"
      "actions" !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 48px minmax(44px, auto) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 116px !important;
    padding: 8px 10px 10px !important;
    row-gap: 6px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .topbar .feat-header-brand,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .brand.feat-header-brand,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-header-brand {
    grid-area: brand !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-content: space-between !important;
  }

  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .topbar .feat-header-actions,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-header-actions {
    grid-area: actions !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: flex-end !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow: visible !important;
  }

  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .topbar .feat-header-actions > *,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-header-actions > * {
    flex: 0 0 auto !important;
  }

  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .topbar .feat-module-switcher-cta,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-module-switcher-cta {
    display: inline-flex !important;
    width: auto !important;
    min-width: 44px !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 10px !important;
  }

  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .topbar .feat-module-switcher-cta strong,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-module-switcher-cta strong {
    display: inline !important;
    white-space: nowrap !important;
  }

  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .topbar .feat-topbar-user,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-topbar-user,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .topbar .feat-user-toggle,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-user-toggle {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 44px !important;
  }

  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .topbar .feat-user-toggle,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-user-toggle {
    display: inline-flex !important;
    height: 44px !important;
    padding: 0 !important;
  }

  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-user-company-logo,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-topbar-user .user > div,
  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-user-chevron {
    display: none !important;
  }

  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-user-avatar {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
  }

  body.feat-shell.feat-shell-role-5.feat-shell-context-empresa .feat-topbar-panel-account {
    right: 0 !important;
    width: min(280px, calc(100vw - 20px)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 20px) !important;
  }
}
